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

Unified Diff: openssl/crypto/rsa/rsa_pss.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 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 | « openssl/crypto/rsa/rsa_prn.c ('k') | openssl/crypto/rsa/rsa_sign.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: openssl/crypto/rsa/rsa_pss.c
===================================================================
--- openssl/crypto/rsa/rsa_pss.c (revision 105093)
+++ openssl/crypto/rsa/rsa_pss.c (working copy)
@@ -81,7 +81,9 @@
EVP_MD_CTX ctx;
unsigned char H_[EVP_MAX_MD_SIZE];
- hLen = M_EVP_MD_size(Hash);
+ hLen = EVP_MD_size(Hash);
+ if (hLen < 0)
+ goto err;
/*
* Negative sLen has special meanings:
* -1 sLen == hLen
@@ -126,7 +128,8 @@
RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS, ERR_R_MALLOC_FAILURE);
goto err;
}
- PKCS1_MGF1(DB, maskedDBLen, H, hLen, Hash);
+ if (PKCS1_MGF1(DB, maskedDBLen, H, hLen, Hash) < 0)
+ goto err;
for (i = 0; i < maskedDBLen; i++)
DB[i] ^= EM[i];
if (MSBits)
@@ -176,7 +179,9 @@
unsigned char *H, *salt = NULL, *p;
EVP_MD_CTX ctx;
- hLen = M_EVP_MD_size(Hash);
+ hLen = EVP_MD_size(Hash);
+ if (hLen < 0)
+ goto err;
/*
* Negative sLen has special meanings:
* -1 sLen == hLen
@@ -232,7 +237,8 @@
EVP_MD_CTX_cleanup(&ctx);
/* Generate dbMask in place then perform XOR on it */
- PKCS1_MGF1(EM, maskedDBLen, H, hLen, Hash);
+ if (PKCS1_MGF1(EM, maskedDBLen, H, hLen, Hash))
+ goto err;
p = EM;
« no previous file with comments | « openssl/crypto/rsa/rsa_prn.c ('k') | openssl/crypto/rsa/rsa_sign.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698