summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/b_dump.c')
-rw-r--r--crypto/bio/b_dump.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c
index 71bbce8ce1..a7cd828978 100644
--- a/crypto/bio/b_dump.c
+++ b/crypto/bio/b_dump.c
@@ -102,7 +102,13 @@ int BIO_dump(BIO *bio, const char *s, int len)
if (((i*DUMP_WIDTH)+j)>=len)
break;
ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff;
+#ifndef CHARSET_EBCDIC
sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.');
+#else
+ sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~']))
+ ? os_toebcdic[ch]
+ : '.');
+#endif
strcat(buf,tmp);
}
strcat(buf,"\n");