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

Unified Diff: content/child/webcrypto/webcrypto_util.h

Issue 401233004: Refactor RSA key generation for WebCrypto's NSS implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/webcrypto_util.h
diff --git a/content/child/webcrypto/webcrypto_util.h b/content/child/webcrypto/webcrypto_util.h
index 44d88a752434d398a5f9f9dc31ebc8a0c2d0b1e9..0dd121b0e64ddb5a487acd7a76edce692b9e0515 100644
--- a/content/child/webcrypto/webcrypto_util.h
+++ b/content/child/webcrypto/webcrypto_util.h
@@ -94,6 +94,17 @@ Status VerifyAesKeyLengthForImport(unsigned int keylen_bytes);
Status CheckKeyCreationUsages(blink::WebCryptoKeyUsageMask all_possible_usages,
blink::WebCryptoKeyUsageMask actual_usages);
+// Extracts the public exponent and modulus length from the Blink parameters.
+// On success it is guaranteed that:
+// * public_exponent is either 3 or 65537
+// * modulus_length_bits is a non-zero multiple of 8
+// * modulus_length is >= 256
+// * modulus_length is <= 16K
+Status GetRsaKeyGenGetParameters(
Ryan Sleevi 2014/07/21 21:36:46 Why the extra (Get) in here? Shouldn't this be Ge
eroman 2014/07/21 21:52:21 Done. (Typo on my part, that was then propagated
+ const blink::WebCryptoRsaHashedKeyGenParams* params,
+ unsigned int* public_exponent,
+ unsigned int* modulus_length_bits);
+
} // namespace webcrypto
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698