summaryrefslogtreecommitdiff
path: root/crypto/dh/dh_gen.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/dh/dh_gen.c
parent31a6b52f6db009c639c67387a707dd235f29a430 (diff)
downloadopenssl-new-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/dh/dh_gen.c')
-rw-r--r--crypto/dh/dh_gen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c
index 8ed7120653..bdc0dc79b8 100644
--- a/crypto/dh/dh_gen.c
+++ b/crypto/dh/dh_gen.c
@@ -160,12 +160,12 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
BN_CTX *ctx = NULL;
if (prime_len > OPENSSL_DH_MAX_MODULUS_BITS) {
- DHerr(DH_F_DH_BUILTIN_GENPARAMS, DH_R_MODULUS_TOO_LARGE);
+ ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE);
return 0;
}
if (prime_len < DH_MIN_MODULUS_BITS) {
- DHerr(DH_F_DH_BUILTIN_GENPARAMS, DH_R_MODULUS_TOO_SMALL);
+ ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_SMALL);
return 0;
}
@@ -185,7 +185,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
goto err;
if (generator <= 1) {
- DHerr(DH_F_DH_BUILTIN_GENPARAMS, DH_R_BAD_GENERATOR);
+ ERR_raise(ERR_LIB_DH, DH_R_BAD_GENERATOR);
goto err;
}
if (generator == DH_GENERATOR_2) {
@@ -223,7 +223,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
ok = 1;
err:
if (ok == -1) {
- DHerr(DH_F_DH_BUILTIN_GENPARAMS, ERR_R_BN_LIB);
+ ERR_raise(ERR_LIB_DH, ERR_R_BN_LIB);
ok = 0;
}