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

Commit 96a5d152 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Update the TimeoutAuthenticationMultiSid test" into main am: d99d7730

parents d699154b d99d7730
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -453,8 +453,18 @@ TEST_P(AuthTest, TimeoutAuthenticationMultiSid) {
    vector<uint8_t> keyblob;
    vector<KeyCharacteristics> key_characteristics;
    vector<Certificate> cert_chain;
    ASSERT_EQ(ErrorCode::OK,
              GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain));
    auto result = GenerateKey(builder, std::nullopt, &keyblob, &key_characteristics, &cert_chain);
    if (SecLevel() == SecurityLevel::STRONGBOX) {
        if (result == ErrorCode::ATTESTATION_KEYS_NOT_PROVISIONED) {
            result = GenerateKeyWithSelfSignedAttestKey(AuthorizationSetBuilder()
                                                                .EcdsaKey(EcCurve::P_256)
                                                                .AttestKey()
                                                                .SetDefaultValidity(),
                                                        builder, &keyblob, &key_characteristics,
                                                        &cert_chain);
        }
    }
    ASSERT_EQ(ErrorCode::OK, result);

    // Verify first user to get a HAT that should work.
    const uint64_t challenge = 42;