| Index: components/webcrypto/algorithms/hkdf.cc
|
| diff --git a/components/webcrypto/algorithms/hkdf.cc b/components/webcrypto/algorithms/hkdf.cc
|
| index 90a204513d3131012fe32ce6a5a801c99a370051..f5ac563e3db9f92a99fe6b210380a1b45e946d36 100644
|
| --- a/components/webcrypto/algorithms/hkdf.cc
|
| +++ b/components/webcrypto/algorithms/hkdf.cc
|
| @@ -105,6 +105,10 @@ class HkdfImplementation : public AlgorithmImplementation {
|
| blink::WebCryptoKeyUsageMask usages,
|
| const CryptoData& key_data,
|
| blink::WebCryptoKey* key) const override {
|
| + if (algorithm.paramsType() != blink::WebCryptoKeyAlgorithmParamsTypeNone ||
|
| + type != blink::WebCryptoKeyTypeSecret)
|
| + return Status::ErrorUnexpected();
|
| +
|
| // 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
|
|
|