summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_mpi.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/bn/bn_mpi.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/bn/bn_mpi.c')
-rw-r--r--crypto/bn/bn_mpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bn/bn_mpi.c b/crypto/bn/bn_mpi.c
index b8e92e1263..4eba0ae570 100644
--- a/crypto/bn/bn_mpi.c
+++ b/crypto/bn/bn_mpi.c
@@ -46,13 +46,13 @@ BIGNUM *BN_mpi2bn(const unsigned char *d, int n, BIGNUM *ain)
BIGNUM *a = NULL;
if (n < 4 || (d[0] & 0x80) != 0) {
- BNerr(BN_F_BN_MPI2BN, BN_R_INVALID_LENGTH);
+ ERR_raise(ERR_LIB_BN, BN_R_INVALID_LENGTH);
return NULL;
}
len = ((long)d[0] << 24) | ((long)d[1] << 16) | ((int)d[2] << 8) | (int)
d[3];
if ((len + 4) != n) {
- BNerr(BN_F_BN_MPI2BN, BN_R_ENCODING_ERROR);
+ ERR_raise(ERR_LIB_BN, BN_R_ENCODING_ERROR);
return NULL;
}