diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_prn.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_prn.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c index dc20c6bdba..bee624c6be 100644 --- a/src/lib/libcrypto/x509v3/v3_prn.c +++ b/src/lib/libcrypto/x509v3/v3_prn.c | |||
@@ -81,7 +81,15 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) | |||
81 | nval = sk_CONF_VALUE_value(val, i); | 81 | nval = sk_CONF_VALUE_value(val, i); |
82 | if(!nval->name) BIO_puts(out, nval->value); | 82 | if(!nval->name) BIO_puts(out, nval->value); |
83 | else if(!nval->value) BIO_puts(out, nval->name); | 83 | else if(!nval->value) BIO_puts(out, nval->name); |
84 | #ifndef CHARSET_EBCDIC | ||
84 | else BIO_printf(out, "%s:%s", nval->name, nval->value); | 85 | else BIO_printf(out, "%s:%s", nval->name, nval->value); |
86 | #else | ||
87 | else { | ||
88 | char tmp[10240]; /* 10k is BIO_printf's limit anyway */ | ||
89 | ascii2ebcdic(tmp, nval->value, strlen(nval->value)+1); | ||
90 | BIO_printf(out, "%s:%s", nval->name, tmp); | ||
91 | } | ||
92 | #endif | ||
85 | if(ml) BIO_puts(out, "\n"); | 93 | if(ml) BIO_puts(out, "\n"); |
86 | } | 94 | } |
87 | } | 95 | } |
@@ -103,7 +111,15 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) | |||
103 | ok = 0; | 111 | ok = 0; |
104 | goto err; | 112 | goto err; |
105 | } | 113 | } |
114 | #ifndef CHARSET_EBCDIC | ||
106 | BIO_printf(out, "%*s%s", indent, "", value); | 115 | BIO_printf(out, "%*s%s", indent, "", value); |
116 | #else | ||
117 | { | ||
118 | char tmp[10240]; /* 10k is BIO_printf's limit anyway */ | ||
119 | ascii2ebcdic(tmp, value, strlen(value)+1); | ||
120 | BIO_printf(out, "%*s%s", indent, "", tmp); | ||
121 | } | ||
122 | #endif | ||
107 | } else if(method->i2v) { | 123 | } else if(method->i2v) { |
108 | if(!(nval = method->i2v(method, ext_str, NULL))) { | 124 | if(!(nval = method->i2v(method, ext_str, NULL))) { |
109 | ok = 0; | 125 | ok = 0; |