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

Commit 9507f9b3 authored by Shawn Willden's avatar Shawn Willden Committed by Automerger Merge Worker
Browse files

Update to support keymaster's configurable version. am: 66b1cfaa am: 4c8b0568

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

Change-Id: Ic6d4167f51d25d6c96c1889035804fb45efbfb48
parents e7d73fda 4c8b0568
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -1023,11 +1023,12 @@ optional<vector<vector<uint8_t>>> createAttestation(
    // 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(KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);
    ::keymaster::PureSoftKeymasterContext context(::keymaster::KmVersion::KEYMASTER_4_1,
                                                  KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);


    error = generate_attestation_from_EVP(key, swEnforced, hwEnforced, auth_set, context,
    error = generate_attestation_from_EVP(key, swEnforced, hwEnforced, auth_set, context,
                                          ::keymaster::kCurrentKeymasterVersion, *attestation_chain,
                                          *attestation_chain, *attestation_signing_key,
                                          *attestation_signing_key, &cert_chain_out);
                                          &cert_chain_out);


    if (KM_ERROR_OK != error || !cert_chain_out) {
    if (KM_ERROR_OK != error || !cert_chain_out) {
        LOG(ERROR) << "Error generate attestation from EVP key" << error;
        LOG(ERROR) << "Error generate attestation from EVP key" << error;
@@ -2402,7 +2403,6 @@ vector<vector<uint8_t>> chunkVector(const vector<uint8_t>& content, size_t maxCh
    return ret;
    return ret;
}
}



vector<uint8_t> testHardwareBoundKey = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
vector<uint8_t> testHardwareBoundKey = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};


const vector<uint8_t>& getTestHardwareBoundKey() {
const vector<uint8_t>& getTestHardwareBoundKey() {