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/x509v3 | |
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/x509v3')
-rw-r--r-- | crypto/x509v3/v3_ia5.c | 3 | ||||
-rw-r--r-- | crypto/x509v3/v3_prn.c | 30 | ||||
-rw-r--r-- | crypto/x509v3/v3_utl.c | 17 |
3 files changed, 0 insertions, 50 deletions
diff --git a/crypto/x509v3/v3_ia5.c b/crypto/x509v3/v3_ia5.c index 04ef05c1..39d6ef8a 100644 --- a/crypto/x509v3/v3_ia5.c +++ b/crypto/x509v3/v3_ia5.c @@ -109,9 +109,6 @@ static ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, M_ASN1_IA5STRING_free(ia5); goto err; } -#ifdef CHARSET_EBCDIC - ebcdic2ascii(ia5->data, ia5->data, ia5->length); -#endif /*CHARSET_EBCDIC*/ return ia5; err: OPENSSL_PUT_ERROR(X509V3, s2i_ASN1_IA5STRING, ERR_R_MALLOC_FAILURE); diff --git a/crypto/x509v3/v3_prn.c b/crypto/x509v3/v3_prn.c index 33746009..87aef4d4 100644 --- a/crypto/x509v3/v3_prn.c +++ b/crypto/x509v3/v3_prn.c @@ -85,22 +85,7 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) nval = sk_CONF_VALUE_value(val, i); if(!nval->name) BIO_puts(out, nval->value); else if(!nval->value) BIO_puts(out, nval->name); -#ifndef CHARSET_EBCDIC else BIO_printf(out, "%s:%s", nval->name, nval->value); -#else - else { - int len; - char *tmp; - len = strlen(nval->value)+1; - tmp = OPENSSL_malloc(len); - if (tmp) - { - ascii2ebcdic(tmp, nval->value, len); - BIO_printf(out, "%s:%s", nval->name, tmp); - OPENSSL_free(tmp); - } - } -#endif if(ml) BIO_puts(out, "\n"); } } @@ -129,22 +114,7 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int inde ok = 0; goto err; } -#ifndef CHARSET_EBCDIC BIO_printf(out, "%*s%s", indent, "", value); -#else - { - int len; - char *tmp; - len = strlen(value)+1; - tmp = OPENSSL_malloc(len); - if (tmp) - { - ascii2ebcdic(tmp, value, len); - BIO_printf(out, "%*s%s", indent, "", tmp); - OPENSSL_free(tmp); - } - } -#endif } else if(method->i2v) { if(!(nval = method->i2v(method, ext_str, NULL))) { ok = 0; diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 3bbc6060..4cd0c0ca 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -383,9 +383,6 @@ char *hex_to_string(const unsigned char *buffer, long len) *q++ = ':'; } q[-1] = 0; -#ifdef CHARSET_EBCDIC - ebcdic2ascii(tmp, tmp, q - tmp - 1); -#endif return tmp; } @@ -405,14 +402,8 @@ unsigned char *string_to_hex(const char *str, long *len) if(!(hexbuf = OPENSSL_malloc(strlen(str) >> 1))) goto err; for(p = (unsigned char *)str, q = hexbuf; *p;) { ch = *p++; -#ifdef CHARSET_EBCDIC - ch = os_toebcdic[ch]; -#endif if(ch == ':') continue; cl = *p++; -#ifdef CHARSET_EBCDIC - cl = os_toebcdic[cl]; -#endif if(!cl) { OPENSSL_PUT_ERROR(X509V3, string_to_hex, X509V3_R_ODD_NUMBER_OF_DIGITS); OPENSSL_free(hexbuf); @@ -1281,21 +1272,13 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE)*dn_sk, * multiple instances */ for(p = type; *p ; p++) -#ifndef CHARSET_EBCDIC if ((*p == ':') || (*p == ',') || (*p == '.')) -#else - if ((*p == os_toascii[':']) || (*p == os_toascii[',']) || (*p == os_toascii['.'])) -#endif { p++; if(*p) type = p; break; } -#ifndef CHARSET_EBCDIC if (*type == '+') -#else - if (*type == os_toascii['+']) -#endif { mval = -1; type++; |