static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)
{
    const char *type_mod = "";
    const char *type = NULL;
    int show_type_number = 0;
    int printed_len;
    switch (param->data_type) {
    case OSSL_PARAM_UNSIGNED_INTEGER:
        type_mod = "unsigned ";
    case OSSL_PARAM_INTEGER:
        type = "integer";
        break;
    case OSSL_PARAM_UTF8_PTR:
        type_mod = "pointer to a ";
    case OSSL_PARAM_UTF8_STRING:
        type = "UTF8 encoded string";
        break;
    case OSSL_PARAM_OCTET_PTR:
        type_mod = "pointer to an ";
    case OSSL_PARAM_OCTET_STRING:
        type = "octet string";
        break;
    default:
        type = "unknown type";
        show_type_number = 1;
        break;
    }
    printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    if (show_type_number) {
        printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type);
        if (printed_len > 0) {
            buf += printed_len;
            bufsz -= printed_len;
        }
    }
    if (param->data_size == 0)
        printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)");
    else
        printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)",
                                   param->data_size);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    *buf = '\0';
    return 1;
}
['int print_param_types(const char *thing, const OSSL_PARAM *pdefs, int indent)\n{\n    if (pdefs == NULL) {\n        BIO_printf(bio_out, "%*sNo declared %s\\n", indent, "", thing);\n    } else if (pdefs->key == NULL) {\n        BIO_printf(bio_out, "%*sEmpty list of %s (!!!)\\n", indent, "", thing);\n    } else {\n        BIO_printf(bio_out, "%*s%s:\\n", indent, "", thing);\n        for (; pdefs->key != NULL; pdefs++) {\n            char buf[200];\n            describe_param_type(buf, sizeof(buf), pdefs);\n            BIO_printf(bio_out, "%*s  %s\\n", indent, "", buf);\n        }\n    }\n    return 1;\n}', 'static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)\n{\n    const char *type_mod = "";\n    const char *type = NULL;\n    int show_type_number = 0;\n    int printed_len;\n    switch (param->data_type) {\n    case OSSL_PARAM_UNSIGNED_INTEGER:\n        type_mod = "unsigned ";\n    case OSSL_PARAM_INTEGER:\n        type = "integer";\n        break;\n    case OSSL_PARAM_UTF8_PTR:\n        type_mod = "pointer to a ";\n    case OSSL_PARAM_UTF8_STRING:\n        type = "UTF8 encoded string";\n        break;\n    case OSSL_PARAM_OCTET_PTR:\n        type_mod = "pointer to an ";\n    case OSSL_PARAM_OCTET_STRING:\n        type = "octet string";\n        break;\n    default:\n        type = "unknown type";\n        show_type_number = 1;\n        break;\n    }\n    printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    if (show_type_number) {\n        printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type);\n        if (printed_len > 0) {\n            buf += printed_len;\n            bufsz -= printed_len;\n        }\n    }\n    if (param->data_size == 0)\n        printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)");\n    else\n        printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)",\n                                   param->data_size);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    *buf = \'\\0\';\n    return 1;\n}', 'int BIO_snprintf(char *buf, size_t n, const char *format, ...)\n{\n    va_list args;\n    int ret;\n    va_start(args, format);\n    ret = BIO_vsnprintf(buf, n, format, args);\n    va_end(args);\n    return ret;\n}', 'int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)\n{\n    size_t retlen;\n    int truncated;\n    if (!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))\n        return -1;\n    if (truncated)\n        return -1;\n    else\n        return (retlen <= INT_MAX) ? (int)retlen : -1;\n}']