From d6dc5c506a049e3f09acca57dea4b33bc8cfb2be Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 19 Jun 2013 18:20:03 +0100 Subject: Add control to retrieve signature MD. (cherry picked from commit 810639536cfa66df0c232fa4f15a7e5f00f31ce8) --- engines/ccgost/gost_pmeth.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines') diff --git a/engines/ccgost/gost_pmeth.c b/engines/ccgost/gost_pmeth.c index f91c9b1939..3189798cf4 100644 --- a/engines/ccgost/gost_pmeth.c +++ b/engines/ccgost/gost_pmeth.c @@ -86,6 +86,10 @@ static int pkey_gost_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) } break; + case EVP_PKEY_CTRL_GET_MD: + *(const EVP_MD **)p2 = pctx->md; + return 1; + case EVP_PKEY_CTRL_PKCS7_ENCRYPT: case EVP_PKEY_CTRL_PKCS7_DECRYPT: case EVP_PKEY_CTRL_PKCS7_SIGN: @@ -464,6 +468,10 @@ static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) } break; + case EVP_PKEY_CTRL_GET_MD: + *(const EVP_MD **)p2 = data->md; + return 1; + case EVP_PKEY_CTRL_PKCS7_ENCRYPT: case EVP_PKEY_CTRL_PKCS7_DECRYPT: case EVP_PKEY_CTRL_PKCS7_SIGN: -- cgit v1.2.3