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

Unified Diff: nss/lib/freebl/rsa.c

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 years, 9 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: nss/lib/freebl/rsa.c
diff --git a/nss/lib/freebl/rsa.c b/nss/lib/freebl/rsa.c
index f1824eff9ad51e19817493ea6fab04c7319cb8a5..48b557b42178cadd7a5694c1e35610244115c86e 100644
--- a/nss/lib/freebl/rsa.c
+++ b/nss/lib/freebl/rsa.c
@@ -747,8 +747,7 @@ RSA_PopulatePrivateKey(RSAPrivateKey *key)
}
/* if we have the modulus and one prime, calculate the second. */
if ((prime_count == 1) && (hasModulus)) {
- mp_div(&n,&p,&q,&r);
- if (mp_cmp_z(&r) != 0) {
+ if (mp_div(&n,&p,&q,&r) != MP_OKAY || mp_cmp_z(&r) != 0) {
/* p is not a factor or n, fail */
err = MP_BADARG;
goto cleanup;
@@ -1096,9 +1095,7 @@ init_blinding_params(RSABlindingParams *rsabp, RSAPrivateKey *key,
rsabp->free = bp;
/* List elements are keyed using the modulus */
- SECITEM_CopyItem(NULL, &rsabp->modulus, &key->modulus);
-
- return SECSuccess;
+ return SECITEM_CopyItem(NULL, &rsabp->modulus, &key->modulus);
}
static SECStatus
« no previous file with comments | « nss/lib/freebl/rijndael.c ('k') | nss/lib/freebl/unix_rand.c » ('j') | nss/lib/util/secoid.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698