Chromium Code Reviews| Index: components/webcrypto/algorithms/pbkdf2.cc |
| diff --git a/components/webcrypto/algorithms/pbkdf2.cc b/components/webcrypto/algorithms/pbkdf2.cc |
| index 5e62bc567fc4f90e7d8eca9c7b5e04c9e76ae564..fc70d4fa5f13880d511aa1267fc4b4cd1c0d6088 100644 |
| --- a/components/webcrypto/algorithms/pbkdf2.cc |
| +++ b/components/webcrypto/algorithms/pbkdf2.cc |
| @@ -110,6 +110,9 @@ class Pbkdf2Implementation : public AlgorithmImplementation { |
| blink::WebCryptoKeyUsageMask usages, |
| const CryptoData& key_data, |
| blink::WebCryptoKey* key) const override { |
| + if (algorithm.paramsType() != blink::WebCryptoKeyAlgorithmParamsTypeNone) |
| + return Status::ErrorUnexpected(); |
| + |
|
eroman
2016/11/30 19:15:50
Can you also add a test for:
type == WebCryptoK
|
| // NOTE: Unlike ImportKeyRaw(), this does not enforce extractable==false. |
| // This is intentional. Although keys cannot currently be created with |
| // extractable==true, earlier implementations permitted this, so |