diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-08-26 10:04:01 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-11-23 18:21:43 +0100 |
commit | cb6f8ae4638ecd1177a166c0bfd704e38ab844ff (patch) | |
tree | 988c111274597fe96116b2d3f90622ec12d6de25 /crypto/ec | |
parent | 98e3f4e9d0a3562ac61076612b55178d6c4ea9d4 (diff) | |
download | openssl-new-cb6f8ae4638ecd1177a166c0bfd704e38ab844ff.tar.gz |
ERR: replace remnant ECerr() and EVPerr() calls in crypto/
except those throwing ERR_R_MALLOC_FAILURE
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/19302)
(cherry picked from commit bd07cc1c7e3ca38689e59868b5945dc223235a49)
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec_backend.c | 2 | ||||
-rw-r--r-- | crypto/ec/ec_lib.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/ec/ec_backend.c b/crypto/ec/ec_backend.c index 39885a2a55..e159ba0c61 100644 --- a/crypto/ec/ec_backend.c +++ b/crypto/ec/ec_backend.c @@ -524,7 +524,7 @@ static int ec_key_point_format_fromdata(EC_KEY *ec, const OSSL_PARAM params[]) p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT); if (p != NULL) { if (!ossl_ec_pt_format_param2id(p, &format)) { - ECerr(0, EC_R_INVALID_FORM); + ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM); return 0; } EC_KEY_set_conv_form(ec, format); diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index b1696d93bd..a84e088c19 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -1507,7 +1507,7 @@ int ossl_ec_group_set_params(EC_GROUP *group, const OSSL_PARAM params[]) p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT); if (p != NULL) { if (!ossl_ec_pt_format_param2id(p, &format)) { - ECerr(0, EC_R_INVALID_FORM); + ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM); return 0; } EC_GROUP_set_point_conversion_form(group, format); @@ -1516,7 +1516,7 @@ int ossl_ec_group_set_params(EC_GROUP *group, const OSSL_PARAM params[]) p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING); if (p != NULL) { if (!ossl_ec_encoding_param2id(p, &encoding_flag)) { - ECerr(0, EC_R_INVALID_FORM); + ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM); return 0; } EC_GROUP_set_asn1_flag(group, encoding_flag); @@ -1527,7 +1527,7 @@ int ossl_ec_group_set_params(EC_GROUP *group, const OSSL_PARAM params[]) /* The seed is allowed to be NULL */ if (p->data_type != OSSL_PARAM_OCTET_STRING || !EC_GROUP_set_seed(group, p->data, p->data_size)) { - ECerr(0, EC_R_INVALID_SEED); + ERR_raise(ERR_LIB_EC, EC_R_INVALID_SEED); return 0; } } |