Merge "Fix nonce uniqueness tests" into main am: 8d333ff410
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2758146 Change-Id: Ifc31204eaea700e50e8ac0601fa77911b590b65c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
2abfe4abc7
2 changed files with 2 additions and 2 deletions
|
@ -137,7 +137,7 @@ TEST_P(HmacKeySharingTest, ComputeSharedHmac) {
|
||||||
auto nonces = copyNonces(params);
|
auto nonces = copyNonces(params);
|
||||||
EXPECT_EQ(allKeymasters().size(), nonces.size());
|
EXPECT_EQ(allKeymasters().size(), nonces.size());
|
||||||
std::sort(nonces.begin(), nonces.end());
|
std::sort(nonces.begin(), nonces.end());
|
||||||
std::unique(nonces.begin(), nonces.end());
|
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
|
||||||
EXPECT_EQ(allKeymasters().size(), nonces.size());
|
EXPECT_EQ(allKeymasters().size(), nonces.size());
|
||||||
|
|
||||||
auto responses = computeSharedHmac(allKeymasters(), params);
|
auto responses = computeSharedHmac(allKeymasters(), params);
|
||||||
|
|
|
@ -164,7 +164,7 @@ TEST_F(SharedSecretAidlTest, ComputeSharedSecret) {
|
||||||
auto nonces = copyNonces(params);
|
auto nonces = copyNonces(params);
|
||||||
EXPECT_EQ(sharedSecrets.size(), nonces.size());
|
EXPECT_EQ(sharedSecrets.size(), nonces.size());
|
||||||
std::sort(nonces.begin(), nonces.end());
|
std::sort(nonces.begin(), nonces.end());
|
||||||
std::unique(nonces.begin(), nonces.end());
|
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
|
||||||
EXPECT_EQ(sharedSecrets.size(), nonces.size());
|
EXPECT_EQ(sharedSecrets.size(), nonces.size());
|
||||||
|
|
||||||
auto responses = computeAllSharedSecrets(params);
|
auto responses = computeAllSharedSecrets(params);
|
||||||
|
|
Loading…
Reference in a new issue