diff options
Diffstat (limited to 'crypto/openssl/crypto/x509v3/v3_prn.c')
-rw-r--r-- | crypto/openssl/crypto/x509v3/v3_prn.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/x509v3/v3_prn.c b/crypto/openssl/crypto/x509v3/v3_prn.c index dc20c6b..bee624c 100644 --- a/crypto/openssl/crypto/x509v3/v3_prn.c +++ b/crypto/openssl/crypto/x509v3/v3_prn.c @@ -81,7 +81,15 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) nval = sk_CONF_VALUE_value(val, i); if(!nval->name) BIO_puts(out, nval->value); else if(!nval->value) BIO_puts(out, nval->name); +#ifndef CHARSET_EBCDIC else BIO_printf(out, "%s:%s", nval->name, nval->value); +#else + else { + char tmp[10240]; /* 10k is BIO_printf's limit anyway */ + ascii2ebcdic(tmp, nval->value, strlen(nval->value)+1); + BIO_printf(out, "%s:%s", nval->name, tmp); + } +#endif if(ml) BIO_puts(out, "\n"); } } @@ -103,7 +111,15 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) ok = 0; goto err; } +#ifndef CHARSET_EBCDIC BIO_printf(out, "%*s%s", indent, "", value); +#else + { + char tmp[10240]; /* 10k is BIO_printf's limit anyway */ + ascii2ebcdic(tmp, value, strlen(value)+1); + BIO_printf(out, "%*s%s", indent, "", tmp); + } +#endif } else if(method->i2v) { if(!(nval = method->i2v(method, ext_str, NULL))) { ok = 0; |