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

Unified Diff: trunk/src/crypto/signature_verifier_openssl.cc

Issue 405503002: Revert 283813 "Switch to BoringSSL." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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
« no previous file with comments | « trunk/src/crypto/scoped_openssl_types.h ('k') | trunk/src/google_apis/google_apis.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/crypto/signature_verifier_openssl.cc
===================================================================
--- trunk/src/crypto/signature_verifier_openssl.cc (revision 283844)
+++ trunk/src/crypto/signature_verifier_openssl.cc (working copy)
@@ -26,7 +26,7 @@
case SignatureVerifier::SHA256:
return EVP_sha256();
}
- return NULL;
+ return EVP_md_null();
}
} // namespace
@@ -80,11 +80,8 @@
const uint8* public_key_info,
int public_key_info_len) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
- const EVP_MD* const digest = ToOpenSSLDigest(hash_alg);
+ const EVP_MD* digest = ToOpenSSLDigest(hash_alg);
DCHECK(digest);
- if (!digest) {
- return false;
- }
EVP_PKEY_CTX* pkey_ctx;
if (!CommonInit(digest, signature, signature_len, public_key_info,
@@ -95,12 +92,8 @@
int rv = EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING);
if (rv != 1)
return false;
- const EVP_MD* const mgf_digest = ToOpenSSLDigest(mask_hash_alg);
- DCHECK(mgf_digest);
- if (!mgf_digest) {
- return false;
- }
- rv = EVP_PKEY_CTX_set_rsa_mgf1_md(pkey_ctx, mgf_digest);
+ rv = EVP_PKEY_CTX_set_rsa_mgf1_md(pkey_ctx,
+ ToOpenSSLDigest(mask_hash_alg));
if (rv != 1)
return false;
rv = EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, salt_len);
« no previous file with comments | « trunk/src/crypto/scoped_openssl_types.h ('k') | trunk/src/google_apis/google_apis.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698