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..78e116d13eeb45b2912721b5d4499d58cf76b567 100644 |
| --- a/content/child/webcrypto/openssl/util_openssl.cc |
| +++ b/content/child/webcrypto/openssl/util_openssl.cc |
| @@ -180,6 +180,8 @@ 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/21 23:35:34
Per our discussion this is best left to a follow-u
nharper
2014/11/22 00:26:45
I moved this check up to the GenerateKey() functio
|
| + return Status::ErrorCreateKeyEmptyUsages(); |
| return Status::Success(); |
| } |