Index: content/child/webcrypto/nss/rsa_key_nss.cc |
diff --git a/content/child/webcrypto/nss/rsa_key_nss.cc b/content/child/webcrypto/nss/rsa_key_nss.cc |
index 99c32bc3d336f681c2f98a225a022b25787729a3..90d0a3063529434fde1dc4cbad86db1880ae7dc2 100644 |
--- a/content/child/webcrypto/nss/rsa_key_nss.cc |
+++ b/content/child/webcrypto/nss/rsa_key_nss.cc |
@@ -532,33 +532,27 @@ Status ImportRsaPublicKey(const blink::WebCryptoAlgorithm& algorithm, |
} // namespace |
-Status RsaHashedAlgorithm::VerifyKeyUsagesBeforeGenerateKeyPair( |
+Status RsaHashedAlgorithm::GenerateKey( |
+ const blink::WebCryptoAlgorithm& algorithm, |
+ bool extractable, |
blink::WebCryptoKeyUsageMask combined_usage_mask, |
- blink::WebCryptoKeyUsageMask* public_usage_mask, |
- blink::WebCryptoKeyUsageMask* private_usage_mask) const { |
+ blink::WebCryptoKey* public_key, |
+ blink::WebCryptoKey* private_key) const { |
Status status = CheckKeyCreationUsages( |
all_public_key_usages_ | all_private_key_usages_, combined_usage_mask); |
if (status.IsError()) |
return status; |
- *public_usage_mask = combined_usage_mask & all_public_key_usages_; |
- *private_usage_mask = combined_usage_mask & all_private_key_usages_; |
+ const blink::WebCryptoKeyUsageMask public_usage_mask = |
+ combined_usage_mask & all_public_key_usages_; |
+ const blink::WebCryptoKeyUsageMask private_usage_mask = |
+ combined_usage_mask & all_private_key_usages_; |
- return Status::Success(); |
-} |
- |
-Status RsaHashedAlgorithm::GenerateKeyPair( |
- const blink::WebCryptoAlgorithm& algorithm, |
- bool extractable, |
- blink::WebCryptoKeyUsageMask public_usage_mask, |
- blink::WebCryptoKeyUsageMask private_usage_mask, |
- blink::WebCryptoKey* public_key, |
- blink::WebCryptoKey* private_key) const { |
unsigned int public_exponent = 0; |
unsigned int modulus_length_bits = 0; |
- Status status = GetRsaKeyGenParameters(algorithm.rsaHashedKeyGenParams(), |
- &public_exponent, |
- &modulus_length_bits); |
+ status = GetRsaKeyGenParameters(algorithm.rsaHashedKeyGenParams(), |
+ &public_exponent, |
+ &modulus_length_bits); |
if (status.IsError()) |
return status; |