diff options
author | Matt Caswell <matt@openssl.org> | 2016-06-20 09:08:10 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-06-24 13:22:40 +0100 |
commit | a6211814c4c6f29358f29f639d468387b01518f8 (patch) | |
tree | fff1531b407a571af5431c53c0f17cea6248b95a /crypto/hmac | |
parent | d6079a87db58ad17550b5d00a74512464e6a029e (diff) |
Add a getter to obtain the HMAC_CTX md
As a result of opaque HMAC_CTX apps need a getter for the HMAC_CTX md.
GitHub Issue #1152
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/hmac')
-rw-r--r-- | crypto/hmac/hmac.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index da7f58688f..3374105cbb 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -233,3 +233,8 @@ void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags) EVP_MD_CTX_set_flags(ctx->o_ctx, flags); EVP_MD_CTX_set_flags(ctx->md_ctx, flags); } + +const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx) +{ + return ctx->md; +} |