Skip to content

Commit

Permalink
sync with liboqs
Browse files Browse the repository at this point in the history
Signed-off-by: Basil Hess <[email protected]>
  • Loading branch information
bhess committed Nov 14, 2024
1 parent ae18305 commit 05a6040
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions oqsprov/oqs_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ static int oqs_sig_sign(void *vpoqs_sigctx, unsigned char *sig, size_t *siglen,
buf = OPENSSL_malloc(oqs_sig_len);
if (OQS_SIG_sign(oqs_key, buf, &oqs_sig_len,
(const unsigned char *)final_tbs, final_tbslen,
NULL, 0,
oqsxkey->comp_privkey[i]) != OQS_SUCCESS) {
ERR_raise(ERR_LIB_USER, OQSPROV_R_SIGNING_FAILED);
CompositeSignature_free(compsig);
Expand Down Expand Up @@ -668,7 +667,6 @@ static int oqs_sig_sign(void *vpoqs_sigctx, unsigned char *sig, size_t *siglen,
CompositeSignature_free(compsig);
OPENSSL_free(final_tbs);
} else if (OQS_SIG_sign(oqs_key, sig + index, &oqs_sig_len, tbs, tbslen,
NULL, 0,
oqsxkey->comp_privkey[oqsxkey->numkeys - 1]) !=
OQS_SUCCESS) {
ERR_raise(ERR_LIB_USER, OQSPROV_R_SIGNING_FAILED);
Expand Down Expand Up @@ -881,7 +879,7 @@ static int oqs_sig_verify(void *vpoqs_sigctx, const unsigned char *sig,

if (get_oqsname_fromtls(name)) {
if (OQS_SIG_verify(oqs_key, (const unsigned char *)final_tbs,
final_tbslen, buf, buf_len, NULL, 0,
final_tbslen, buf, buf_len,
oqsxkey->comp_pubkey[i]) != OQS_SUCCESS) {
ERR_raise(ERR_LIB_USER, OQSPROV_R_VERIFY_ERROR);
OPENSSL_free(name);
Expand Down Expand Up @@ -997,7 +995,7 @@ static int oqs_sig_verify(void *vpoqs_sigctx, const unsigned char *sig,
goto endverify;
}
if (OQS_SIG_verify(oqs_key, tbs, tbslen, sig + index,
siglen - classical_sig_len, NULL, 0,
siglen - classical_sig_len,
oqsxkey->comp_pubkey[oqsxkey->numkeys - 1]) !=
OQS_SUCCESS) {
ERR_raise(ERR_LIB_USER, OQSPROV_R_VERIFY_ERROR);
Expand Down

0 comments on commit 05a6040

Please sign in to comment.