Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c86b058 authored by David Zeuthen's avatar David Zeuthen Committed by Automerger Merge Worker
Browse files

identity: Fix VTS test failure caused by unrelated change to system/keymaster. am: b098e79d

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

Change-Id: I0942d22e2e578aff0bfbb7fbf6f2903ce509f85f
parents 55c19239 b098e79d
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -644,7 +644,7 @@ optional<vector<vector<uint8_t>>> createAttestation(
    // the VTS tests. Of course, this is a pretend-only game since hopefully no
    // 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
    // relying party is ever going to trust our batch key and those keys above
    // it.
    // it.
    ::keymaster::PureSoftKeymasterContext context(::keymaster::KmVersion::KEYMASTER_4_1,
    ::keymaster::PureSoftKeymasterContext context(::keymaster::KmVersion::KEYMINT_1,
                                                  KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);
                                                  KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);


    keymaster_error_t error;
    keymaster_error_t error;
@@ -682,10 +682,9 @@ optional<vector<vector<uint8_t>>> createAttestation(


    i2d_X509_NAME(subjectName.get(), &subjectPtr);
    i2d_X509_NAME(subjectName.get(), &subjectPtr);


    uint64_t nowMilliSeconds = time(nullptr) * 1000;
    ::keymaster::AuthorizationSet auth_set(
    ::keymaster::AuthorizationSet auth_set(
            ::keymaster::AuthorizationSetBuilder()
            ::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_CERTIFICATE_NOT_AFTER, expireTimeMilliSeconds)
                    .Authorization(::keymaster::TAG_ATTESTATION_CHALLENGE, challenge.data(),
                    .Authorization(::keymaster::TAG_ATTESTATION_CHALLENGE, challenge.data(),
                                   challenge.size())
                                   challenge.size())