Index: content/child/webcrypto/webcrypto_util.cc |
diff --git a/content/child/webcrypto/webcrypto_util.cc b/content/child/webcrypto/webcrypto_util.cc |
index 5e5fc8e4c3d2b7857e438bdb0c32e5af6f59f2f0..2b11ac1df1939f3c6720fbb0a6585b4c79f9d228 100644 |
--- a/content/child/webcrypto/webcrypto_util.cc |
+++ b/content/child/webcrypto/webcrypto_util.cc |
@@ -385,7 +385,12 @@ bool CreateSecretKeyAlgorithm(const blink::WebCryptoAlgorithm& algorithm, |
if (hash.isNull()) |
return false; |
*key_algorithm = blink::WebCryptoKeyAlgorithm::adoptParamsAndCreate( |
- algorithm.id(), new blink::WebCryptoHmacKeyAlgorithmParams(hash)); |
+ algorithm.id(), |
+#if defined(WEBCRYPTO_HMAC_KEY_HAS_LENGTH) |
+ new blink::WebCryptoHmacKeyAlgorithmParams(hash, keylen_bytes * 8)); |
eroman
2014/03/18 23:50:01
I didn't check for overflow, probably should. wdyt
eroman
2014/03/19 00:04:19
OK done.
|
+#else |
+ new blink::WebCryptoHmacKeyAlgorithmParams(hash)); |
+#endif |
return true; |
} |
case blink::WebCryptoAlgorithmIdAesKw: |