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

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

Issue 661653002: [webcrypto] Implement RSA-PSS using BoringSSL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_rsassa
Patch Set: Add some tests from fips 186-2, covering sha-{256, 384, 512} Created 6 years, 2 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.cc
diff --git a/content/child/webcrypto/webcrypto_util.cc b/content/child/webcrypto/webcrypto_util.cc
index 247437775f1112bc03e579b256ecdb10e3fd392f..294cfcc34029dea36aa0a83806bf00a232f1bc57 100644
--- a/content/child/webcrypto/webcrypto_util.cc
+++ b/content/child/webcrypto/webcrypto_util.cc
@@ -119,8 +119,6 @@ blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm(
blink::WebCryptoAlgorithmId id,
blink::WebCryptoAlgorithmId hash_id) {
DCHECK(blink::WebCryptoAlgorithm::isHash(hash_id));
- DCHECK(id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 ||
- id == blink::WebCryptoAlgorithmIdRsaOaep);
return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
id, new blink::WebCryptoRsaHashedImportParams(CreateAlgorithm(hash_id)));
}
@@ -138,7 +136,8 @@ bool KeyUsageAllows(const blink::WebCryptoKey& key,
bool IsAlgorithmRsa(blink::WebCryptoAlgorithmId alg_id) {
return alg_id == blink::WebCryptoAlgorithmIdRsaOaep ||
- alg_id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5;
+ alg_id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 ||
+ alg_id == blink::WebCryptoAlgorithmIdRsaPss;
}
bool IsAlgorithmAsymmetric(blink::WebCryptoAlgorithmId alg_id) {

Powered by Google App Engine
This is Rietveld 408576698