diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2015-12-03 15:37:03 +1100 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2015-12-03 15:37:03 +1100 |
commit | 5e8df868b45ebcc85c72d50247481dea70605645 (patch) | |
tree | e5873489a413ac7684ac7d0d36b09fa0eb5e84ac /lib/cryptohi | |
parent | 906c92c09c5e0b2684a2623b52fc6d34d30aab3a (diff) | |
download | nss-hg-5e8df868b45ebcc85c72d50247481dea70605645.tar.gz |
Bug 1211403 - Calculate DSA and DH key sizes based on prime, not public key, r=wtc
Diffstat (limited to 'lib/cryptohi')
-rw-r--r-- | lib/cryptohi/seckey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cryptohi/seckey.c b/lib/cryptohi/seckey.c index 830f5b668..975fc1ff9 100644 --- a/lib/cryptohi/seckey.c +++ b/lib/cryptohi/seckey.c @@ -998,10 +998,10 @@ SECKEY_PublicKeyStrengthInBits(const SECKEYPublicKey *pubk) bitSize = SECKEY_BigIntegerBitLength(&pubk->u.rsa.modulus); break; case dsaKey: - bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dsa.publicValue); + bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dsa.params.prime); break; case dhKey: - bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dh.publicValue); + bitSize = SECKEY_BigIntegerBitLength(&pubk->u.dh.prime); break; case ecKey: bitSize = SECKEY_ECParamsToKeySize(&pubk->u.ec.DEREncodedParams); |