int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
{
    char *v;
    int gmt = 0;
    int i;
    int y = 0, M = 0, d = 0, h = 0, m = 0, s = 0;
    char *f = NULL;
    int f_len = 0;
    i = tm->length;
    v = (char *)tm->data;
    if (i < 12)
        goto err;
    if (v[i - 1] == 'Z')
        gmt = 1;
    for (i = 0; i < 12; i++)
        if ((v[i] > '9') || (v[i] < '0'))
            goto err;
    y = (v[0] - '0') * 1000 + (v[1] - '0') * 100
        + (v[2] - '0') * 10 + (v[3] - '0');
    M = (v[4] - '0') * 10 + (v[5] - '0');
    if ((M > 12) || (M < 1))
        goto err;
    d = (v[6] - '0') * 10 + (v[7] - '0');
    h = (v[8] - '0') * 10 + (v[9] - '0');
    m = (v[10] - '0') * 10 + (v[11] - '0');
    if (tm->length >= 14 &&
        (v[12] >= '0') && (v[12] <= '9') &&
        (v[13] >= '0') && (v[13] <= '9')) {
        s = (v[12] - '0') * 10 + (v[13] - '0');
        if (tm->length >= 15 && v[14] == '.') {
            int l = tm->length;
            f = &v[14];
            f_len = 1;
            while (14 + f_len < l && f[f_len] >= '0' && f[f_len] <= '9')
                ++f_len;
        }
    }
    if (BIO_printf(bp, "%s %2d %02d:%02d:%02d%.*s %d%s",
                   _asn1_mon[M - 1], d, h, m, s, f_len, f, y,
                   (gmt) ? " GMT" : "") <= 0)
        return (0);
    else
        return (1);
 err:
    BIO_write(bp, "Bad time value", 14);
    return (0);
}
['int verify_callback(int ok, X509_STORE_CTX *ctx)\n{\n    X509 *err_cert;\n    int err, depth;\n    err_cert = X509_STORE_CTX_get_current_cert(ctx);\n    err = X509_STORE_CTX_get_error(ctx);\n    depth = X509_STORE_CTX_get_error_depth(ctx);\n    if (!verify_quiet || !ok) {\n        BIO_printf(bio_err, "depth=%d ", depth);\n        if (err_cert) {\n            X509_NAME_print_ex(bio_err,\n                               X509_get_subject_name(err_cert),\n                               0, XN_FLAG_ONELINE);\n            BIO_puts(bio_err, "\\n");\n        } else\n            BIO_puts(bio_err, "<no cert>\\n");\n    }\n    if (!ok) {\n        BIO_printf(bio_err, "verify error:num=%d:%s\\n", err,\n                   X509_verify_cert_error_string(err));\n        if (verify_depth >= depth) {\n            if (!verify_return_error)\n                ok = 1;\n            verify_error = X509_V_OK;\n        } else {\n            ok = 0;\n            verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;\n        }\n    }\n    switch (err) {\n    case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:\n        BIO_puts(bio_err, "issuer= ");\n        X509_NAME_print_ex(bio_err, X509_get_issuer_name(err_cert),\n                           0, XN_FLAG_ONELINE);\n        BIO_puts(bio_err, "\\n");\n        break;\n    case X509_V_ERR_CERT_NOT_YET_VALID:\n    case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:\n        BIO_printf(bio_err, "notBefore=");\n        ASN1_TIME_print(bio_err, X509_get_notBefore(err_cert));\n        BIO_printf(bio_err, "\\n");\n        break;\n    case X509_V_ERR_CERT_HAS_EXPIRED:\n    case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:\n        BIO_printf(bio_err, "notAfter=");\n        ASN1_TIME_print(bio_err, X509_get_notAfter(err_cert));\n        BIO_printf(bio_err, "\\n");\n        break;\n    case X509_V_ERR_NO_EXPLICIT_POLICY:\n        if (!verify_quiet)\n            policies_print(ctx);\n        break;\n    }\n    if (err == X509_V_OK && ok == 2 && !verify_quiet)\n        policies_print(ctx);\n    if (ok && !verify_quiet)\n        BIO_printf(bio_err, "verify return:%d\\n", ok);\n    return (ok);\n}', 'int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm)\n{\n    if (tm->type == V_ASN1_UTCTIME)\n        return ASN1_UTCTIME_print(bp, tm);\n    if (tm->type == V_ASN1_GENERALIZEDTIME)\n        return ASN1_GENERALIZEDTIME_print(bp, tm);\n    BIO_write(bp, "Bad time value", 14);\n    return (0);\n}', 'int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)\n{\n    char *v;\n    int gmt = 0;\n    int i;\n    int y = 0, M = 0, d = 0, h = 0, m = 0, s = 0;\n    char *f = NULL;\n    int f_len = 0;\n    i = tm->length;\n    v = (char *)tm->data;\n    if (i < 12)\n        goto err;\n    if (v[i - 1] == \'Z\')\n        gmt = 1;\n    for (i = 0; i < 12; i++)\n        if ((v[i] > \'9\') || (v[i] < \'0\'))\n            goto err;\n    y = (v[0] - \'0\') * 1000 + (v[1] - \'0\') * 100\n        + (v[2] - \'0\') * 10 + (v[3] - \'0\');\n    M = (v[4] - \'0\') * 10 + (v[5] - \'0\');\n    if ((M > 12) || (M < 1))\n        goto err;\n    d = (v[6] - \'0\') * 10 + (v[7] - \'0\');\n    h = (v[8] - \'0\') * 10 + (v[9] - \'0\');\n    m = (v[10] - \'0\') * 10 + (v[11] - \'0\');\n    if (tm->length >= 14 &&\n        (v[12] >= \'0\') && (v[12] <= \'9\') &&\n        (v[13] >= \'0\') && (v[13] <= \'9\')) {\n        s = (v[12] - \'0\') * 10 + (v[13] - \'0\');\n        if (tm->length >= 15 && v[14] == \'.\') {\n            int l = tm->length;\n            f = &v[14];\n            f_len = 1;\n            while (14 + f_len < l && f[f_len] >= \'0\' && f[f_len] <= \'9\')\n                ++f_len;\n        }\n    }\n    if (BIO_printf(bp, "%s %2d %02d:%02d:%02d%.*s %d%s",\n                   _asn1_mon[M - 1], d, h, m, s, f_len, f, y,\n                   (gmt) ? " GMT" : "") <= 0)\n        return (0);\n    else\n        return (1);\n err:\n    BIO_write(bp, "Bad time value", 14);\n    return (0);\n}']