X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fasn1%2Fa_mbstr.c;h=5d981c655387c385fcaeb7b44eb75a3a72aabf4b;hb=d5492d9b47d4d55052f24c8a04c70a0516ac934d;hp=9842b653e62b8b5ad8747a8140eeb42a7c0af7ee;hpb=d428bf8c568c617bb3c3bd0ac3b326298e7b34b9;p=openssl.git 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; }