Add support testMode=false since KM RPC version 3

Bug: 281661155
Change-Id: Ie727c327c10c6c48d72f9dc9689560f75e3d0131
This commit is contained in:
Joseph Jang
2023-05-11 08:30:01 +00:00
parent ebcdcdbc03
commit 5c15cfc8ec

View File

@@ -125,7 +125,8 @@ TEST_P(IdentityCredentialTests, verifyAttestationSuccessWithRemoteProvisioning)
MacedPublicKey macedPublicKey;
std::vector<uint8_t> attestationKey;
result = rpc->generateEcdsaP256KeyPair(/*testMode=*/true, &macedPublicKey, &attestationKey);
// Start by RPC version 3, we don't support testMode=true. So just verify testMode=false here.
result = rpc->generateEcdsaP256KeyPair(/*testMode=*/false, &macedPublicKey, &attestationKey);
ASSERT_TRUE(result.isOk()) << result.exceptionCode() << "; " << result.exceptionMessage();
optional<vector<vector<uint8_t>>> remotelyProvisionedCertChain =
@@ -176,7 +177,8 @@ TEST_P(IdentityCredentialTests, verifyRemotelyProvisionedKeyMayOnlyBeSetOnce) {
MacedPublicKey macedPublicKey;
std::vector<uint8_t> attestationKey;
result = rpc->generateEcdsaP256KeyPair(/*testMode=*/true, &macedPublicKey, &attestationKey);
// Start by RPC version 3, we don't support testMode=true. So just verify testMode=false here.
result = rpc->generateEcdsaP256KeyPair(/*testMode=*/false, &macedPublicKey, &attestationKey);
ASSERT_TRUE(result.isOk()) << result.exceptionCode() << "; " << result.exceptionMessage();
optional<vector<vector<uint8_t>>> remotelyProvisionedCertChain =