]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Fix crypto_hash_init() to initialize HMAC context
authorJouni Malinen <j@w1.fi>
Thu, 16 Aug 2012 17:39:46 +0000 (20:39 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 16 Aug 2012 17:39:46 +0000 (20:39 +0300)
Signed-hostap: Jouni Malinen <j@w1.fi>

src/crypto/crypto_openssl.c

index 791f588f729c827da53718c3d32473cd15b3416c..ae0a001fa6f7f771861dfdf2fc98bb8ede44d51c 100644 (file)
@@ -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);