diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_obj.c')
| -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 | } |
