Use EVP_PKEY_bits in SimplePathBuilderDelegate
No need to dip out of EVP for this one. Change-Id: Ide03d28edd5316addbb9051d527fec23ace259ba Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81660 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com>
This commit is contained in:
committed by
Boringssl LUCI CQ
parent
92ae3b9b6e
commit
74c3b4b7fd
@@ -100,12 +100,7 @@ bool SimplePathBuilderDelegate::IsPublicKeyAcceptable(EVP_PKEY *public_key,
|
||||
int pkey_id = EVP_PKEY_id(public_key);
|
||||
if (pkey_id == EVP_PKEY_RSA) {
|
||||
// Extract the modulus length from the key.
|
||||
RSA *rsa = EVP_PKEY_get0_RSA(public_key);
|
||||
if (!rsa) {
|
||||
return false;
|
||||
}
|
||||
unsigned int modulus_length_bits = RSA_bits(rsa);
|
||||
|
||||
unsigned int modulus_length_bits = EVP_PKEY_bits(public_key);
|
||||
if (modulus_length_bits < min_rsa_modulus_length_bits_) {
|
||||
errors->AddWarning(
|
||||
kRsaModulusTooSmall,
|
||||
|
||||
Reference in New Issue
Block a user