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

Unified Diff: content/child/webcrypto/jwk.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/jwk.cc
diff --git a/content/child/webcrypto/jwk.cc b/content/child/webcrypto/jwk.cc
index b0073cc1b8f86cbf216f73c9fb2ec7a887110009..ed20ec74efc8e16a243e3a17e89ccb016eb34031 100644
--- a/content/child/webcrypto/jwk.cc
+++ b/content/child/webcrypto/jwk.cc
@@ -448,7 +448,8 @@ JwkWriter::JwkWriter(const std::string& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usages,
const std::string& kty) {
- dict_.SetString("alg", algorithm);
+ if (!algorithm.empty())
+ dict_.SetString("alg", algorithm);
dict_.Set("key_ops", CreateJwkKeyOpsFromWebCryptoUsages(usages));
dict_.SetBoolean("ext", extractable);
dict_.SetString("kty", kty);

Powered by Google App Engine
This is Rietveld 408576698