Chromium Code Reviews| Index: content/renderer/webcrypto/webcrypto_impl_nss.cc |
| diff --git a/content/renderer/webcrypto/webcrypto_impl_nss.cc b/content/renderer/webcrypto/webcrypto_impl_nss.cc |
| index 107c27b0cc135023af09961f6af002aff2a05933..1df84289b243df2018f9de3bcf4e1a7d15d523d5 100644 |
| --- a/content/renderer/webcrypto/webcrypto_impl_nss.cc |
| +++ b/content/renderer/webcrypto/webcrypto_impl_nss.cc |
| @@ -260,6 +260,7 @@ bool ImportKeyInternalRaw( |
| switch (algorithm.id()) { |
| case blink::WebCryptoAlgorithmIdHmac: |
| case blink::WebCryptoAlgorithmIdAesCbc: |
| + case blink::WebCryptoAlgorithmIdAesKw: |
| type = blink::WebCryptoKeyTypeSecret; |
| break; |
| // TODO(bryaneyler): Support more key types. |
| @@ -267,8 +268,6 @@ bool ImportKeyInternalRaw( |
| return false; |
| } |
| - // TODO(bryaneyler): Need to split handling for symmetric and asymmetric keys. |
| - // Currently only supporting symmetric. |
| CK_MECHANISM_TYPE mechanism = CKM_INVALID_MECHANISM; |
| // Flags are verified at the Blink layer; here the flags are set to all |
| // possible operations for this key type. |
| @@ -295,6 +294,11 @@ bool ImportKeyInternalRaw( |
| flags |= CKF_ENCRYPT | CKF_DECRYPT; |
| break; |
| } |
| + case blink::WebCryptoAlgorithmIdAesKw: { |
| + mechanism = CKM_NSS_AES_KEY_WRAP; |
|
eroman
2013/12/18 02:10:30
I believe this will need to specify the padding ve
padolph
2013/12/18 03:21:41
In an earlier email thread "AES Key Wrap as a new
|
| + flags |= CKF_WRAP | CKF_WRAP; |
| + break; |
| + } |
| default: |
| return false; |
| } |