Skip to content

Commit 02d99bc

Browse files
authored
Merge pull request #91 from ColtonWilley/wp_rsa_x931_fix
Zero pad to signature length for RSA X931
2 parents 051a027 + b29c527 commit 02d99bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp_rsa_sig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static int wp_rsa_sign_x931(wp_RsaSigCtx* ctx, unsigned char* sig,
858858
ok = 0;
859859
}
860860
else if (mp_cmp(&toMp, &nMinusTo) == MP_GT) {
861-
rc = mp_to_unsigned_bin(&nMinusTo, sig);
861+
rc = mp_to_unsigned_bin_len(&nMinusTo, sig, *sigLen);
862862
if (rc != MP_OKAY) {
863863
ok = 0;
864864
}

0 commit comments

Comments
 (0)