Breaking: wero-pad key identifiers

Fixes #137
This commit is contained in:
Frank Denis 2023-12-17 22:04:32 +01:00
parent 7d1116c5cc
commit ef2db96ae0

View file

@ -461,9 +461,9 @@ verify(PubkeyStruct *pubkey_struct, const char *message_file, const char *sig_fi
if (memcmp(sig_struct->keynum, pubkey_struct->keynum_pk.keynum, sizeof sig_struct->keynum) !=
0) {
fprintf(stderr,
"Signature key id in %s is %" PRIX64
"Signature key id in %s is %016" PRIX64
"\n"
"but the key id in the public key is %" PRIX64 "\n",
"but the key id in the public key is %016" PRIX64 "\n",
sig_file, le64_load(sig_struct->keynum),
le64_load(pubkey_struct->keynum_pk.keynum));
exit(1);
@ -662,7 +662,7 @@ write_pk_file(const char *pk_file, const PubkeyStruct *pubkey_struct)
if ((fp = fopen(pk_file, "w")) == NULL) {
exit_err(pk_file);
}
xfprintf(fp, COMMENT_PREFIX "minisign public key %" PRIX64 "\n",
xfprintf(fp, COMMENT_PREFIX "minisign public key %016" PRIX64 "\n",
le64_load(pubkey_struct->keynum_pk.keynum));
xfput_b64(fp, (const unsigned char *) (const void *) pubkey_struct, sizeof *pubkey_struct);
xfclose(fp);