Chromium Code Reviews| Index: content/child/webcrypto/shared_crypto.cc |
| diff --git a/content/child/webcrypto/shared_crypto.cc b/content/child/webcrypto/shared_crypto.cc |
| index b4d5931327a31de64f6ec3a9dd5ab5fa2d96823b..6b3d45010b0979259e9cfc0d495d7e923c9391f8 100644 |
| --- a/content/child/webcrypto/shared_crypto.cc |
| +++ b/content/child/webcrypto/shared_crypto.cc |
| @@ -219,6 +219,10 @@ Status ImportKeyRaw(const CryptoData& key_data, |
| case blink::WebCryptoAlgorithmIdAesKw: |
| if (!IsValidAesKeyLengthBytes(key_data.byte_length())) |
| return Status::ErrorImportAesKeyLength(); |
| + if (key_data.byte_length() == 24 && |
| + algorithm.id() == blink::WebCryptoAlgorithmIdAesGcm) { |
| + return Status::ErrorAesGcm192Unsupported(); |
|
Ryan Sleevi
2014/06/10 23:44:21
Same comments re All AES
|
| + } |
| // Fallthrough intentional! |
| case blink::WebCryptoAlgorithmIdHmac: |
| return platform::ImportKeyRaw( |
| @@ -662,6 +666,12 @@ Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm, |
| if (!IsValidAesKeyLengthBits(algorithm.aesKeyGenParams()->lengthBits())) |
| return Status::ErrorGenerateKeyLength(); |
| keylen_bytes = algorithm.aesKeyGenParams()->lengthBits() / 8; |
| + |
| + if (keylen_bytes == 24 && |
| + algorithm.id() == blink::WebCryptoAlgorithmIdAesGcm) { |
| + return Status::ErrorAesGcm192Unsupported(); |
| + } |
|
Ryan Sleevi
2014/06/10 23:44:21
Same comments re All AES
|
| + |
| break; |
| } |
| case blink::WebCryptoAlgorithmIdHmac: { |