diff options
author | Richard Levitte <levitte@openssl.org> | 2020-11-04 12:23:19 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-11-13 09:35:02 +0100 |
commit | 9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2 (patch) | |
tree | e82c26569e5a952980e65a746af920beed602aab /crypto/bn/bn_lib.c | |
parent | 31a6b52f6db009c639c67387a707dd235f29a430 (diff) | |
download | openssl-9311d0c471ca2eaa259e8c1bbbeb7c46394c7ba2.tar.gz |
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_lib.c')
-rw-r--r-- | crypto/bn/bn_lib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 13a52ccb29..28a3e91679 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -245,7 +245,7 @@ BIGNUM *BN_new(void) BIGNUM *ret; if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { - BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_BN, ERR_R_MALLOC_FAILURE); return NULL; } ret->flags = BN_FLG_MALLOCED; @@ -268,11 +268,11 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) BN_ULONG *a = NULL; if (words > (INT_MAX / (4 * BN_BITS2))) { - BNerr(BN_F_BN_EXPAND_INTERNAL, BN_R_BIGNUM_TOO_LONG); + ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG); return NULL; } if (BN_get_flags(b, BN_FLG_STATIC_DATA)) { - BNerr(BN_F_BN_EXPAND_INTERNAL, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA); + ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA); return NULL; } if (BN_get_flags(b, BN_FLG_SECURE)) @@ -280,7 +280,7 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) else a = OPENSSL_zalloc(words * sizeof(*a)); if (a == NULL) { - BNerr(BN_F_BN_EXPAND_INTERNAL, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_BN, ERR_R_MALLOC_FAILURE); return NULL; } @@ -966,7 +966,7 @@ BN_GENCB *BN_GENCB_new(void) BN_GENCB *ret; if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) { - BNerr(BN_F_BN_GENCB_NEW, ERR_R_MALLOC_FAILURE); + ERR_raise(ERR_LIB_BN, ERR_R_MALLOC_FAILURE); return NULL; } |