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

Unified Diff: content/child/webcrypto/nss/rsa_oaep_nss.cc

Issue 512023002: Refactor the interface for generating keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a new return type "GenerateKeyPairResult" to encapsulate secretkey vs keypair Created 6 years, 3 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: content/child/webcrypto/nss/rsa_oaep_nss.cc
diff --git a/content/child/webcrypto/nss/rsa_oaep_nss.cc b/content/child/webcrypto/nss/rsa_oaep_nss.cc
index dac027baee32937fc10e5ce6217f8bbddae02e8c..8490c45ae40acf1135fab3cfa026bdaf31efd7d9 100644
--- a/content/child/webcrypto/nss/rsa_oaep_nss.cc
+++ b/content/child/webcrypto/nss/rsa_oaep_nss.cc
@@ -168,15 +168,15 @@ class RsaOaepImplementation : public RsaHashedAlgorithm {
blink::WebCryptoKeyUsageDecrypt |
blink::WebCryptoKeyUsageUnwrapKey) {}
- virtual Status VerifyKeyUsagesBeforeGenerateKeyPair(
- blink::WebCryptoKeyUsageMask combined_usage_mask,
- blink::WebCryptoKeyUsageMask* public_usage_mask,
- blink::WebCryptoKeyUsageMask* private_usage_mask) const OVERRIDE {
+ virtual Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
+ bool extractable,
+ blink::WebCryptoKeyUsageMask usage_mask,
+ GenerateKeyResult* result) const OVERRIDE {
Status status = NssSupportsRsaOaep();
if (status.IsError())
return status;
- return RsaHashedAlgorithm::VerifyKeyUsagesBeforeGenerateKeyPair(
- combined_usage_mask, public_usage_mask, private_usage_mask);
+ return RsaHashedAlgorithm::GenerateKey(
+ algorithm, extractable, usage_mask, result);
}
virtual Status VerifyKeyUsagesBeforeImportKey(

Powered by Google App Engine
This is Rietveld 408576698