summaryrefslogtreecommitdiff
path: root/crypto/hmac/hmac.c
diff options
context:
space:
mode:
authorsteve <steve>2007-04-11 12:32:54 +0000
committersteve <steve>2007-04-11 12:32:54 +0000
commitccd2f11f02d933b71ec504195c664362a8f7fe60 (patch)
treeb5876dcc57a5e4255dc863ac2c209011d05bbc11 /crypto/hmac/hmac.c
parentd7ae460859e249a5e319b544048893b251c52453 (diff)
downloadopenssl-ccd2f11f02d933b71ec504195c664362a8f7fe60.tar.gz
Experimental HMAC support via EVP_PKEY_METHOD.
Diffstat (limited to 'crypto/hmac/hmac.c')
-rw-r--r--crypto/hmac/hmac.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index c45e00149..5c99f03e2 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -147,6 +147,16 @@ void HMAC_CTX_init(HMAC_CTX *ctx)
EVP_MD_CTX_init(&ctx->md_ctx);
}
+void HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx)
+ {
+ EVP_MD_CTX_copy(&dctx->i_ctx, &sctx->i_ctx);
+ EVP_MD_CTX_copy(&dctx->o_ctx, &sctx->o_ctx);
+ EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx);
+ memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK);
+ dctx->key_length = sctx->key_length;
+ dctx->md = sctx->md;
+ }
+
void HMAC_CTX_cleanup(HMAC_CTX *ctx)
{
EVP_MD_CTX_cleanup(&ctx->i_ctx);