From: Dmitry Belyavskiy Date: Fri, 7 Sep 2018 12:59:06 +0000 (+0300) Subject: We should get key nid from our private key, not from peer's ephemeral X-Git-Tag: v3.0.0~350 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=8347d3e78eb22bebf34345ece29e984eeeb4d95d;p=openssl-gost%2Fengine.git We should get key nid from our private key, not from peer's ephemeral --- diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c index 3f0b286..503d80b 100644 --- a/gost_ec_keyx.c +++ b/gost_ec_keyx.c @@ -553,7 +553,7 @@ static int pkey_gost2018_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key, int ret = 0; unsigned char expkeys[64]; EVP_PKEY *eph_key = NULL; - int pkey_nid = EVP_PKEY_base_id(eph_key); + int pkey_nid = EVP_PKEY_base_id(priv); int mac_nid = NID_undef; int iv_len = 0;