| Index: content/child/webcrypto/openssl/aes_key_openssl.cc
|
| diff --git a/content/child/webcrypto/openssl/aes_key_openssl.cc b/content/child/webcrypto/openssl/aes_key_openssl.cc
|
| index 738b87bc670f6cb903304a219ade8294c52fa978..14fa24e35c2d15d02555c47a695e0095d47a9fd9 100644
|
| --- a/content/child/webcrypto/openssl/aes_key_openssl.cc
|
| +++ b/content/child/webcrypto/openssl/aes_key_openssl.cc
|
| @@ -32,9 +32,9 @@ AesAlgorithm::AesAlgorithm(const std::string& jwk_suffix)
|
|
|
| Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
|
| bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| + blink::WebCryptoKeyUsageMask usages,
|
| GenerateKeyResult* result) const {
|
| - Status status = CheckKeyCreationUsages(all_key_usages_, usage_mask);
|
| + Status status = CheckKeyCreationUsages(all_key_usages_, usages);
|
| if (status.IsError())
|
| return status;
|
|
|
| @@ -46,18 +46,18 @@ Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
|
| return GenerateSecretKeyOpenSsl(
|
| blink::WebCryptoKeyAlgorithm::createAes(algorithm.id(), keylen_bits),
|
| extractable,
|
| - usage_mask,
|
| + usages,
|
| keylen_bits / 8,
|
| result);
|
| }
|
|
|
| Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
|
| blink::WebCryptoKeyFormat format,
|
| - blink::WebCryptoKeyUsageMask usage_mask) const {
|
| + blink::WebCryptoKeyUsageMask usages) const {
|
| switch (format) {
|
| case blink::WebCryptoKeyFormatRaw:
|
| case blink::WebCryptoKeyFormatJwk:
|
| - return CheckKeyCreationUsages(all_key_usages_, usage_mask);
|
| + return CheckKeyCreationUsages(all_key_usages_, usages);
|
| default:
|
| return Status::ErrorUnsupportedImportKeyFormat();
|
| }
|
| @@ -66,7 +66,7 @@ Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
|
| Status AesAlgorithm::ImportKeyRaw(const CryptoData& key_data,
|
| const blink::WebCryptoAlgorithm& algorithm,
|
| bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| + blink::WebCryptoKeyUsageMask usages,
|
| blink::WebCryptoKey* key) const {
|
| const unsigned int keylen_bytes = key_data.byte_length();
|
| Status status = VerifyAesKeyLengthForImport(keylen_bytes);
|
| @@ -80,23 +80,23 @@ Status AesAlgorithm::ImportKeyRaw(const CryptoData& key_data,
|
| key_data,
|
| blink::WebCryptoKeyAlgorithm::createAes(algorithm.id(), keylen_bits),
|
| extractable,
|
| - usage_mask,
|
| + usages,
|
| key);
|
| }
|
|
|
| Status AesAlgorithm::ImportKeyJwk(const CryptoData& key_data,
|
| const blink::WebCryptoAlgorithm& algorithm,
|
| bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| + blink::WebCryptoKeyUsageMask usages,
|
| blink::WebCryptoKey* key) const {
|
| std::vector<uint8_t> raw_data;
|
| Status status = ReadAesSecretKeyJwk(
|
| - key_data, jwk_suffix_, extractable, usage_mask, &raw_data);
|
| + key_data, jwk_suffix_, extractable, usages, &raw_data);
|
| if (status.IsError())
|
| return status;
|
|
|
| return ImportKeyRaw(
|
| - CryptoData(raw_data), algorithm, extractable, usage_mask, key);
|
| + CryptoData(raw_data), algorithm, extractable, usages, key);
|
| }
|
|
|
| Status AesAlgorithm::ExportKeyRaw(const blink::WebCryptoKey& key,
|
|
|