From: Jouni Malinen Date: Thu, 16 Aug 2012 17:39:46 +0000 (+0300) Subject: OpenSSL: Fix crypto_hash_init() to initialize HMAC context X-Git-Tag: hostap_2_0~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=105f5881d5e5fb1a3e53de60dc5ecb80b1efb301;p=thirdparty%2Fhostap.git OpenSSL: Fix crypto_hash_init() to initialize HMAC context Signed-hostap: Jouni Malinen --- diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index 791f588f7..ae0a001fa 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -636,6 +636,7 @@ struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, ctx = os_zalloc(sizeof(*ctx)); if (ctx == NULL) return NULL; + HMAC_CTX_init(&ctx->ctx); #if OPENSSL_VERSION_NUMBER < 0x00909000 HMAC_Init_ex(&ctx->ctx, key, key_len, md, NULL);