From 5db5d4e2b075f46ca80698a8baf168b8b7e5d60f Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 9 Oct 2014 16:47:56 -0400 Subject: [PATCH] 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 --- crypto/evp/p_rsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/evp/p_rsa.c b/crypto/evp/p_rsa.c index bcaca4b5..1c42fbd2 100644 --- a/crypto/evp/p_rsa.c +++ b/crypto/evp/p_rsa.c @@ -207,8 +207,8 @@ static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, uint8_t *sig, size_t *siglen, if (!setup_tbuf(rctx, ctx) || !RSA_padding_add_PKCS1_PSS_mgf1(rsa, rctx->tbuf, tbs, rctx->md, rctx->mgf1md, rctx->saltlen) || - !RSA_encrypt(rsa, siglen, sig, *siglen, rctx->tbuf, key_len, - RSA_NO_PADDING)) { + !RSA_sign_raw(rsa, siglen, sig, *siglen, rctx->tbuf, key_len, + RSA_NO_PADDING)) { return 0; } return 1;