Skip to content

Commit

Permalink
Do it the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
yoe committed May 2, 2024
1 parent 503b3b8 commit b0e2145
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins_tools/eid-viewer/p11.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,13 @@ static int eid_vwr_p11_do_challenge_real(struct eid_vwr_challenge_responsedata *
//initialize the signature operation
check_rv(C_SignInit(session, &mechanism, hKey));

check_rv(C_Sign(session, p->challenge, (CK_ULONG)p->challengelen, p->response, &((CK_ULONG)(p->responselen))));
// We should really change struct
// eid_vwr_challenge_responsedata, but doing so changes
// the ABI of libeidviewer. Let's try to avoid that for
// now.
CK_ULONG resplen = 0;
check_rv(C_Sign(session, p->challenge, (CK_ULONG)p->challengelen, p->response, &(resplen)));
p->responselen = (size_t)resplen;

p->result = EID_VWR_RES_SUCCESS;
}
Expand Down

0 comments on commit b0e2145

Please sign in to comment.