Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Chernyakhovsky <achernya@google.com>2014-07-05 02:47:48 +0400
committerAdam Langley <agl@google.com>2014-07-07 23:30:35 +0400
commit2897ed36347fa436f6108897862251567e23110e (patch)
treecd94cde35fe43a5a420e43f848cb33a247425651 /crypto/asn1
parent8af663956519f7302284c0c36b413c0495986e14 (diff)
Remove CHARSET_EBCDIC
Since crypto/ebcdic.{c,h} are not present in BoringSSL, remove the #ifdefs Changes were made by running find . -type f -name *.c | xargs unifdef -m -U CHARSET_EBCDIC find . -type f -name *.h | xargs unifdef -m -U CHARSET_EBCDIC using unifdef 2.10. An additional two ifdefs (CHARSET_EBCDIC_not) were removed manually. Change-Id: Ie174bb00782cc44c63b0f9fab69619b3a9f66d42 Reviewed-on: https://boringssl-review.googlesource.com/1093 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/a_gentm.c3
-rw-r--r--crypto/asn1/a_mbstr.c7
-rw-r--r--crypto/asn1/a_print.c8
-rw-r--r--crypto/asn1/a_time.c15
-rw-r--r--crypto/asn1/a_utctm.c18
-rw-r--r--crypto/asn1/f_int.c9
-rw-r--r--crypto/asn1/f_string.c9
7 files changed, 0 insertions, 69 deletions
diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c
index 1b8d78ed..b5bddb8b 100644
--- a/crypto/asn1/a_gentm.c
+++ b/crypto/asn1/a_gentm.c
@@ -248,8 +248,5 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
s->length=strlen(p);
s->type=V_ASN1_GENERALIZEDTIME;
-#ifdef CHARSET_EBCDIC_not
- ebcdic2ascii(s->data, s->data, s->length);
-#endif
return(s);
}
diff --git a/crypto/asn1/a_mbstr.c b/crypto/asn1/a_mbstr.c
index 6543f528..007f0e16 100644
--- a/crypto/asn1/a_mbstr.c
+++ b/crypto/asn1/a_mbstr.c
@@ -380,16 +380,9 @@ 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;
}
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c
index e2cde687..3b6be10b 100644
--- a/crypto/asn1/a_print.c
+++ b/crypto/asn1/a_print.c
@@ -72,7 +72,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len)
while ((*s) && (len-- != 0))
{
c= *(s++);
-#ifndef CHARSET_EBCDIC
if (!( ((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ||
(c == ' ') ||
@@ -86,13 +85,6 @@ int ASN1_PRINTABLE_type(const 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);
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index 3b80ba42..4786024e 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -79,21 +79,6 @@ IMPLEMENT_ASN1_FUNCTIONS(ASN1_TIME)
#if 0
int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp)
{
-#ifdef CHARSET_EBCDIC
- /* KLUDGE! We convert to ascii before writing DER */
- char tmp[24];
- ASN1_STRING tmpstr;
-
- if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME) {
- int len;
-
- tmpstr = *(ASN1_STRING *)a;
- len = tmpstr.length;
- ebcdic2ascii(tmp, tmpstr.data, (len >= sizeof tmp) ? sizeof tmp : len);
- tmpstr.data = tmp;
- a = (ASN1_GENERALIZEDTIME *) &tmpstr;
- }
-#endif
if(a->type == V_ASN1_UTCTIME || a->type == V_ASN1_GENERALIZEDTIME)
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
a->type ,V_ASN1_UNIVERSAL));
diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c
index 72a09be8..41f35947 100644
--- a/crypto/asn1/a_utctm.c
+++ b/crypto/asn1/a_utctm.c
@@ -64,20 +64,8 @@
#if 0
int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
{
-#ifndef CHARSET_EBCDIC
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
V_ASN1_UTCTIME,V_ASN1_UNIVERSAL));
-#else
- /* KLUDGE! We convert to ascii before writing DER */
- int len;
- char tmp[24];
- ASN1_STRING x = *(ASN1_STRING *)a;
-
- len = x.length;
- ebcdic2ascii(tmp, x.data, (len >= sizeof tmp) ? sizeof tmp : len);
- x.data = tmp;
- return i2d_ASN1_bytes(&x, pp, V_ASN1_UTCTIME,V_ASN1_UNIVERSAL);
-#endif
}
@@ -93,9 +81,6 @@ ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp,
OPENSSL_PUT_ERROR(ASN1, XXX, ERR_R_NESTED_ASN1_ERROR);
return(NULL);
}
-#ifdef CHARSET_EBCDIC
- ascii2ebcdic(ret->data, ret->data, ret->length);
-#endif
if (!ASN1_UTCTIME_check(ret))
{
OPENSSL_PUT_ERROR(ASN1, XXX, ASN1_R_INVALID_TIME_FORMAT);
@@ -276,9 +261,6 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
s->length=strlen(p);
s->type=V_ASN1_UTCTIME;
-#ifdef CHARSET_EBCDIC_not
- ebcdic2ascii(s->data, s->data, s->length);
-#endif
return(s);
}
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index d9ddcf85..7b8c61a9 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -122,18 +122,9 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
for (j=0; j<i; j++)
{
-#ifndef CHARSET_EBCDIC
if (!( ((buf[j] >= '0') && (buf[j] <= '9')) ||
((buf[j] >= 'a') && (buf[j] <= 'f')) ||
((buf[j] >= 'A') && (buf[j] <= 'F'))))
-#else
- /* This #ifdef is not strictly necessary, since
- * the characters A...F a...f 0...9 are contiguous
- * (yes, even in EBCDIC - but not the whole alphabet).
- * Nevertheless, isxdigit() is faster.
- */
- if (!isxdigit(buf[j]))
-#endif
{
i=j;
break;
diff --git a/crypto/asn1/f_string.c b/crypto/asn1/f_string.c
index 95e59ff1..d6f128dd 100644
--- a/crypto/asn1/f_string.c
+++ b/crypto/asn1/f_string.c
@@ -123,18 +123,9 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
for (j=i-1; j>0; j--)
{
-#ifndef CHARSET_EBCDIC
if (!( ((buf[j] >= '0') && (buf[j] <= '9')) ||
((buf[j] >= 'a') && (buf[j] <= 'f')) ||
((buf[j] >= 'A') && (buf[j] <= 'F'))))
-#else
- /* This #ifdef is not strictly necessary, since
- * the characters A...F a...f 0...9 are contiguous
- * (yes, even in EBCDIC - but not the whole alphabet).
- * Nevertheless, isxdigit() is faster.
- */
- if (!isxdigit(buf[j]))
-#endif
{
i=j;
break;