Chromium Code Reviews| Index: content/child/webcrypto/openssl/util_openssl.cc |
| diff --git a/content/child/webcrypto/openssl/util_openssl.cc b/content/child/webcrypto/openssl/util_openssl.cc |
| index 665e1525ff1f267dd024eb8cb4669e840ff1bf01..06a5876d96f6a82354e51fb808818652b69146a8 100644 |
| --- a/content/child/webcrypto/openssl/util_openssl.cc |
| +++ b/content/child/webcrypto/openssl/util_openssl.cc |
| @@ -180,6 +180,9 @@ Status CreateWebCryptoPrivateKey(crypto::ScopedEVP_PKEY private_key, |
| *key = blink::WebCryptoKey::create( |
| new AsymKeyOpenSsl(private_key.Pass(), CryptoData(pkcs8_data)), |
| blink::WebCryptoKeyTypePrivate, extractable, algorithm, usages); |
| + if (key->usages() == 0) { |
|
eroman
2014/11/20 23:40:10
This test is not possible, as it will prevent impo
nharper
2014/11/21 22:12:01
Is it an issue that this affects behavior of key i
eroman
2014/11/21 22:55:47
Correct, importKey() must also throw a SyntaxError
|
| + return Status::ErrorCreateKeyBadUsages(); |
| + } |
| return Status::Success(); |
| } |