Commit 92b4d936 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

inherit HMAC flags from MD_CTX

parent 4f7533eb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -149,6 +149,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;