Skip to content

Commit 181d9f0

Browse files
committed
Fix XMSS and ML_DSA keygen type mismatch between image headers and keystore by unifying AUTH_KEY_*/KEYGEN_* constants
1 parent 9debc4c commit 181d9f0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/keytools/keygen.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ void keystore_add(uint32_t ktype, uint8_t *key, uint32_t sz, const char *keyfile
506506

507507
memset(&sl, 0, sizeof(sl));
508508
sl.slot_id = id_slot;
509+
if (ktype >= AUTH_KEY_NUM) {
510+
fprintf(stderr, "error: unknown key type %u\n", ktype);
511+
exit(1);
512+
}
509513
sl.key_type = ktype;
510514
sl.part_id_mask = id_mask;
511515

0 commit comments

Comments
 (0)