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

Commit 83691500 authored by Tommy Chiu's avatar Tommy Chiu
Browse files

Correct UseHmacKey parameter

HMAC key was created with Digest(Digest::SHA_2_256) which is missing in
the UseHmacKey function

Bug: 152932473
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: If63dd197fe12172e14be9890ab07a00c3eef4a4c
parent a826b013
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -115,7 +115,9 @@ class Keymaster4_1HidlTest : public V4_0::test::KeymasterHidlTest {
    ErrorCode UseHmacKey(const HidlBuf& hmacKeyBlob) {
        auto [result, mac, out_params] =
                ProcessMessage(hmacKeyBlob, KeyPurpose::SIGN, "1234567890123456",
                               AuthorizationSetBuilder().Authorization(TAG_MAC_LENGTH, 128));
                               AuthorizationSetBuilder()
                                       .Authorization(TAG_MAC_LENGTH, 128)
                                       .Digest(Digest::SHA_2_256));
        return result;
    }