Bug fix in verify_signature() when the buffer to verify is larger than 1025 bytes. In this case, the signature length given to C_VerifyFinal() was incorrect.

This commit is contained in:
alegon01 2019-02-01 09:10:02 +01:00
parent c3a9837b10
commit f412995811
1 changed files with 1 additions and 1 deletions

View File

@ -1985,7 +1985,7 @@ static void verify_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
r = read(fd, in_buffer, sizeof(in_buffer));
} while (r > 0);
sig_len = sizeof(sig_buffer);
sig_len = r2;
rv = p11->C_VerifyFinal(session, sig_buffer, sig_len);
if (rv != CKR_OK)
p11_fatal("C_VerifyFinal", rv);