diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bio/b_dump.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bio/b_dump.c')
-rw-r--r-- | src/lib/libcrypto/bio/b_dump.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index db84ad3d47..a7cd828978 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c | |||
@@ -62,15 +62,12 @@ | |||
62 | 62 | ||
63 | #include <stdio.h> | 63 | #include <stdio.h> |
64 | #include "cryptlib.h" | 64 | #include "cryptlib.h" |
65 | #include "bio.h" | 65 | #include <openssl/bio.h> |
66 | 66 | ||
67 | #define TRUNCATE | 67 | #define TRUNCATE |
68 | #define DUMP_WIDTH 16 | 68 | #define DUMP_WIDTH 16 |
69 | 69 | ||
70 | int BIO_dump(bio,s,len) | 70 | int BIO_dump(BIO *bio, const char *s, int len) |
71 | BIO *bio; | ||
72 | char *s; | ||
73 | int len; | ||
74 | { | 71 | { |
75 | int ret=0; | 72 | int ret=0; |
76 | char buf[160+1],tmp[20]; | 73 | char buf[160+1],tmp[20]; |
@@ -105,7 +102,13 @@ int len; | |||
105 | if (((i*DUMP_WIDTH)+j)>=len) | 102 | if (((i*DUMP_WIDTH)+j)>=len) |
106 | break; | 103 | break; |
107 | ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff; | 104 | ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff; |
105 | #ifndef CHARSET_EBCDIC | ||
108 | sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); | 106 | sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); |
107 | #else | ||
108 | sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) | ||
109 | ? os_toebcdic[ch] | ||
110 | : '.'); | ||
111 | #endif | ||
109 | strcat(buf,tmp); | 112 | strcat(buf,tmp); |
110 | } | 113 | } |
111 | strcat(buf,"\n"); | 114 | strcat(buf,"\n"); |