Index: content/child/webcrypto/openssl/hmac_openssl.cc |
diff --git a/content/child/webcrypto/openssl/hmac_openssl.cc b/content/child/webcrypto/openssl/hmac_openssl.cc |
index 946a2bc7d1f2a7d66c6cfca2121d58f387d57e6b..46cca8424a1035ebcb1a5ed53584153d9e185121 100644 |
--- a/content/child/webcrypto/openssl/hmac_openssl.cc |
+++ b/content/child/webcrypto/openssl/hmac_openssl.cc |
@@ -72,9 +72,9 @@ class HmacImplementation : public AlgorithmImplementation { |
Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm, |
bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
+ blink::WebCryptoKeyUsageMask usages, |
GenerateKeyResult* result) const override { |
- Status status = CheckKeyCreationUsages(kAllKeyUsages, usage_mask); |
+ Status status = CheckKeyCreationUsages(kAllKeyUsages, usages); |
if (status.IsError()) |
return status; |
@@ -89,18 +89,18 @@ class HmacImplementation : public AlgorithmImplementation { |
return GenerateSecretKeyOpenSsl(blink::WebCryptoKeyAlgorithm::createHmac( |
params->hash().id(), keylen_bits), |
extractable, |
- usage_mask, |
+ usages, |
keylen_bits / 8, |
result); |
} |
Status VerifyKeyUsagesBeforeImportKey( |
blink::WebCryptoKeyFormat format, |
- blink::WebCryptoKeyUsageMask usage_mask) const override { |
+ blink::WebCryptoKeyUsageMask usages) const override { |
switch (format) { |
case blink::WebCryptoKeyFormatRaw: |
case blink::WebCryptoKeyFormatJwk: |
- return CheckKeyCreationUsages(kAllKeyUsages, usage_mask); |
+ return CheckKeyCreationUsages(kAllKeyUsages, usages); |
default: |
return Status::ErrorUnsupportedImportKeyFormat(); |
} |
@@ -109,7 +109,7 @@ class HmacImplementation : public AlgorithmImplementation { |
Status ImportKeyRaw(const CryptoData& key_data, |
const blink::WebCryptoAlgorithm& algorithm, |
bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
+ blink::WebCryptoKeyUsageMask usages, |
blink::WebCryptoKey* key) const override { |
const blink::WebCryptoAlgorithm& hash = |
algorithm.hmacImportParams()->hash(); |
@@ -124,14 +124,14 @@ class HmacImplementation : public AlgorithmImplementation { |
blink::WebCryptoKeyAlgorithm::createHmac( |
hash.id(), keylen_bits.ValueOrDie()), |
extractable, |
- usage_mask, |
+ usages, |
key); |
} |
Status ImportKeyJwk(const CryptoData& key_data, |
const blink::WebCryptoAlgorithm& algorithm, |
bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
+ blink::WebCryptoKeyUsageMask usages, |
blink::WebCryptoKey* key) const override { |
const char* algorithm_name = |
GetJwkHmacAlgorithmName(algorithm.hmacImportParams()->hash().id()); |
@@ -140,12 +140,12 @@ class HmacImplementation : public AlgorithmImplementation { |
std::vector<uint8_t> raw_data; |
Status status = ReadSecretKeyJwk( |
- key_data, algorithm_name, extractable, usage_mask, &raw_data); |
+ key_data, algorithm_name, 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 ExportKeyRaw(const blink::WebCryptoKey& key, |