Skip to content

Commit

Permalink
inherit HMAC flags from MD_CTX
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed May 19, 2011
1 parent 74bf705 commit f4ddbb5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/hmac/hm_pmeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ static int int_update(EVP_MD_CTX *ctx,const void *data,size_t count)

static int hmac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
{
HMAC_PKEY_CTX *hctx = ctx->data;
HMAC_CTX_set_flags(&hctx->ctx, mctx->flags & ~EVP_MD_CTX_FLAG_NO_INIT);
EVP_MD_CTX_set_flags(mctx, EVP_MD_CTX_FLAG_NO_INIT);
mctx->update = int_update;
return 1;
Expand Down

0 comments on commit f4ddbb5

Please sign in to comment.