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

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

Issue 698363002: webcrypto: Add ECDSA algorithm (chromium-side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extract_more
Patch Set: rebase + add another test Created 6 years, 1 month 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 410acdda7383eb3e7a2e275b323bcc1365e10d2c..5bdc6b9991d142fb8e0c95f75f36a8a0eaa4e835 100644
--- a/content/child/webcrypto/webcrypto_util.cc
+++ b/content/child/webcrypto/webcrypto_util.cc
@@ -137,6 +137,13 @@ blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm(
id, new blink::WebCryptoRsaHashedImportParams(CreateAlgorithm(hash_id)));
}
+blink::WebCryptoAlgorithm CreateEcImportAlgorithm(
+ blink::WebCryptoAlgorithmId id,
+ blink::WebCryptoNamedCurve named_curve) {
+ return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
+ id, new blink::WebCryptoEcKeyImportParams(named_curve));
+}
+
bool ContainsKeyUsages(blink::WebCryptoKeyUsageMask a,
blink::WebCryptoKeyUsageMask b) {
return (a & b) == b;

Powered by Google App Engine
This is Rietveld 408576698