From 8347d3e78eb22bebf34345ece29e984eeeb4d95d Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Fri, 7 Sep 2018 15:59:06 +0300 Subject: [PATCH] We should get key nid from our private key, not from peer's ephemeral --- gost_ec_keyx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5