RSA_encrypt and RSA_sign_raw aren't the same.
Change-Id: Ie09ab12baf59b8c1d628396424ce6cadf43bf0e1 Reviewed-on: https://boringssl-review.googlesource.com/1913 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
a87941ad17
commit
5db5d4e2b0
@ -207,8 +207,8 @@ static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen,
|
|||||||
if (!setup_tbuf(rctx, ctx) ||
|
if (!setup_tbuf(rctx, ctx) ||
|
||||||
!RSA_padding_add_PKCS1_PSS_mgf1(rsa, rctx->tbuf, tbs, rctx->md,
|
!RSA_padding_add_PKCS1_PSS_mgf1(rsa, rctx->tbuf, tbs, rctx->md,
|
||||||
rctx->mgf1md, rctx->saltlen) ||
|
rctx->mgf1md, rctx->saltlen) ||
|
||||||
!RSA_encrypt(rsa, siglen, sig, *siglen, rctx->tbuf, key_len,
|
!RSA_sign_raw(rsa, siglen, sig, *siglen, rctx->tbuf, key_len,
|
||||||
RSA_NO_PADDING)) {
|
RSA_NO_PADDING)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user