HMAC_CTX *HMAC_CTX_new(void)
{
    HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));
    if (ctx != NULL) {
        if (!HMAC_CTX_reset(ctx)) {
            HMAC_CTX_free(ctx);
            return NULL;
        }
    }
    return ctx;
}
['HMAC_CTX *HMAC_CTX_new(void)\n{\n    HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));\n    if (ctx != NULL) {\n        if (!HMAC_CTX_reset(ctx)) {\n            HMAC_CTX_free(ctx);\n            return NULL;\n        }\n    }\n    return ctx;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    FAILTEST();\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    INCREMENT(malloc_count);\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num == 0)\n        return NULL;\n    FAILTEST();\n    if (allow_customize) {\n        allow_customize = 0;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)(file); (void)(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}', 'int HMAC_CTX_reset(HMAC_CTX *ctx)\n{\n    hmac_ctx_cleanup(ctx);\n    if (!hmac_ctx_alloc_mds(ctx)) {\n        hmac_ctx_cleanup(ctx);\n        return 0;\n    }\n    return 1;\n}', 'static void hmac_ctx_cleanup(HMAC_CTX *ctx)\n{\n    EVP_MD_CTX_reset(ctx->i_ctx);\n    EVP_MD_CTX_reset(ctx->o_ctx);\n    EVP_MD_CTX_reset(ctx->md_ctx);\n    ctx->md = NULL;\n    ctx->key_length = 0;\n    OPENSSL_cleanse(ctx->key, sizeof(ctx->key));\n}']