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;
}
eph_key = X509_PUBKEY_get(pst->ephem_key);
+/*
+ * TODO beldmit
+ 1. Checks the next three conditions fulfilling and terminates the
+ connection with fatal error if not.
+
+ o Q_eph is on the same curve as server public key;
+
+ o Q_eph is not equal to zero point;
+ o q * Q_eph is not equal to zero point.
+*/
if (gost_keg(data->shared_ukm, pkey_nid,
EC_KEY_get0_public_key(EVP_PKEY_get0(eph_key)),
EVP_PKEY_get0(priv), expkeys) <= 0) {