Index: content/child/webcrypto/test/rsa_ssa_unittest.cc |
diff --git a/content/child/webcrypto/test/rsa_ssa_unittest.cc b/content/child/webcrypto/test/rsa_ssa_unittest.cc |
index 0f3725356cb6e6dc3b6bd3bd938027125dcd0c0f..50c6cb095804c20e30e254d5467186b524369644 100644 |
--- a/content/child/webcrypto/test/rsa_ssa_unittest.cc |
+++ b/content/child/webcrypto/test/rsa_ssa_unittest.cc |
@@ -355,7 +355,7 @@ TEST(WebCryptoRsaSsaTest, GenerateKeyPairRsa) { |
CreateRsaHashedImportAlgorithm( |
blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, |
blink::WebCryptoAlgorithmIdSha256), |
- true, usages, &public_key)); |
+ true, blink::WebCryptoKeyUsageVerify, &public_key)); |
eroman
2014/12/05 20:45:51
sync the code, this has already changed:
https://
Habib Virji
2014/12/08 15:05:21
Done.
|
EXPECT_EQ(modulus_length, |
public_key.algorithm().rsaHashedParams()->modulusLengthBits()); |
@@ -369,7 +369,7 @@ TEST(WebCryptoRsaSsaTest, GenerateKeyPairRsa) { |
CreateRsaHashedImportAlgorithm( |
blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, |
blink::WebCryptoAlgorithmIdSha256), |
- true, usages, &private_key)); |
+ true, blink::WebCryptoKeyUsageSign, &private_key)); |
EXPECT_EQ(modulus_length, |
private_key.algorithm().rsaHashedParams()->modulusLengthBits()); |
} |
@@ -949,12 +949,17 @@ TEST(WebCryptoRsaSsaTest, ImportInvalidKeyData) { |
std::string test_error; |
ASSERT_TRUE(test->GetString("error", &test_error)); |
+ blink::WebCryptoKeyUsage keyUsage = blink::WebCryptoKeyUsageSign; |
+ if (key_format == blink::WebCryptoKeyFormatSpki) |
+ keyUsage = blink::WebCryptoKeyUsageVerify; |
+ |
blink::WebCryptoKey key; |
Status status = ImportKey(key_format, CryptoData(key_data), |
CreateRsaHashedImportAlgorithm( |
blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, |
blink::WebCryptoAlgorithmIdSha256), |
- true, 0, &key); |
+ true, keyUsage, &key); |
+ |
EXPECT_EQ(test_error, StatusToString(status)); |
} |
} |