summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3
diff options
context:
space:
mode:
authorbeck <>2014-04-15 17:46:17 +0000
committerbeck <>2014-04-15 17:46:17 +0000
commitc9414ed70ec89926c1041a64ee4b2f3ef36c90f6 (patch)
treec53c25a15cd89988cef641fa18324c5c6db28fed /src/lib/libcrypto/x509v3
parent0cfe49dc6db41fd2d4f960b618ed41b11ffffc6a (diff)
downloadopenbsd-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/x509v3')
-rw-r--r--src/lib/libcrypto/x509v3/v3_ia5.c3
-rw-r--r--src/lib/libcrypto/x509v3/v3_prn.c30
-rw-r--r--src/lib/libcrypto/x509v3/v3_utl.c18
3 files changed, 0 insertions, 51 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ia5.c b/src/lib/libcrypto/x509v3/v3_ia5.c
index 4ff12b52b5..ab1c5188b8 100644
--- a/src/lib/libcrypto/x509v3/v3_ia5.c
+++ b/src/lib/libcrypto/x509v3/v3_ia5.c
@@ -105,9 +105,6 @@ static ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
105 M_ASN1_IA5STRING_free(ia5); 105 M_ASN1_IA5STRING_free(ia5);
106 goto err; 106 goto err;
107 } 107 }
108#ifdef CHARSET_EBCDIC
109 ebcdic2ascii(ia5->data, ia5->data, ia5->length);
110#endif /*CHARSET_EBCDIC*/
111 return ia5; 108 return ia5;
112 err: 109 err:
113 X509V3err(X509V3_F_S2I_ASN1_IA5STRING,ERR_R_MALLOC_FAILURE); 110 X509V3err(X509V3_F_S2I_ASN1_IA5STRING,ERR_R_MALLOC_FAILURE);
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c
index 3146218708..2124b447b4 100644
--- a/src/lib/libcrypto/x509v3/v3_prn.c
+++ b/src/lib/libcrypto/x509v3/v3_prn.c
@@ -83,22 +83,7 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml)
83 nval = sk_CONF_VALUE_value(val, i); 83 nval = sk_CONF_VALUE_value(val, i);
84 if(!nval->name) BIO_puts(out, nval->value); 84 if(!nval->name) BIO_puts(out, nval->value);
85 else if(!nval->value) BIO_puts(out, nval->name); 85 else if(!nval->value) BIO_puts(out, nval->name);
86#ifndef CHARSET_EBCDIC
87 else BIO_printf(out, "%s:%s", nval->name, nval->value); 86 else BIO_printf(out, "%s:%s", nval->name, nval->value);
88#else
89 else {
90 int len;
91 char *tmp;
92 len = strlen(nval->value)+1;
93 tmp = OPENSSL_malloc(len);
94 if (tmp)
95 {
96 ascii2ebcdic(tmp, nval->value, len);
97 BIO_printf(out, "%s:%s", nval->name, tmp);
98 OPENSSL_free(tmp);
99 }
100 }
101#endif
102 if(ml) BIO_puts(out, "\n"); 87 if(ml) BIO_puts(out, "\n");
103 } 88 }
104} 89}
@@ -127,22 +112,7 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int inde
127 ok = 0; 112 ok = 0;
128 goto err; 113 goto err;
129 } 114 }
130#ifndef CHARSET_EBCDIC
131 BIO_printf(out, "%*s%s", indent, "", value); 115 BIO_printf(out, "%*s%s", indent, "", value);
132#else
133 {
134 int len;
135 char *tmp;
136 len = strlen(value)+1;
137 tmp = OPENSSL_malloc(len);
138 if (tmp)
139 {
140 ascii2ebcdic(tmp, value, len);
141 BIO_printf(out, "%*s%s", indent, "", tmp);
142 OPENSSL_free(tmp);
143 }
144 }
145#endif
146 } else if(method->i2v) { 116 } else if(method->i2v) {
147 if(!(nval = method->i2v(method, ext_str, NULL))) { 117 if(!(nval = method->i2v(method, ext_str, NULL))) {
148 ok = 0; 118 ok = 0;
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c
index e030234540..c4b6143eff 100644
--- a/src/lib/libcrypto/x509v3/v3_utl.c
+++ b/src/lib/libcrypto/x509v3/v3_utl.c
@@ -378,10 +378,6 @@ char *hex_to_string(const unsigned char *buffer, long len)
378 *q++ = ':'; 378 *q++ = ':';
379 } 379 }
380 q[-1] = 0; 380 q[-1] = 0;
381#ifdef CHARSET_EBCDIC
382 ebcdic2ascii(tmp, tmp, q - tmp - 1);
383#endif
384
385 return tmp; 381 return tmp;
386} 382}
387 383
@@ -400,14 +396,8 @@ unsigned char *string_to_hex(const char *str, long *len)
400 if(!(hexbuf = OPENSSL_malloc(strlen(str) >> 1))) goto err; 396 if(!(hexbuf = OPENSSL_malloc(strlen(str) >> 1))) goto err;
401 for(p = (unsigned char *)str, q = hexbuf; *p;) { 397 for(p = (unsigned char *)str, q = hexbuf; *p;) {
402 ch = *p++; 398 ch = *p++;
403#ifdef CHARSET_EBCDIC
404 ch = os_toebcdic[ch];
405#endif
406 if(ch == ':') continue; 399 if(ch == ':') continue;
407 cl = *p++; 400 cl = *p++;
408#ifdef CHARSET_EBCDIC
409 cl = os_toebcdic[cl];
410#endif
411 if(!cl) { 401 if(!cl) {
412 X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ODD_NUMBER_OF_DIGITS); 402 X509V3err(X509V3_F_STRING_TO_HEX,X509V3_R_ODD_NUMBER_OF_DIGITS);
413 OPENSSL_free(hexbuf); 403 OPENSSL_free(hexbuf);
@@ -844,21 +834,13 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE)*dn_sk,
844 * multiple instances 834 * multiple instances
845 */ 835 */
846 for(p = type; *p ; p++) 836 for(p = type; *p ; p++)
847#ifndef CHARSET_EBCDIC
848 if ((*p == ':') || (*p == ',') || (*p == '.')) 837 if ((*p == ':') || (*p == ',') || (*p == '.'))
849#else
850 if ((*p == os_toascii[':']) || (*p == os_toascii[',']) || (*p == os_toascii['.']))
851#endif
852 { 838 {
853 p++; 839 p++;
854 if(*p) type = p; 840 if(*p) type = p;
855 break; 841 break;
856 } 842 }
857#ifndef CHARSET_EBCDIC
858 if (*type == '+') 843 if (*type == '+')
859#else
860 if (*type == os_toascii['+'])
861#endif
862 { 844 {
863 mval = -1; 845 mval = -1;
864 type++; 846 type++;