diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_prn.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_prn.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c index dbc4fb1f16..14b804c4ad 100644 --- a/src/lib/libcrypto/x509v3/v3_prn.c +++ b/src/lib/libcrypto/x509v3/v3_prn.c | |||
@@ -85,9 +85,16 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) | |||
85 | else BIO_printf(out, "%s:%s", nval->name, nval->value); | 85 | else BIO_printf(out, "%s:%s", nval->name, nval->value); |
86 | #else | 86 | #else |
87 | else { | 87 | else { |
88 | char tmp[10240]; /* 10k is BIO_printf's limit anyway */ | 88 | int len; |
89 | ascii2ebcdic(tmp, nval->value, strlen(nval->value)+1); | 89 | char *tmp; |
90 | BIO_printf(out, "%s:%s", nval->name, tmp); | 90 | len = strlen(nval->value)+1; |
91 | tmp = OPENSSL_malloc(len); | ||
92 | if (tmp) | ||
93 | { | ||
94 | ascii2ebcdic(tmp, nval->value, len); | ||
95 | BIO_printf(out, "%s:%s", nval->name, tmp); | ||
96 | OPENSSL_free(tmp); | ||
97 | } | ||
91 | } | 98 | } |
92 | #endif | 99 | #endif |
93 | if(ml) BIO_puts(out, "\n"); | 100 | if(ml) BIO_puts(out, "\n"); |
@@ -115,9 +122,16 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) | |||
115 | BIO_printf(out, "%*s%s", indent, "", value); | 122 | BIO_printf(out, "%*s%s", indent, "", value); |
116 | #else | 123 | #else |
117 | { | 124 | { |
118 | char tmp[10240]; /* 10k is BIO_printf's limit anyway */ | 125 | int len; |
119 | ascii2ebcdic(tmp, value, strlen(value)+1); | 126 | char *tmp; |
120 | BIO_printf(out, "%*s%s", indent, "", tmp); | 127 | len = strlen(value)+1; |
128 | tmp = OPENSSL_malloc(len); | ||
129 | if (tmp) | ||
130 | { | ||
131 | ascii2ebcdic(tmp, value, len); | ||
132 | BIO_printf(out, "%*s%s", indent, "", tmp); | ||
133 | OPENSSL_free(tmp); | ||
134 | } | ||
121 | } | 135 | } |
122 | #endif | 136 | #endif |
123 | } else if(method->i2v) { | 137 | } else if(method->i2v) { |