Index: crypto/signature_verifier_openssl.cc |
diff --git a/crypto/signature_verifier_openssl.cc b/crypto/signature_verifier_openssl.cc |
index a85f00b491ed8e479883f49e09227a28470c53c5..b6458e50777d36c36dec5dc2e4f1d3fbb5e824c7 100644 |
--- a/crypto/signature_verifier_openssl.cc |
+++ b/crypto/signature_verifier_openssl.cc |
@@ -13,6 +13,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/stl_util.h" |
#include "crypto/openssl_util.h" |
+#include "crypto/scoped_openssl_types.h" |
namespace crypto { |
@@ -31,7 +32,7 @@ const EVP_MD* ToOpenSSLDigest(SignatureVerifier::HashAlgorithm hash_alg) { |
} // namespace |
struct SignatureVerifier::VerifyContext { |
- ScopedOpenSSL<EVP_MD_CTX, EVP_MD_CTX_destroy> ctx; |
+ ScopedEVP_MD_CTX ctx; |
}; |
SignatureVerifier::SignatureVerifier() |
@@ -49,8 +50,9 @@ bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, |
const uint8* public_key_info, |
int public_key_info_len) { |
OpenSSLErrStackTracer err_tracer(FROM_HERE); |
- ScopedOpenSSL<X509_ALGOR, X509_ALGOR_free> algorithm( |
- d2i_X509_ALGOR(NULL, &signature_algorithm, signature_algorithm_len)); |
+ scoped_ptr<X509_ALGOR, OpenSSLDestroyer<X509_ALGOR, X509_ALGOR_free> > |
+ algorithm( |
+ d2i_X509_ALGOR(NULL, &signature_algorithm, signature_algorithm_len)); |
if (!algorithm.get()) |
return false; |
int nid = OBJ_obj2nid(algorithm.get()->algorithm); |
@@ -135,13 +137,11 @@ bool SignatureVerifier::CommonInit(const EVP_MD* digest, |
// BIO_new_mem_buf is not const aware, but it does not modify the buffer. |
char* data = reinterpret_cast<char*>(const_cast<uint8*>(public_key_info)); |
- ScopedOpenSSL<BIO, BIO_free_all> bio(BIO_new_mem_buf(data, |
- public_key_info_len)); |
+ ScopedBIO bio(BIO_new_mem_buf(data, public_key_info_len)); |
if (!bio.get()) |
return false; |
- ScopedOpenSSL<EVP_PKEY, EVP_PKEY_free> public_key( |
- d2i_PUBKEY_bio(bio.get(), NULL)); |
+ ScopedEVP_PKEY public_key(d2i_PUBKEY_bio(bio.get(), NULL)); |
if (!public_key.get()) |
return false; |