Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: content/child/webcrypto/platform_crypto_openssl.cc

Issue 361193003: Eliminate ScopedOpenSSL in favour of scoped_ptr<> specializations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Android fixes Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/child/webcrypto/platform_crypto_openssl.cc
diff --git a/content/child/webcrypto/platform_crypto_openssl.cc b/content/child/webcrypto/platform_crypto_openssl.cc
index 84ed9d8c2562bb013e5f6b25082b0eb81ed24d4a..5d816c96b038b3374e324ae77caf3e6ad0483f1f 100644
--- a/content/child/webcrypto/platform_crypto_openssl.cc
+++ b/content/child/webcrypto/platform_crypto_openssl.cc
@@ -17,6 +17,7 @@
#include "content/child/webcrypto/status.h"
#include "content/child/webcrypto/webcrypto_util.h"
#include "crypto/openssl_util.h"
+#include "crypto/scoped_openssl_types.h"
#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
#include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
#include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
@@ -99,8 +100,9 @@ Status AesCbcEncryptDecrypt(EncryptOrDecrypt mode,
}
// Note: PKCS padding is enabled by default
- crypto::ScopedOpenSSL<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free> context(
- EVP_CIPHER_CTX_new());
+ scoped_ptr<EVP_CIPHER_CTX,
+ crypto::OpenSSLDestroyer<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free> >
+ context(EVP_CIPHER_CTX_new());
if (!context.get())
return Status::OperationError();
@@ -233,7 +235,7 @@ class DigestorOpenSSL : public blink::WebCryptoDigestor {
}
bool initialized_;
- crypto::ScopedOpenSSL<EVP_MD_CTX, EVP_MD_CTX_destroy> digest_context_;
+ crypto::ScopedEVP_MD_CTX digest_context_;
blink::WebCryptoAlgorithmId algorithm_id_;
unsigned char result_[EVP_MAX_MD_SIZE];
};
@@ -435,7 +437,9 @@ Status EncryptDecryptAesGcm(EncryptOrDecrypt mode,
return Status::OperationError();
}
- crypto::ScopedOpenSSL<EVP_AEAD_CTX, EVP_AEAD_CTX_cleanup> ctx_cleanup(&ctx);
+ scoped_ptr<EVP_AEAD_CTX,
+ crypto::OpenSSLDestroyer<EVP_AEAD_CTX, EVP_AEAD_CTX_cleanup> >
+ ctx_cleanup(&ctx);
ssize_t len;

Powered by Google App Engine
This is Rietveld 408576698