diff options
author | OMOJOLA <omojolajoshua@gmail.com> | 2023-05-05 00:21:04 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-05-05 14:07:10 +0200 |
commit | d685a5f6a4ae8f9eaea1d1c5c78171a915f3b16d (patch) | |
tree | a939ce62470a0dcfa219650241b6643b46bc199a /src/test | |
parent | man: small fixes to systemd.time Calendar Events (diff) | |
download | systemd-d685a5f6a4ae8f9eaea1d1c5c78171a915f3b16d.tar.xz systemd-d685a5f6a4ae8f9eaea1d1c5c78171a915f3b16d.zip |
tpm2 PCRs: fix unchecked attempt to set PCR[24]
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-tpm2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-tpm2.c b/src/test/test-tpm2.c index 3e989251d8..fb23d4319a 100644 --- a/src/test/test-tpm2.c +++ b/src/test/test-tpm2.c @@ -33,7 +33,7 @@ TEST(tpm2_mask_from_string) { test_tpm2_pcr_mask_from_string_one("sysexts,shim-policy+kernel-boot", 26624, 0); test_tpm2_pcr_mask_from_string_one("sysexts,shim+kernel-boot", 0, -EINVAL); test_tpm2_pcr_mask_from_string_one("sysexts+17+23", 8527872, 0); - test_tpm2_pcr_mask_from_string_one("debug+24", 16842752, 0); + test_tpm2_pcr_mask_from_string_one("debug+24", 0, -EINVAL); } TEST(pcr_index_from_string) { @@ -73,6 +73,7 @@ TEST(pcr_index_from_string) { assert_se(pcr_index_from_string("8") == 8); assert_se(pcr_index_from_string("44") == -EINVAL); assert_se(pcr_index_from_string("-5") == -EINVAL); + assert_se(pcr_index_from_string("24") == -EINVAL); } TEST(tpm2_util_pbkdf2_hmac_sha256) { |