static int old_hmac_decode(EVP_PKEY *pkey,
                           const unsigned char **pder, int derlen)
{
    ASN1_OCTET_STRING *os;
    os = ASN1_OCTET_STRING_new();
    if (os == NULL || !ASN1_OCTET_STRING_set(os, *pder, derlen))
        goto err;
    if (!EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, os))
        goto err;
    return 1;
 err:
    ASN1_OCTET_STRING_free(os);
    return 0;
}
['static int old_hmac_decode(EVP_PKEY *pkey,\n                           const unsigned char **pder, int derlen)\n{\n    ASN1_OCTET_STRING *os;\n    os = ASN1_OCTET_STRING_new();\n    if (os == NULL || !ASN1_OCTET_STRING_set(os, *pder, derlen))\n        goto err;\n    if (!EVP_PKEY_assign(pkey, EVP_PKEY_HMAC, os))\n        goto err;\n    return 1;\n err:\n    ASN1_OCTET_STRING_free(os);\n    return 0;\n}', 'IMPLEMENT_ASN1_STRING_FUNCTIONS(ASN1_OCTET_STRING)', 'ASN1_STRING *ASN1_STRING_type_new(int type)\n{\n    ASN1_STRING *ret;\n    ret = OPENSSL_zalloc(sizeof(*ret));\n    if (ret == NULL) {\n        ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW, ERR_R_MALLOC_FAILURE);\n        return (NULL);\n    }\n    ret->type = type;\n    return (ret);\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\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    if (num <= 0)\n        return NULL;\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;\n    (void)line;\n    ret = malloc(num);\n#endif\n#ifndef OPENSSL_CPUID_OBJ\n    if (ret && (num > 2048)) {\n        extern unsigned char cleanse_ctr;\n        ((unsigned char *)ret)[0] = cleanse_ctr;\n    }\n#endif\n    return ret;\n}', 'int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,\n                          int len)\n{\n    return ASN1_STRING_set(x, d, len);\n}', "int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)\n{\n    unsigned char *c;\n    const char *data = _data;\n    if (len < 0) {\n        if (data == NULL)\n            return (0);\n        else\n            len = strlen(data);\n    }\n    if ((str->length < len) || (str->data == NULL)) {\n        c = str->data;\n        str->data = OPENSSL_realloc(c, len + 1);\n        if (str->data == NULL) {\n            ASN1err(ASN1_F_ASN1_STRING_SET, ERR_R_MALLOC_FAILURE);\n            str->data = c;\n            return (0);\n        }\n    }\n    str->length = len;\n    if (data != NULL) {\n        memcpy(str->data, data, len);\n        str->data[len] = '\\0';\n    }\n    return (1);\n}", 'void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)\n{\n    if (str == NULL)\n        return CRYPTO_malloc(num, file, line);\n    if (num == 0) {\n        CRYPTO_free(str);\n        return NULL;\n    }\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        void *ret;\n        CRYPTO_mem_debug_realloc(str, NULL, num, 0, file, line);\n        ret = realloc(str, num);\n        CRYPTO_mem_debug_realloc(str, ret, num, 1, file, line);\n        return ret;\n    }\n#else\n    (void)file;\n    (void)line;\n#endif\n    return realloc(str, num);\n}', 'int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)\n{\n    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))\n        return 0;\n    pkey->pkey.ptr = key;\n    return (key != NULL);\n}', 'int EVP_PKEY_set_type(EVP_PKEY *pkey, int type)\n{\n    return pkey_set_type(pkey, type, NULL, -1);\n}', 'void ASN1_STRING_free(ASN1_STRING *a)\n{\n    if (a == NULL)\n        return;\n    if (!(a->flags & ASN1_STRING_FLAG_NDEF))\n        OPENSSL_free(a->data);\n    if (!(a->flags & ASN1_STRING_FLAG_EMBED))\n        OPENSSL_free(a);\n}']