From 98b01a8e3471ccf9ef476a8e5ca426276438ce28 Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Mon, 5 Oct 2015 22:32:38 +0300 Subject: [PATCH] Make possible build with version of OpenSSL which doesn't support EVP_PKEY_CTRL_GET_MD --- gost_pmeth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gost_pmeth.c b/gost_pmeth.c index 166cf85..789eeea 100644 --- a/gost_pmeth.c +++ b/gost_pmeth.c @@ -118,11 +118,11 @@ static int pkey_gost_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) GOSTerr(GOST_F_PKEY_GOST_CTRL, GOST_R_INVALID_DIGEST_TYPE); return 0; } - +#ifdef EVP_PKEY_CTRL_GET_MD case EVP_PKEY_CTRL_GET_MD: *(const EVP_MD **)p2 = pctx->md; return 1; - +#endif case EVP_PKEY_CTRL_PKCS7_ENCRYPT: case EVP_PKEY_CTRL_PKCS7_DECRYPT: case EVP_PKEY_CTRL_PKCS7_SIGN: @@ -499,11 +499,11 @@ static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) data->md = (EVP_MD *)p2; return 1; } - +#ifdef EVP_PKEY_CTRL_GET_MD case EVP_PKEY_CTRL_GET_MD: *(const EVP_MD **)p2 = data->md; return 1; - +#endif case EVP_PKEY_CTRL_PKCS7_ENCRYPT: case EVP_PKEY_CTRL_PKCS7_DECRYPT: case EVP_PKEY_CTRL_PKCS7_SIGN: -- 2.39.5