Index: content/child/webcrypto/test/hmac_unittest.cc |
diff --git a/content/child/webcrypto/test/hmac_unittest.cc b/content/child/webcrypto/test/hmac_unittest.cc |
index 5ab559b2ee2910880008d3f643554215f2402746..d57116c01bd83d5cc454d7fae96995b43a0614db 100644 |
--- a/content/child/webcrypto/test/hmac_unittest.cc |
+++ b/content/child/webcrypto/test/hmac_unittest.cc |
@@ -121,9 +121,7 @@ |
blink::WebCryptoKey key; |
blink::WebCryptoAlgorithm algorithm = |
CreateHmacKeyGenAlgorithm(blink::WebCryptoAlgorithmIdSha1, 512); |
- ASSERT_EQ( |
- Status::Success(), |
- GenerateSecretKey(algorithm, true, blink::WebCryptoKeyUsageSign, &key)); |
+ ASSERT_EQ(Status::Success(), GenerateSecretKey(algorithm, true, 0, &key)); |
EXPECT_FALSE(key.isNull()); |
EXPECT_TRUE(key.handle()); |
EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); |
@@ -148,9 +146,7 @@ |
blink::WebCryptoKey key; |
blink::WebCryptoAlgorithm algorithm = |
CreateHmacKeyGenAlgorithm(blink::WebCryptoAlgorithmIdSha1, 0); |
- ASSERT_EQ( |
- Status::Success(), |
- GenerateSecretKey(algorithm, true, blink::WebCryptoKeyUsageSign, &key)); |
+ ASSERT_EQ(Status::Success(), GenerateSecretKey(algorithm, true, 0, &key)); |
EXPECT_TRUE(key.handle()); |
EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); |
EXPECT_EQ(blink::WebCryptoAlgorithmIdHmac, key.algorithm().id()); |
@@ -168,9 +164,7 @@ |
blink::WebCryptoKey key; |
blink::WebCryptoAlgorithm algorithm = |
CreateHmacKeyGenAlgorithm(blink::WebCryptoAlgorithmIdSha512, 0); |
- ASSERT_EQ( |
- Status::Success(), |
- GenerateSecretKey(algorithm, true, blink::WebCryptoKeyUsageSign, &key)); |
+ ASSERT_EQ(Status::Success(), GenerateSecretKey(algorithm, true, 0, &key)); |
EXPECT_EQ(blink::WebCryptoAlgorithmIdHmac, key.algorithm().id()); |
EXPECT_EQ(blink::WebCryptoAlgorithmIdSha512, |
key.algorithm().hmacParams()->hash().id()); |
@@ -179,14 +173,6 @@ |
ASSERT_EQ(Status::Success(), |
ExportKey(blink::WebCryptoKeyFormatRaw, key, &raw_key)); |
EXPECT_EQ(128U, raw_key.size()); |
-} |
- |
-TEST(WebCryptoHmacTest, GenerateKeyEmptyUsage) { |
- blink::WebCryptoKey key; |
- blink::WebCryptoAlgorithm algorithm = |
- CreateHmacKeyGenAlgorithm(blink::WebCryptoAlgorithmIdSha512, 0); |
- ASSERT_EQ(Status::ErrorCreateKeyEmptyUsages(), |
- GenerateSecretKey(algorithm, true, 0, &key)); |
} |
TEST(WebCryptoHmacTest, ImportKeyJwkKeyOpsSignVerify) { |