Merge "Don't require UNKNOWN_ERROR" into main am: 606a406750 am: 6375a4ce87 am: 397045494b am: d802e0c06a am: 1850286df1

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2757927

Change-Id: I281f55a3e8f0759429a27f0b4d4bea71505d3560
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-09-21 22:21:25 +00:00 committed by Automerger Merge Worker
commit 6f54a2ab47

View file

@ -4797,7 +4797,7 @@ TEST_P(ImportKeyTest, RsaOaepMGFDigestSuccess) {
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params)); EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext1, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }
} }
@ -5305,7 +5305,7 @@ TEST_P(EncryptionOperationsTest, RsaOaepSuccess) {
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params)); EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext1, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }
} }
@ -5372,7 +5372,7 @@ TEST_P(EncryptionOperationsTest, RsaOaepDecryptWithWrongDigest) {
.Digest(Digest::SHA_2_256) .Digest(Digest::SHA_2_256)
.Padding(PaddingMode::RSA_OAEP))); .Padding(PaddingMode::RSA_OAEP)));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }
@ -5442,7 +5442,7 @@ TEST_P(EncryptionOperationsTest, RsaOaepWithMGFDigestSuccess) {
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params)); EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext1, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }
} }
@ -5486,7 +5486,7 @@ TEST_P(EncryptionOperationsTest, RsaOaepMGFDigestDefaultSuccess) {
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params)); EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }
@ -5618,7 +5618,7 @@ TEST_P(EncryptionOperationsTest, RsaPkcs1Success) {
EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params)); EXPECT_EQ(ErrorCode::OK, Begin(KeyPurpose::DECRYPT, params));
string result; string result;
EXPECT_EQ(ErrorCode::UNKNOWN_ERROR, Finish(ciphertext1, &result)); EXPECT_NE(ErrorCode::OK, Finish(ciphertext1, &result));
EXPECT_EQ(0U, result.size()); EXPECT_EQ(0U, result.size());
} }