| Index: components/webcrypto/algorithms/aes.cc
|
| diff --git a/components/webcrypto/algorithms/aes.cc b/components/webcrypto/algorithms/aes.cc
|
| index f46ea15a119bf502f399bbf4e3e9cc664db962a3..1a21dc5ca1a85c7be508de02cbc8726ba4b4fc06 100644
|
| --- a/components/webcrypto/algorithms/aes.cc
|
| +++ b/components/webcrypto/algorithms/aes.cc
|
| @@ -199,6 +199,10 @@ Status AesAlgorithm::DeserializeKeyForClone(
|
| blink::WebCryptoKeyUsageMask usages,
|
| const CryptoData& key_data,
|
| blink::WebCryptoKey* key) const {
|
| + if (algorithm.paramsType() != blink::WebCryptoKeyAlgorithmParamsTypeAes ||
|
| + type != blink::WebCryptoKeyTypeSecret)
|
| + return Status::ErrorUnexpected();
|
| +
|
| return ImportKeyRaw(key_data, SynthesizeImportAlgorithmForClone(algorithm),
|
| extractable, usages, key);
|
| }
|
|
|