diff options
author | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-06-04 21:35:58 +0000 |
commit | a53955d8abd68c604de02cc1e101c66169207fb7 (patch) | |
tree | e51051484f2b073f7b58a1549442bf0657ca2978 /crypto/evp/encode.c | |
parent | 9231f4779677a3cb95a4f8ccebd56432cb914498 (diff) | |
download | openssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.gz |
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
Diffstat (limited to 'crypto/evp/encode.c')
-rw-r--r-- | crypto/evp/encode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 20d6ec6dd0..0152624a76 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -60,8 +60,19 @@ #include "cryptlib.h" #include <openssl/evp.h> +#ifndef CHARSET_EBCDIC #define conv_bin2ascii(a) (data_bin2ascii[(a)&0x3f]) #define conv_ascii2bin(a) (data_ascii2bin[(a)&0x7f]) +#else +/* We assume that PEM encoded files are EBCDIC files + * (i.e., printable text files). Convert them here while decoding. + * When encoding, output is EBCDIC (text) format again. + * (No need for conversion in the conv_bin2ascii macro, as the + * underlying textstring data_bin2ascii[] is already EBCDIC) + */ +#define conv_bin2ascii(a) (data_bin2ascii[(a)&0x3f]) +#define conv_ascii2bin(a) (data_ascii2bin[os_toascii[a]&0x7f]) +#endif /* 64 char lines * pad input with 0 |