summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_ssl.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-11-04 12:23:19 +0100
committerRichard Levitte <levitte@openssl.org>2020-11-13 09:35:02 +0100
commit9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch)
treee82c26569e5a952980e65a746af920beed602aab /crypto/rsa/rsa_ssl.c
parent31a6b52f6db009c639c67387a707dd235f29a430 (diff)
Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() call
This includes error reporting for libcrypto sub-libraries in surprising places. This was done using util/err-to-raise Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13318)
Diffstat (limited to 'crypto/rsa/rsa_ssl.c')
-rw-r--r--crypto/rsa/rsa_ssl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/rsa/rsa_ssl.c b/crypto/rsa/rsa_ssl.c
index 7e688aa9bc..0feef0f655 100644
--- a/crypto/rsa/rsa_ssl.c
+++ b/crypto/rsa/rsa_ssl.c
@@ -29,7 +29,7 @@ int ossl_rsa_padding_add_SSLv23_ex(OSSL_LIB_CTX *libctx, unsigned char *to,
unsigned char *p;
if (flen > (tlen - RSA_PKCS1_PADDING_SIZE)) {
- RSAerr(0, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
+ ERR_raise(ERR_LIB_RSA, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE);
return 0;
}
@@ -84,13 +84,13 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
return -1;
if (flen > num || num < RSA_PKCS1_PADDING_SIZE) {
- RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23, RSA_R_DATA_TOO_SMALL);
+ ERR_raise(ERR_LIB_RSA, RSA_R_DATA_TOO_SMALL);
return -1;
}
em = OPENSSL_malloc(num);
if (em == NULL) {
- RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_RSA, ERR_R_MALLOC_FAILURE);
return -1;
}
/*
@@ -176,7 +176,7 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen,
}
OPENSSL_clear_free(em, num);
- RSAerr(RSA_F_RSA_PADDING_CHECK_SSLV23, err);
+ ERR_raise(ERR_LIB_RSA, err);
err_clear_last_constant_time(1 & good);
return constant_time_select_int(good, mlen, -1);