summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-01-05 23:17:53 +0800
committerPauli <pauli@openssl.org>2022-01-11 13:07:43 +1100
commit576cc3ecb34a8909bf549798430de95fc0fb4042 (patch)
tree1c37295d57fd45da189d093f062a28188bdcf2e4 /crypto/ec
parentafaa7755aa3e577348e1267d5ad34da695292917 (diff)
Fix: some patches related to error exiting
Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17443)
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c
index 3d3cf96962..2d85d4f23a 100644
--- a/crypto/ec/ec_lib.c
+++ b/crypto/ec/ec_lib.c
@@ -1710,8 +1710,8 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[],
ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING);
if (ptmp != NULL
&& !ossl_ec_encoding_param2id(ptmp, &encoding_flag)) {
- ECerr(0, EC_R_INVALID_ENCODING);
- return 0;
+ ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
+ goto err;
}
if (encoding_flag == OPENSSL_EC_NAMED_CURVE) {
ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);