Skip to content

Commit

Permalink
fix ed25519 signing in PIV
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed Dec 20, 2024
1 parent 636ab67 commit aa0a466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion applets/piv/piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static int piv_general_authenticate(const CAPDU *capdu, RAPDU *rapdu) {
len[IDX_CHALLENGE]);
memzero(DATA + pos[IDX_CHALLENGE], PRIVATE_KEY_LENGTH[key.meta.type] - len[IDX_CHALLENGE]);
}
int sig_len = ck_sign(&key, DATA + pos[IDX_CHALLENGE], PRIVATE_KEY_LENGTH[key.meta.type], RDATA + 4);
int sig_len = ck_sign(&key, DATA + pos[IDX_CHALLENGE], len[IDX_CHALLENGE], RDATA + 4);
if (sig_len < 0) {
ERR_MSG("Sign failed\n");
return -1;
Expand Down

0 comments on commit aa0a466

Please sign in to comment.