summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-02-11 12:55:19 +0100
committerRichard Levitte <levitte@openssl.org>2021-02-12 14:02:06 +0100
commitc5689319ebcb5356a28c297779094f3208f925f8 (patch)
tree3f75bf478364464bce24d17bc285233a1d81ae22 /providers
parentUpdate documentation following deprecation of SRP (diff)
downloadopenssl-c5689319ebcb5356a28c297779094f3208f925f8.tar.xz
openssl-c5689319ebcb5356a28c297779094f3208f925f8.zip
Use ERR_R_*_LIB instead of ERR_LIB_* as reason code for sub-libraries
Using ERR_LIB_* causes the error output to say 'reason(n)' instead of the name of the sub-library in question. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14152)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/signature/rsa.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/providers/implementations/signature/rsa.c b/providers/implementations/signature/rsa.c
index cb68de3b3e..98e3a2d1f4 100644
--- a/providers/implementations/signature/rsa.c
+++ b/providers/implementations/signature/rsa.c
@@ -517,7 +517,7 @@ static int rsa_sign(void *vprsactx, unsigned char *sig, size_t *siglen,
prsactx->rsa);
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret = sltmp;
@@ -550,7 +550,7 @@ static int rsa_sign(void *vprsactx, unsigned char *sig, size_t *siglen,
ret = RSA_sign(prsactx->mdnid, tbs, tbslen, sig, &sltmp,
prsactx->rsa);
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret = sltmp;
@@ -592,7 +592,7 @@ static int rsa_sign(void *vprsactx, unsigned char *sig, size_t *siglen,
prsactx->tbuf, tbs,
prsactx->md, prsactx->mgf1_md,
prsactx->saltlen)) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret = RSA_private_encrypt(RSA_size(prsactx->rsa), prsactx->tbuf,
@@ -614,7 +614,7 @@ static int rsa_sign(void *vprsactx, unsigned char *sig, size_t *siglen,
end:
#endif
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
@@ -655,7 +655,7 @@ static int rsa_verify_recover(void *vprsactx,
ret = RSA_public_decrypt(siglen, sig, prsactx->tbuf, prsactx->rsa,
RSA_X931_PADDING);
if (ret < 1) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret--;
@@ -689,7 +689,7 @@ static int rsa_verify_recover(void *vprsactx,
ret = int_rsa_verify(prsactx->mdnid, NULL, 0, rout, &sltmp,
sig, siglen, prsactx->rsa);
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret = sltmp;
@@ -705,7 +705,7 @@ static int rsa_verify_recover(void *vprsactx,
ret = RSA_public_decrypt(siglen, sig, rout, prsactx->rsa,
prsactx->pad_mode);
if (ret < 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
}
@@ -733,7 +733,7 @@ static int rsa_verify(void *vprsactx, const unsigned char *sig, size_t siglen,
case RSA_PKCS1_PADDING:
if (!RSA_verify(prsactx->mdnid, tbs, tbslen, sig, siglen,
prsactx->rsa)) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
return 1;
@@ -766,7 +766,7 @@ static int rsa_verify(void *vprsactx, const unsigned char *sig, size_t siglen,
ret = RSA_public_decrypt(siglen, sig, prsactx->tbuf,
prsactx->rsa, RSA_NO_PADDING);
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
ret = RSA_verify_PKCS1_PSS_mgf1(prsactx->rsa, tbs,
@@ -774,7 +774,7 @@ static int rsa_verify(void *vprsactx, const unsigned char *sig, size_t siglen,
prsactx->tbuf,
prsactx->saltlen);
if (ret <= 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
return 1;
@@ -790,7 +790,7 @@ static int rsa_verify(void *vprsactx, const unsigned char *sig, size_t siglen,
rslen = RSA_public_decrypt(siglen, sig, prsactx->tbuf, prsactx->rsa,
prsactx->pad_mode);
if (rslen == 0) {
- ERR_raise(ERR_LIB_PROV, ERR_LIB_RSA);
+ ERR_raise(ERR_LIB_PROV, ERR_R_RSA_LIB);
return 0;
}
}