diff options
author | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2019-10-16 22:10:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 22:10:57 +0300 |
commit | 7d8d59165b1f001d833182e5309c6711bdf269af (patch) | |
tree | 6b59670d4ebcd1ac03fc3e36ce46dc3e0dec27dc | |
parent | 7f55249334f0dd265a3c2579812cbcec6c946944 (diff) | |
parent | b2088dd3c7c7a7d8f88ea624fd931b1808a7cfc3 (diff) | |
download | gost-engine-7d8d59165b1f001d833182e5309c6711bdf269af.zip gost-engine-7d8d59165b1f001d833182e5309c6711bdf269af.tar.gz gost-engine-7d8d59165b1f001d833182e5309c6711bdf269af.tar.bz2 |
Merge pull request #181 from vt-alt/issues/174
Issues/174
-rw-r--r-- | gost_ec_keyx.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |