diff options
author | Alex Chernyakhovsky <achernya@google.com> | 2014-07-05 02:47:48 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-07-07 23:30:35 +0400 |
commit | 2897ed36347fa436f6108897862251567e23110e (patch) | |
tree | cd94cde35fe43a5a420e43f848cb33a247425651 /crypto/x509 | |
parent | 8af663956519f7302284c0c36b413c0495986e14 (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/x509')
-rw-r--r-- | crypto/x509/t_x509.c | 10 | ||||
-rw-r--r-- | crypto/x509/x509_obj.c | 37 |
2 files changed, 0 insertions, 47 deletions
diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c index 91d4ac71..91a52de5 100644 --- a/crypto/x509/t_x509.c +++ b/crypto/x509/t_x509.c @@ -473,7 +473,6 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase) c=s; for (;;) { -#ifndef CHARSET_EBCDIC if ( ((*s == '/') && ((s[1] >= 'A') && (s[1] <= 'Z') && ( (s[2] == '=') || @@ -481,15 +480,6 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase) (s[3] == '=')) ))) || (*s == '\0')) -#else - if ( ((*s == '/') && - (isupper(s[1]) && ( - (s[2] == '=') || - (isupper(s[2]) && - (s[3] == '=')) - ))) || - (*s == '\0')) -#endif { i=s-c; if (BIO_write(bp,c,i) != i) goto err; diff --git a/crypto/x509/x509_obj.c b/crypto/x509/x509_obj.c index 434108ce..5f539ab5 100644 --- a/crypto/x509/x509_obj.c +++ b/crypto/x509/x509_obj.c @@ -75,9 +75,6 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) static const char hex[17]="0123456789ABCDEF"; int gs_doit[4]; char tmp_buf[80]; -#ifdef CHARSET_EBCDIC - char ebcdic_buf[1024]; -#endif if (buf == NULL) { @@ -114,19 +111,6 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) type=ne->value->type; num=ne->value->length; q=ne->value->data; -#ifdef CHARSET_EBCDIC - if (type == V_ASN1_GENERALSTRING || - type == V_ASN1_VISIBLESTRING || - type == V_ASN1_PRINTABLESTRING || - type == V_ASN1_TELETEXSTRING || - type == V_ASN1_VISIBLESTRING || - type == V_ASN1_IA5STRING) { - ascii2ebcdic(ebcdic_buf, q, - (num > sizeof ebcdic_buf) - ? sizeof ebcdic_buf : num); - q=ebcdic_buf; - } -#endif if ((type == V_ASN1_GENERALSTRING) && ((num%4) == 0)) { @@ -149,12 +133,7 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) { if (!gs_doit[j&3]) continue; l2++; -#ifndef CHARSET_EBCDIC if ((q[j] < ' ') || (q[j] > '~')) l2+=3; -#else - if ((os_toascii[q[j]] < os_toascii[' ']) || - (os_toascii[q[j]] > os_toascii['~'])) l2+=3; -#endif } lold=l; @@ -174,14 +153,11 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) memcpy(p,s,(unsigned int)l1); p+=l1; *(p++)='='; -#ifndef CHARSET_EBCDIC /* q was assigned above already. */ q=ne->value->data; -#endif for (j=0; j<num; j++) { if (!gs_doit[j&3]) continue; -#ifndef CHARSET_EBCDIC n=q[j]; if ((n < ' ') || (n > '~')) { @@ -192,19 +168,6 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len) } else *(p++)=n; -#else - n=os_toascii[q[j]]; - if ((n < os_toascii[' ']) || - (n > os_toascii['~'])) - { - *(p++)='\\'; - *(p++)='x'; - *(p++)=hex[(n>>4)&0x0f]; - *(p++)=hex[n&0x0f]; - } - else - *(p++)=q[j]; -#endif } *p='\0'; } |