Fix XMSS and ML_DSA keygen type mismatch between image headers and keystore by unifying AUTH_KEY_*/KEYGEN_* constants

pull/765/head
Brett Nicholas 2026-03-27 10:22:20 -06:00 committed by Daniele Lacamera
parent b796d9029c
commit 401c034690
1 changed files with 4 additions and 0 deletions

View File

@ -506,6 +506,10 @@ void keystore_add(uint32_t ktype, uint8_t *key, uint32_t sz, const char *keyfile
memset(&sl, 0, sizeof(sl));
sl.slot_id = id_slot;
if (ktype >= AUTH_KEY_NUM) {
fprintf(stderr, "error: unknown key type %u\n", ktype);
exit(1);
}
sl.key_type = ktype;
sl.part_id_mask = id_mask;