Commit 266d2ea4 authored by unknown's avatar unknown

change all auto_ptr in yaSSL to mySTL since some lack reset


extra/yassl/src/ssl.cpp:
  change all auto_ptr to mySTL since some lack reset
parent bb5457ae
...@@ -122,7 +122,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) ...@@ -122,7 +122,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password, EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password,
passwordSz, 1, key, iv); passwordSz, 1, key, iv);
STL::auto_ptr<BulkCipher> cipher; mySTL::auto_ptr<BulkCipher> cipher;
if (strncmp(info.name, "DES-CBC", 7) == 0) if (strncmp(info.name, "DES-CBC", 7) == 0)
cipher.reset(NEW_YS DES); cipher.reset(NEW_YS DES);
else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0) else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0)
...@@ -138,7 +138,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) ...@@ -138,7 +138,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
return SSL_BAD_FILE; return SSL_BAD_FILE;
} }
cipher->set_decryptKey(key, info.iv); cipher->set_decryptKey(key, info.iv);
STL::auto_ptr<x509> newx(NEW_YS x509(x->get_length())); mySTL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
cipher->decrypt(newx->use_buffer(), x->get_buffer(), cipher->decrypt(newx->use_buffer(), x->get_buffer(),
x->get_length()); x->get_length());
ysDelete(x); ysDelete(x);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment