diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-06-19 18:20:03 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-10-01 14:01:17 +0100 |
commit | d6dc5c506a049e3f09acca57dea4b33bc8cfb2be (patch) | |
tree | cc0defccb3272741e6102b2adb57892c3b647c32 /engines/ccgost/gost_pmeth.c | |
parent | eebd5e5dd7dff58297ea52e1c21df8fccd593965 (diff) |
Add control to retrieve signature MD.
(cherry picked from commit 810639536cfa66df0c232fa4f15a7e5f00f31ce8)
Diffstat (limited to 'engines/ccgost/gost_pmeth.c')
-rw-r--r-- | engines/ccgost/gost_pmeth.c | 8 |
1 files changed, 8 insertions, 0 deletions
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: |