static int run_cert(X509 *crt, const char *nameincert,
                     const struct set_name_fn *fn)
{
    const char *const *pname = names;
    int failed = 0;
    for (; *pname != NULL; ++pname) {
        int samename = strcasecmp(nameincert, *pname) == 0;
        size_t namelen = strlen(*pname);
        char *name = OPENSSL_malloc(namelen);
        int match, ret;
        memcpy(name, *pname, namelen);
        match = -1;
        if (!TEST_int_ge(ret = X509_check_host(crt, name, namelen, 0, NULL),
                         0)) {
            failed = 1;
        } else if (fn->host) {
            if (ret == 1 && !samename)
                match = 1;
            if (ret == 0 && samename)
                match = 0;
        } else if (ret == 1)
            match = 1;
        if (!TEST_true(check_message(fn, "host", nameincert, match, *pname)))
            failed = 1;
        match = -1;
        if (!TEST_int_ge(ret = X509_check_host(crt, name, namelen,
                                               X509_CHECK_FLAG_NO_WILDCARDS,
                                               NULL), 0)) {
            failed = 1;
        } else if (fn->host) {
            if (ret == 1 && !samename)
                match = 1;
            if (ret == 0 && samename)
                match = 0;
        } else if (ret == 1)
            match = 1;
        if (!TEST_true(check_message(fn, "host-no-wildcards",
                                     nameincert, match, *pname)))
            failed = 1;
        match = -1;
        ret = X509_check_email(crt, name, namelen, 0);
        if (fn->email) {
            if (ret && !samename)
                match = 1;
            if (!ret && samename && strchr(nameincert, '@') != NULL)
                match = 0;
        } else if (ret)
            match = 1;
        if (!TEST_true(check_message(fn, "email", nameincert, match, *pname)))
            failed = 1;
        OPENSSL_free(name);
    }
    return failed == 0;
}
['static int run_cert(X509 *crt, const char *nameincert,\n                     const struct set_name_fn *fn)\n{\n    const char *const *pname = names;\n    int failed = 0;\n    for (; *pname != NULL; ++pname) {\n        int samename = strcasecmp(nameincert, *pname) == 0;\n        size_t namelen = strlen(*pname);\n        char *name = OPENSSL_malloc(namelen);\n        int match, ret;\n        memcpy(name, *pname, namelen);\n        match = -1;\n        if (!TEST_int_ge(ret = X509_check_host(crt, name, namelen, 0, NULL),\n                         0)) {\n            failed = 1;\n        } else if (fn->host) {\n            if (ret == 1 && !samename)\n                match = 1;\n            if (ret == 0 && samename)\n                match = 0;\n        } else if (ret == 1)\n            match = 1;\n        if (!TEST_true(check_message(fn, "host", nameincert, match, *pname)))\n            failed = 1;\n        match = -1;\n        if (!TEST_int_ge(ret = X509_check_host(crt, name, namelen,\n                                               X509_CHECK_FLAG_NO_WILDCARDS,\n                                               NULL), 0)) {\n            failed = 1;\n        } else if (fn->host) {\n            if (ret == 1 && !samename)\n                match = 1;\n            if (ret == 0 && samename)\n                match = 0;\n        } else if (ret == 1)\n            match = 1;\n        if (!TEST_true(check_message(fn, "host-no-wildcards",\n                                     nameincert, match, *pname)))\n            failed = 1;\n        match = -1;\n        ret = X509_check_email(crt, name, namelen, 0);\n        if (fn->email) {\n            if (ret && !samename)\n                match = 1;\n            if (!ret && samename && strchr(nameincert, \'@\') != NULL)\n                match = 0;\n        } else if (ret)\n            match = 1;\n        if (!TEST_true(check_message(fn, "email", nameincert, match, *pname)))\n            failed = 1;\n        OPENSSL_free(name);\n    }\n    return failed == 0;\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    allow_customize = 0;\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}']