diff options
author | beck <> | 2014-04-15 17:46:17 +0000 |
---|---|---|
committer | beck <> | 2014-04-15 17:46:17 +0000 |
commit | c9414ed70ec89926c1041a64ee4b2f3ef36c90f6 (patch) | |
tree | c53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/asn1 | |
parent | 0cfe49dc6db41fd2d4f960b618ed41b11ffffc6a (diff) | |
download | openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.gz openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.tar.bz2 openbsd-c9414ed70ec89926c1041a64ee4b2f3ef36c90f6.zip |
Send the rotIBM stream cipher (ebcdic) to Valhalla to party for eternity
with the bearded ones...
some API's that nobody should be using will dissapear with this commit.
Diffstat (limited to 'src/lib/libcrypto/asn1')
-rw-r--r-- | src/lib/libcrypto/asn1/a_gentm.c | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/a_mbstr.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/a_print.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/a_time.c | 15 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/a_utctm.c | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/f_int.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/f_string.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/t_x509.c | 10 |
8 files changed, 0 insertions, 94 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index 04266e790a..4f312ee6c9 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
@@ -68,18 +68,6 @@ | |||
68 | 68 | ||
69 | int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp) | 69 | int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp) |
70 | { | 70 | { |
71 | #ifdef CHARSET_EBCDIC | ||
72 | /* KLUDGE! We convert to ascii before writing DER */ | ||
73 | int len; | ||
74 | char tmp[24]; | ||
75 | ASN1_STRING tmpstr = *(ASN1_STRING *)a; | ||
76 | |||
77 | len = tmpstr.length; | ||
78 | ebcdic2ascii(tmp, tmpstr.data, (len >= sizeof tmp) ? sizeof tmp : len); | ||
79 | tmpstr.data = tmp; | ||
80 | |||
81 | a = (ASN1_GENERALIZEDTIME *) &tmpstr; | ||
82 | #endif | ||
83 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | 71 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, |
84 | V_ASN1_GENERALIZEDTIME,V_ASN1_UNIVERSAL)); | 72 | V_ASN1_GENERALIZEDTIME,V_ASN1_UNIVERSAL)); |
85 | } | 73 | } |
@@ -97,9 +85,6 @@ ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, | |||
97 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ERR_R_NESTED_ASN1_ERROR); | 85 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ERR_R_NESTED_ASN1_ERROR); |
98 | return(NULL); | 86 | return(NULL); |
99 | } | 87 | } |
100 | #ifdef CHARSET_EBCDIC | ||
101 | ascii2ebcdic(ret->data, ret->data, ret->length); | ||
102 | #endif | ||
103 | if (!ASN1_GENERALIZEDTIME_check(ret)) | 88 | if (!ASN1_GENERALIZEDTIME_check(ret)) |
104 | { | 89 | { |
105 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ASN1_R_INVALID_TIME_FORMAT); | 90 | ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ASN1_R_INVALID_TIME_FORMAT); |
@@ -256,8 +241,5 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, | |||
256 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 241 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
257 | s->length=strlen(p); | 242 | s->length=strlen(p); |
258 | s->type=V_ASN1_GENERALIZEDTIME; | 243 | s->type=V_ASN1_GENERALIZEDTIME; |
259 | #ifdef CHARSET_EBCDIC_not | ||
260 | ebcdic2ascii(s->data, s->data, s->length); | ||
261 | #endif | ||
262 | return(s); | 244 | return(s); |
263 | } | 245 | } |
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index 264d8f677f..dc953c8325 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -385,16 +385,9 @@ static int is_printable(unsigned long value) | |||
385 | /* Note: we can't use 'isalnum' because certain accented | 385 | /* Note: we can't use 'isalnum' because certain accented |
386 | * characters may count as alphanumeric in some environments. | 386 | * characters may count as alphanumeric in some environments. |
387 | */ | 387 | */ |
388 | #ifndef CHARSET_EBCDIC | ||
389 | if((ch >= 'a') && (ch <= 'z')) return 1; | 388 | if((ch >= 'a') && (ch <= 'z')) return 1; |
390 | if((ch >= 'A') && (ch <= 'Z')) return 1; | 389 | if((ch >= 'A') && (ch <= 'Z')) return 1; |
391 | if((ch >= '0') && (ch <= '9')) return 1; | 390 | if((ch >= '0') && (ch <= '9')) return 1; |
392 | if ((ch == ' ') || strchr("'()+,-./:=?", ch)) return 1; | 391 | if ((ch == ' ') || strchr("'()+,-./:=?", ch)) return 1; |
393 | #else /*CHARSET_EBCDIC*/ | ||
394 | if((ch >= os_toascii['a']) && (ch <= os_toascii['z'])) return 1; | ||
395 | if((ch >= os_toascii['A']) && (ch <= os_toascii['Z'])) return 1; | ||
396 | if((ch >= os_toascii['0']) && (ch <= os_toascii['9'])) return 1; | ||
397 | if ((ch == os_toascii[' ']) || strchr("'()+,-./:=?", os_toebcdic[ch])) return 1; | ||
398 | #endif /*CHARSET_EBCDIC*/ | ||
399 | return 0; | 392 | return 0; |
400 | } | 393 | } |
diff --git a/src/lib/libcrypto/asn1/a_print.c b/src/lib/libcrypto/asn1/a_print.c index d18e772320..9eec5034e1 100644 --- a/src/lib/libcrypto/asn1/a_print.c +++ b/src/lib/libcrypto/asn1/a_print.c | |||
@@ -72,7 +72,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len) | |||
72 | while ((*s) && (len-- != 0)) | 72 | while ((*s) && (len-- != 0)) |
73 | { | 73 | { |
74 | c= *(s++); | 74 | c= *(s++); |
75 | #ifndef CHARSET_EBCDIC | ||
76 | if (!( ((c >= 'a') && (c <= 'z')) || | 75 | if (!( ((c >= 'a') && (c <= 'z')) || |
77 | ((c >= 'A') && (c <= 'Z')) || | 76 | ((c >= 'A') && (c <= 'Z')) || |
78 | (c == ' ') || | 77 | (c == ' ') || |
@@ -86,13 +85,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len) | |||
86 | ia5=1; | 85 | ia5=1; |
87 | if (c&0x80) | 86 | if (c&0x80) |
88 | t61=1; | 87 | t61=1; |
89 | #else | ||
90 | if (!isalnum(c) && (c != ' ') && | ||
91 | strchr("'()+,-./:=?", c) == NULL) | ||
92 | ia5=1; | ||
93 | if (os_toascii[c] & 0x80) | ||
94 | t61=1; | ||
95 | #endif | ||
96 | } | 88 | } |
97 | if (t61) return(V_ASN1_T61STRING); | 89 | if (t61) return(V_ASN1_T61STRING); |
98 | if (ia5) return(V_ASN1_IA5STRING); | 90 | if (ia5) return(V_ASN1_IA5STRING); |
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c index e2eb9b243e..4ade88f065 100644 --- a/src/lib/libcrypto/asn1/a_time.c +++ b/src/lib/libcrypto/asn1/a_time.c | |||
@@ -74,21 +74,6 @@ IMPLEMENT_ASN1_FUNCTIONS(ASN1_TIME) | |||
74 | #if 0 | 74 | #if 0 |
75 | int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp) | 75 | int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp) |
76 | { | 76 | { |
77 | #ifdef CHARSET_EBCDIC | ||
78 | /* KLUDGE! We convert to ascii before writing DER */ | ||
79 | char tmp[24]; | ||
80 | ASN1_STRING tmpstr; | ||
81 | |||
82 | if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME) { | ||
83 | int len; | ||
84 | |||
85 | tmpstr = *(ASN1_STRING *)a; | ||
86 | len = tmpstr.length; | ||
87 | ebcdic2ascii(tmp, tmpstr.data, (len >= sizeof tmp) ? sizeof tmp : len); | ||
88 | tmpstr.data = tmp; | ||
89 | a = (ASN1_GENERALIZEDTIME *) &tmpstr; | ||
90 | } | ||
91 | #endif | ||
92 | if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME) | 77 | if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME) |
93 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | 78 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, |
94 | a->type ,V_ASN1_UNIVERSAL)); | 79 | a->type ,V_ASN1_UNIVERSAL)); |
diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c index 615395b738..f2e7de16af 100644 --- a/src/lib/libcrypto/asn1/a_utctm.c +++ b/src/lib/libcrypto/asn1/a_utctm.c | |||
@@ -65,20 +65,8 @@ | |||
65 | #if 0 | 65 | #if 0 |
66 | int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp) | 66 | int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp) |
67 | { | 67 | { |
68 | #ifndef CHARSET_EBCDIC | ||
69 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | 68 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, |
70 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL)); | 69 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL)); |
71 | #else | ||
72 | /* KLUDGE! We convert to ascii before writing DER */ | ||
73 | int len; | ||
74 | char tmp[24]; | ||
75 | ASN1_STRING x = *(ASN1_STRING *)a; | ||
76 | |||
77 | len = x.length; | ||
78 | ebcdic2ascii(tmp, x.data, (len >= sizeof tmp) ? sizeof tmp : len); | ||
79 | x.data = tmp; | ||
80 | return i2d_ASN1_bytes(&x, pp, V_ASN1_UTCTIME,V_ASN1_UNIVERSAL); | ||
81 | #endif | ||
82 | } | 70 | } |
83 | 71 | ||
84 | 72 | ||
@@ -94,9 +82,6 @@ ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp, | |||
94 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ERR_R_NESTED_ASN1_ERROR); | 82 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ERR_R_NESTED_ASN1_ERROR); |
95 | return(NULL); | 83 | return(NULL); |
96 | } | 84 | } |
97 | #ifdef CHARSET_EBCDIC | ||
98 | ascii2ebcdic(ret->data, ret->data, ret->length); | ||
99 | #endif | ||
100 | if (!ASN1_UTCTIME_check(ret)) | 85 | if (!ASN1_UTCTIME_check(ret)) |
101 | { | 86 | { |
102 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_INVALID_TIME_FORMAT); | 87 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_INVALID_TIME_FORMAT); |
@@ -233,9 +218,6 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | |||
233 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 218 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
234 | s->length=strlen(p); | 219 | s->length=strlen(p); |
235 | s->type=V_ASN1_UTCTIME; | 220 | s->type=V_ASN1_UTCTIME; |
236 | #ifdef CHARSET_EBCDIC_not | ||
237 | ebcdic2ascii(s->data, s->data, s->length); | ||
238 | #endif | ||
239 | return(s); | 221 | return(s); |
240 | } | 222 | } |
241 | 223 | ||
diff --git a/src/lib/libcrypto/asn1/f_int.c b/src/lib/libcrypto/asn1/f_int.c index 9494e597ab..8b92fad9df 100644 --- a/src/lib/libcrypto/asn1/f_int.c +++ b/src/lib/libcrypto/asn1/f_int.c | |||
@@ -123,18 +123,9 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) | |||
123 | 123 | ||
124 | for (j=0; j<i; j++) | 124 | for (j=0; j<i; j++) |
125 | { | 125 | { |
126 | #ifndef CHARSET_EBCDIC | ||
127 | if (!( ((buf[j] >= '0') && (buf[j] <= '9')) || | 126 | if (!( ((buf[j] >= '0') && (buf[j] <= '9')) || |
128 | ((buf[j] >= 'a') && (buf[j] <= 'f')) || | 127 | ((buf[j] >= 'a') && (buf[j] <= 'f')) || |
129 | ((buf[j] >= 'A') && (buf[j] <= 'F')))) | 128 | ((buf[j] >= 'A') && (buf[j] <= 'F')))) |
130 | #else | ||
131 | /* This #ifdef is not strictly necessary, since | ||
132 | * the characters A...F a...f 0...9 are contiguous | ||
133 | * (yes, even in EBCDIC - but not the whole alphabet). | ||
134 | * Nevertheless, isxdigit() is faster. | ||
135 | */ | ||
136 | if (!isxdigit(buf[j])) | ||
137 | #endif | ||
138 | { | 129 | { |
139 | i=j; | 130 | i=j; |
140 | break; | 131 | break; |
diff --git a/src/lib/libcrypto/asn1/f_string.c b/src/lib/libcrypto/asn1/f_string.c index 968698a798..f7d36adac7 100644 --- a/src/lib/libcrypto/asn1/f_string.c +++ b/src/lib/libcrypto/asn1/f_string.c | |||
@@ -123,18 +123,9 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) | |||
123 | 123 | ||
124 | for (j=i-1; j>0; j--) | 124 | for (j=i-1; j>0; j--) |
125 | { | 125 | { |
126 | #ifndef CHARSET_EBCDIC | ||
127 | if (!( ((buf[j] >= '0') && (buf[j] <= '9')) || | 126 | if (!( ((buf[j] >= '0') && (buf[j] <= '9')) || |
128 | ((buf[j] >= 'a') && (buf[j] <= 'f')) || | 127 | ((buf[j] >= 'a') && (buf[j] <= 'f')) || |
129 | ((buf[j] >= 'A') && (buf[j] <= 'F')))) | 128 | ((buf[j] >= 'A') && (buf[j] <= 'F')))) |
130 | #else | ||
131 | /* This #ifdef is not strictly necessary, since | ||
132 | * the characters A...F a...f 0...9 are contiguous | ||
133 | * (yes, even in EBCDIC - but not the whole alphabet). | ||
134 | * Nevertheless, isxdigit() is faster. | ||
135 | */ | ||
136 | if (!isxdigit(buf[j])) | ||
137 | #endif | ||
138 | { | 129 | { |
139 | i=j; | 130 | i=j; |
140 | break; | 131 | break; |
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c index edbb39a02f..bbf00c7a29 100644 --- a/src/lib/libcrypto/asn1/t_x509.c +++ b/src/lib/libcrypto/asn1/t_x509.c | |||
@@ -485,7 +485,6 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase) | |||
485 | c=s; | 485 | c=s; |
486 | for (;;) | 486 | for (;;) |
487 | { | 487 | { |
488 | #ifndef CHARSET_EBCDIC | ||
489 | if ( ((*s == '/') && | 488 | if ( ((*s == '/') && |
490 | ((s[1] >= 'A') && (s[1] <= 'Z') && ( | 489 | ((s[1] >= 'A') && (s[1] <= 'Z') && ( |
491 | (s[2] == '=') || | 490 | (s[2] == '=') || |
@@ -493,15 +492,6 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase) | |||
493 | (s[3] == '=')) | 492 | (s[3] == '=')) |
494 | ))) || | 493 | ))) || |
495 | (*s == '\0')) | 494 | (*s == '\0')) |
496 | #else | ||
497 | if ( ((*s == '/') && | ||
498 | (isupper(s[1]) && ( | ||
499 | (s[2] == '=') || | ||
500 | (isupper(s[2]) && | ||
501 | (s[3] == '=')) | ||
502 | ))) || | ||
503 | (*s == '\0')) | ||
504 | #endif | ||
505 | { | 495 | { |
506 | i=s-c; | 496 | i=s-c; |
507 | if (BIO_write(bp,c,i) != i) goto err; | 497 | if (BIO_write(bp,c,i) != i) goto err; |