summaryrefslogtreecommitdiff
path: root/identity/support/src/IdentityCredentialSupport.cpp
diff options
context:
space:
mode:
authorDavid Zeuthen <zeuthen@google.com>2021-06-01 09:51:30 -0400
committerDavid Zeuthen <zeuthen@google.com>2021-06-01 09:57:48 -0400
commita0752ce6debf913b8c91ccecc33c76fec6adf67f (patch)
tree0e1f084b7b7f9cf1eea0849c7053c564244f0ce9 /identity/support/src/IdentityCredentialSupport.cpp
parent25e701b91542398a196933d3b32beac9ccea9cd0 (diff)
identity: Fix VTS test failure caused by unrelated change to system/keymaster.
Bug: 189447009 Test: atest VtsHalIdentityTargetTest Test: atest CtsIdentityTestCases Change-Id: I58426f1551efa920909c759cf5e10f44c6cfc5d4
Diffstat (limited to 'identity/support/src/IdentityCredentialSupport.cpp')
-rw-r--r--identity/support/src/IdentityCredentialSupport.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/identity/support/src/IdentityCredentialSupport.cpp b/identity/support/src/IdentityCredentialSupport.cpp
index 4547624fde..7f4674d24a 100644
--- a/identity/support/src/IdentityCredentialSupport.cpp
+++ b/identity/support/src/IdentityCredentialSupport.cpp
@@ -644,7 +644,7 @@ optional<vector<vector<uint8_t>>> createAttestation(
// the VTS tests. Of course, this is a pretend-only game since hopefully no
// relying party is ever going to trust our batch key and those keys above
// it.
- ::keymaster::PureSoftKeymasterContext context(::keymaster::KmVersion::KEYMASTER_4_1,
+ ::keymaster::PureSoftKeymasterContext context(::keymaster::KmVersion::KEYMINT_1,
KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);
keymaster_error_t error;
@@ -682,10 +682,9 @@ optional<vector<vector<uint8_t>>> createAttestation(
i2d_X509_NAME(subjectName.get(), &subjectPtr);
- uint64_t nowMilliSeconds = time(nullptr) * 1000;
::keymaster::AuthorizationSet auth_set(
::keymaster::AuthorizationSetBuilder()
- .Authorization(::keymaster::TAG_CERTIFICATE_NOT_BEFORE, nowMilliSeconds)
+ .Authorization(::keymaster::TAG_CERTIFICATE_NOT_BEFORE, activeTimeMilliSeconds)
.Authorization(::keymaster::TAG_CERTIFICATE_NOT_AFTER, expireTimeMilliSeconds)
.Authorization(::keymaster::TAG_ATTESTATION_CHALLENGE, challenge.data(),
challenge.size())