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/x509 | |
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/x509')
-rw-r--r-- | src/lib/libcrypto/x509/x509_obj.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/lib/libcrypto/x509/x509_obj.c b/src/lib/libcrypto/x509/x509_obj.c index 21fed9f838..bcc1e7429e 100644 --- a/src/lib/libcrypto/x509/x509_obj.c +++ b/src/lib/libcrypto/x509/x509_obj.c | |||
@@ -75,9 +75,6 @@ int i; | |||
75 | static const char hex[17]="0123456789ABCDEF"; | 75 | static const char hex[17]="0123456789ABCDEF"; |
76 | int gs_doit[4]; | 76 | int gs_doit[4]; |
77 | char tmp_buf[80]; | 77 | char tmp_buf[80]; |
78 | #ifdef CHARSET_EBCDIC | ||
79 | char ebcdic_buf[1024]; | ||
80 | #endif | ||
81 | 78 | ||
82 | if (buf == NULL) | 79 | if (buf == NULL) |
83 | { | 80 | { |
@@ -114,20 +111,6 @@ int i; | |||
114 | type=ne->value->type; | 111 | type=ne->value->type; |
115 | num=ne->value->length; | 112 | num=ne->value->length; |
116 | q=ne->value->data; | 113 | q=ne->value->data; |
117 | #ifdef CHARSET_EBCDIC | ||
118 | if (type == V_ASN1_GENERALSTRING || | ||
119 | type == V_ASN1_VISIBLESTRING || | ||
120 | type == V_ASN1_PRINTABLESTRING || | ||
121 | type == V_ASN1_TELETEXSTRING || | ||
122 | type == V_ASN1_VISIBLESTRING || | ||
123 | type == V_ASN1_IA5STRING) { | ||
124 | ascii2ebcdic(ebcdic_buf, q, | ||
125 | (num > sizeof ebcdic_buf) | ||
126 | ? sizeof ebcdic_buf : num); | ||
127 | q=ebcdic_buf; | ||
128 | } | ||
129 | #endif | ||
130 | |||
131 | if ((type == V_ASN1_GENERALSTRING) && ((num%4) == 0)) | 114 | if ((type == V_ASN1_GENERALSTRING) && ((num%4) == 0)) |
132 | { | 115 | { |
133 | gs_doit[0]=gs_doit[1]=gs_doit[2]=gs_doit[3]=0; | 116 | gs_doit[0]=gs_doit[1]=gs_doit[2]=gs_doit[3]=0; |
@@ -149,12 +132,7 @@ int i; | |||
149 | { | 132 | { |
150 | if (!gs_doit[j&3]) continue; | 133 | if (!gs_doit[j&3]) continue; |
151 | l2++; | 134 | l2++; |
152 | #ifndef CHARSET_EBCDIC | ||
153 | if ((q[j] < ' ') || (q[j] > '~')) l2+=3; | 135 | if ((q[j] < ' ') || (q[j] > '~')) l2+=3; |
154 | #else | ||
155 | if ((os_toascii[q[j]] < os_toascii[' ']) || | ||
156 | (os_toascii[q[j]] > os_toascii['~'])) l2+=3; | ||
157 | #endif | ||
158 | } | 136 | } |
159 | 137 | ||
160 | lold=l; | 138 | lold=l; |
@@ -173,15 +151,10 @@ int i; | |||
173 | *(p++)='/'; | 151 | *(p++)='/'; |
174 | memcpy(p,s,(unsigned int)l1); p+=l1; | 152 | memcpy(p,s,(unsigned int)l1); p+=l1; |
175 | *(p++)='='; | 153 | *(p++)='='; |
176 | |||
177 | #ifndef CHARSET_EBCDIC /* q was assigned above already. */ | ||
178 | q=ne->value->data; | 154 | q=ne->value->data; |
179 | #endif | ||
180 | |||
181 | for (j=0; j<num; j++) | 155 | for (j=0; j<num; j++) |
182 | { | 156 | { |
183 | if (!gs_doit[j&3]) continue; | 157 | if (!gs_doit[j&3]) continue; |
184 | #ifndef CHARSET_EBCDIC | ||
185 | n=q[j]; | 158 | n=q[j]; |
186 | if ((n < ' ') || (n > '~')) | 159 | if ((n < ' ') || (n > '~')) |
187 | { | 160 | { |
@@ -192,19 +165,6 @@ int i; | |||
192 | } | 165 | } |
193 | else | 166 | else |
194 | *(p++)=n; | 167 | *(p++)=n; |
195 | #else | ||
196 | n=os_toascii[q[j]]; | ||
197 | if ((n < os_toascii[' ']) || | ||
198 | (n > os_toascii['~'])) | ||
199 | { | ||
200 | *(p++)='\\'; | ||
201 | *(p++)='x'; | ||
202 | *(p++)=hex[(n>>4)&0x0f]; | ||
203 | *(p++)=hex[n&0x0f]; | ||
204 | } | ||
205 | else | ||
206 | *(p++)=q[j]; | ||
207 | #endif | ||
208 | } | 168 | } |
209 | *p='\0'; | 169 | *p='\0'; |
210 | } | 170 | } |