summaryrefslogtreecommitdiffstats
path: root/crypto/hmac
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-06-20 09:08:10 +0100
committerMatt Caswell <matt@openssl.org>2016-06-24 13:22:40 +0100
commita6211814c4c6f29358f29f639d468387b01518f8 (patch)
treefff1531b407a571af5431c53c0f17cea6248b95a /crypto/hmac
parentd6079a87db58ad17550b5d00a74512464e6a029e (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.c5
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;
+}