X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_ec_keyx.c;h=955858c3c41ac000f7c7485357ebe7e2f3315052;hb=e0deb2a6478d01e7de27b9f704f580e49ed9ff7b;hp=d7fef31c10c869530acd659270a185e26d99a978;hpb=9ce100a9fc0a9b4774faf6d593162f269c18ade1;p=openssl-gost%2Fengine.git diff --git a/gost_ec_keyx.c b/gost_ec_keyx.c index d7fef31..955858c 100644 --- a/gost_ec_keyx.c +++ b/gost_ec_keyx.c @@ -804,6 +804,13 @@ static int pkey_gost2018_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key, o q * Q_eph is not equal to zero point. */ + if (eph_key == NULL || priv == NULL || data == NULL) { + GOSTerr(GOST_F_PKEY_GOST2018_DECRYPT, + GOST_R_ERROR_COMPUTING_EXPORT_KEYS); + ret = 0; + goto err; + } + if (data->shared_ukm_size == 0 && pst->ukm != NULL) { if (EVP_PKEY_CTX_ctrl(pctx, -1, -1, EVP_PKEY_CTRL_SET_IV, ASN1_STRING_length(pst->ukm), (void *)ASN1_STRING_get0_data(pst->ukm)) < 0) {