Index: content/child/webcrypto/jwk.cc |
diff --git a/content/child/webcrypto/jwk.cc b/content/child/webcrypto/jwk.cc |
index d6729caa9b53cf53aab654a8ed0f2ed7e3cc0615..75282f75f0999b760c24eceb98d25fc59da2dfd1 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); |