char tmp[10240];  ascii2ebcdic(tmp, value, strlen(value)+1); BIO_printf(out, "%*s%s", indent, "", tmp);
int len; char *tmp; len = strlen(value)+1; tmp = OPENSSL_malloc(len); if (tmp) { ascii2ebcdic(tmp, value, len); BIO_printf(out, "%*s%s", indent, "", tmp); OPENSSL_free(tmp); }
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent){	void *ext_str = NULL;	char *value = NULL;	unsigned char *p;	X509V3_EXT_METHOD *method;		STACK_OF(CONF_VALUE) *nval = NULL;	int ok = 1;	if(!(method = X509V3_EXT_get(ext)))		return unknown_ext_print(out, ext, flag, indent, 0);	p = ext->value->data;	if(method->it) ext_str = ASN1_item_d2i(NULL, &p, ext->value->length, method->it);	else ext_str = method->d2i(NULL, &p, ext->value->length);	if(!ext_str) return unknown_ext_print(out, ext, flag, indent, 1);	if(method->i2s) {		if(!(value = method->i2s(method, ext_str))) {			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;			goto err;		}		X509V3_EXT_val_prn(out, nval, indent,				 method->ext_flags & X509V3_EXT_MULTILINE);	} else if(method->i2r) {		if(!method->i2r(method, ext_str, out, indent)) ok = 0;	} else ok = 0;	err:		sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);		if(value) OPENSSL_free(value);		if(method->it) ASN1_item_free(ext_str, method->it);		else method->ext_free(ext_str);		return ok;}