aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_print.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
committerUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/asn1/a_print.c
parent9231f4779677a3cb95a4f8ccebd56432cb914498 (diff)
downloadopenssl-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/asn1/a_print.c')
-rw-r--r--crypto/asn1/a_print.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c
index 3d7629089c..cdec7a1561 100644
--- a/crypto/asn1/a_print.c
+++ b/crypto/asn1/a_print.c
@@ -95,6 +95,7 @@ int ASN1_PRINTABLE_type(unsigned char *s, int len)
while ((*s) && (len-- != 0))
{
c= *(s++);
+#ifndef CHARSET_EBCDIC
if (!( ((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ||
(c == ' ') ||
@@ -108,6 +109,13 @@ int ASN1_PRINTABLE_type(unsigned char *s, int len)
ia5=1;
if (c&0x80)
t61=1;
+#else
+ if (!isalnum(c) && (c != ' ') &&
+ strchr("'()+,-./:=?", c) == NULL)
+ ia5=1;
+ if (os_toascii[c] & 0x80)
+ t61=1;
+#endif
}
if (t61) return(V_ASN1_T61STRING);
if (ia5) return(V_ASN1_IA5STRING);