aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/engine/eng_openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/engine/eng_openssl.c')
-rw-r--r--crypto/engine/eng_openssl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c
index eaf06180c9..4bc9b2ec69 100644
--- a/crypto/engine/eng_openssl.c
+++ b/crypto/engine/eng_openssl.c
@@ -425,13 +425,10 @@ typedef struct {
static int ossl_hmac_init(EVP_PKEY_CTX *ctx)
{
OSSL_HMAC_PKEY_CTX *hctx;
- hctx = OPENSSL_malloc(sizeof(*hctx));
+
+ hctx = OPENSSL_zalloc(sizeof(*hctx));
if (!hctx)
return 0;
- hctx->md = NULL;
- hctx->ktmp.data = NULL;
- hctx->ktmp.length = 0;
- hctx->ktmp.flags = 0;
hctx->ktmp.type = V_ASN1_OCTET_STRING;
HMAC_CTX_init(&hctx->ctx);
EVP_PKEY_CTX_set_data(ctx, hctx);