Browse Source

OpenSSL: Fix crypto_hash_init() to initialize HMAC context

Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen 12 years ago
parent
commit
105f5881d5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/crypto/crypto_openssl.c

+ 1 - 0
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);