]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
We should get key nid from our private key, not from peer's ephemeral
authorDmitry Belyavskiy <beldmit@gmail.com>
Fri, 7 Sep 2018 12:59:06 +0000 (15:59 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Fri, 7 Sep 2018 12:59:06 +0000 (15:59 +0300)
gost_ec_keyx.c

index 3f0b286a4097014dd68fb34c31ac6d37e9b61732..503d80ba173a3a8e592e66733dfdc16c9e85f851 100644 (file)
@@ -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;