diff options
author | glen.beasley%sun.com <devnull@localhost> | 2003-09-03 20:35:36 +0000 |
---|---|---|
committer | glen.beasley%sun.com <devnull@localhost> | 2003-09-03 20:35:36 +0000 |
commit | 925953a6c520d9f85135057aca2b2749ec02fe38 (patch) | |
tree | a15e4919aa9894c953c754bb0775fb9b3c9bb6bc | |
parent | 673f5148c320efcd261d5f9dd61a7488ab9110ce (diff) | |
download | nss-hg-925953a6c520d9f85135057aca2b2749ec02fe38.tar.gz |
Ian suggested fix
-rw-r--r-- | security/nss/lib/freebl/rsa.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/nss/lib/freebl/rsa.c b/security/nss/lib/freebl/rsa.c index 40903b34d..ba89c6ccc 100644 --- a/security/nss/lib/freebl/rsa.c +++ b/security/nss/lib/freebl/rsa.c @@ -759,11 +759,13 @@ swap_in_key_value(PRArenaPool *arena, mp_int *mpval, SECItem *buffer) if ((unsigned int)len <= buffer->len) { /* The new value is no longer than the old buffer, so use it */ err = mp_to_unsigned_octets(mpval, buffer->data, len); + if (err >= 0) err = MP_OKAY; buffer->len = len; } else if (arena) { /* The new value is longer, but working within an arena */ (void)SECITEM_AllocItem(arena, buffer, len); err = mp_to_unsigned_octets(mpval, buffer->data, len); + if (err >= 0) err = MP_OKAY; } else { /* The new value is longer, no arena, can't handle this key */ return SECFailure; @@ -810,6 +812,7 @@ RSA_PrivateKeyCheck(RSAPrivateKey *key) /* mind the p's and q's (and d_p's and d_q's) */ SECItem tmp; mp_exch(&p, &q); + mp_exch(&d_p,&d_q); tmp = key->prime1; key->prime1 = key->prime2; key->prime2 = tmp; |