From: Dmitry Belyavskiy Date: Wed, 16 Oct 2019 19:10:57 +0000 (+0300) Subject: Merge pull request #181 from vt-alt/issues/174 X-Git-Tag: v3.0.0~263^2~2 X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=commitdiff_plain;h=7d8d59165b1f001d833182e5309c6711bdf269af;hp=7f55249334f0dd265a3c2579812cbcec6c946944;p=openssl-gost%2Fengine.git Merge pull request #181 from vt-alt/issues/174 Issues/174 --- diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c index fa068ae..2053d0d 100644 --- a/gost_ec_keyx.c +++ b/gost_ec_keyx.c @@ -263,6 +263,8 @@ static int pkey_GOST_ECcp_encrypt(EVP_PKEY_CTX *pctx, unsigned char *out, return 0; } } + if (!param) + goto err; /* Check for private key in the peer_key of context */ if (sec_key) { key_is_ephemeral = 0; @@ -284,10 +286,6 @@ static int pkey_GOST_ECcp_encrypt(EVP_PKEY_CTX *pctx, unsigned char *out, } } } - if (!get_gost_engine_param(GOST_PARAM_CRYPT_PARAMS) - && param == gost_cipher_list) { - param = gost_cipher_list; - } if (out) { int dgst_nid = NID_undef; EVP_PKEY_get_default_digest_nid(pubk, &dgst_nid);