diff options
author | Richard Levitte <levitte@openssl.org> | 2000-09-10 14:45:19 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-09-10 14:45:19 +0000 |
commit | 97d8e82c4c622b8896e37634c6d4ee43ab6a4432 (patch) | |
tree | 9872033f9258a4032388a234c23659b31434cfea /crypto/asn1/a_mbstr.c | |
parent | d7b9c76c72bd6e744db2070d148738941ba38305 (diff) | |
download | openssl-97d8e82c4c622b8896e37634c6d4ee43ab6a4432.tar.gz |
Marin Kraemer <Martin.Kraemer@MchP.Siemens.De> sent us patches to make
the OpenSSL commands x50 and req work better on a EBCDIC system.
Diffstat (limited to 'crypto/asn1/a_mbstr.c')
-rw-r--r-- | crypto/asn1/a_mbstr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c index 9842b653e6..5d981c6553 100644 --- a/crypto/asn1/a_mbstr.c +++ b/crypto/asn1/a_mbstr.c @@ -385,9 +385,16 @@ static int is_printable(unsigned long value) /* Note: we can't use 'isalnum' because certain accented * characters may count as alphanumeric in some environments. */ +#ifndef CHARSET_EBCDIC if((ch >= 'a') && (ch <= 'z')) return 1; if((ch >= 'A') && (ch <= 'Z')) return 1; if((ch >= '0') && (ch <= '9')) return 1; if ((ch == ' ') || strchr("'()+,-./:=?", ch)) return 1; +#else /*CHARSET_EBCDIC*/ + if((ch >= os_toascii['a']) && (ch <= os_toascii['z'])) return 1; + if((ch >= os_toascii['A']) && (ch <= os_toascii['Z'])) return 1; + if((ch >= os_toascii['0']) && (ch <= os_toascii['9'])) return 1; + if ((ch == os_toascii[' ']) || strchr("'()+,-./:=?", os_toebcdic[ch])) return 1; +#endif /*CHARSET_EBCDIC*/ return 0; } |