Merge "Fix Keymaster VTS for OpenSSL error code change" am: fc23356909

am: f9fceff665

Change-Id: I31e9a6f5da3e894287dbb76d94b766e236767a63
This commit is contained in:
Iris Chang 2017-11-22 02:06:23 +00:00 committed by android-build-merger
commit 11fab4809b

View file

@ -2762,7 +2762,8 @@ TEST_F(EncryptionOperationsTest, RsaOaepTooLarge) {
Begin(KeyPurpose::ENCRYPT,
AuthorizationSetBuilder().Padding(PaddingMode::RSA_OAEP).Digest(Digest::SHA1)));
string result;
EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
auto error = Finish(message, &result);
EXPECT_TRUE(error == ErrorCode::INVALID_INPUT_LENGTH || error == ErrorCode::INVALID_ARGUMENT);
EXPECT_EQ(0U, result.size());
}
@ -2820,7 +2821,8 @@ TEST_F(EncryptionOperationsTest, RsaPkcs1TooLarge) {
auto params = AuthorizationSetBuilder().Padding(PaddingMode::RSA_PKCS1_1_5_ENCRYPT);
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::ENCRYPT, params));
string result;
EXPECT_EQ(ErrorCode::INVALID_INPUT_LENGTH, Finish(message, &result));
auto error = Finish(message, &result);
EXPECT_TRUE(error == ErrorCode::INVALID_INPUT_LENGTH || error == ErrorCode::INVALID_ARGUMENT);
EXPECT_EQ(0U, result.size());
}