diff options
author | markus <> | 2002-09-05 12:51:52 +0000 |
---|---|---|
committer | markus <> | 2002-09-05 12:51:52 +0000 |
commit | 5514995a9d5ed91db089875adb509c7781357c0e (patch) | |
tree | 2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto | |
parent | fd9566423b542798f5c8b06e68101a9ea5bb9885 (diff) | |
download | openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2 openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto')
166 files changed, 17929 insertions, 7119 deletions
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c index 226474f057..cd09f68b38 100644 --- a/src/lib/libcrypto/asn1/a_gentm.c +++ b/src/lib/libcrypto/asn1/a_gentm.c | |||
@@ -61,8 +61,11 @@ | |||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include <time.h> | 62 | #include <time.h> |
63 | #include "cryptlib.h" | 63 | #include "cryptlib.h" |
64 | #include "o_time.h" | ||
64 | #include <openssl/asn1.h> | 65 | #include <openssl/asn1.h> |
65 | 66 | ||
67 | #if 0 | ||
68 | |||
66 | int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp) | 69 | int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp) |
67 | { | 70 | { |
68 | #ifdef CHARSET_EBCDIC | 71 | #ifdef CHARSET_EBCDIC |
@@ -106,10 +109,12 @@ ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a, | |||
106 | return(ret); | 109 | return(ret); |
107 | err: | 110 | err: |
108 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | 111 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) |
109 | ASN1_GENERALIZEDTIME_free(ret); | 112 | M_ASN1_GENERALIZEDTIME_free(ret); |
110 | return(NULL); | 113 | return(NULL); |
111 | } | 114 | } |
112 | 115 | ||
116 | #endif | ||
117 | |||
113 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) | 118 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) |
114 | { | 119 | { |
115 | static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0}; | 120 | static int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0}; |
@@ -141,6 +146,19 @@ int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) | |||
141 | 146 | ||
142 | if ((n < min[i]) || (n > max[i])) goto err; | 147 | if ((n < min[i]) || (n > max[i])) goto err; |
143 | } | 148 | } |
149 | /* Optional fractional seconds: decimal point followed by one | ||
150 | * or more digits. | ||
151 | */ | ||
152 | if (a[o] == '.') | ||
153 | { | ||
154 | if (++o > l) goto err; | ||
155 | i = o; | ||
156 | while ((a[o] >= '0') && (a[o] <= '9') && (o <= l)) | ||
157 | o++; | ||
158 | /* Must have at least one digit after decimal point */ | ||
159 | if (i == o) goto err; | ||
160 | } | ||
161 | |||
144 | if (a[o] == 'Z') | 162 | if (a[o] == 'Z') |
145 | o++; | 163 | o++; |
146 | else if ((a[o] == '+') || (a[o] == '-')) | 164 | else if ((a[o] == '+') || (a[o] == '-')) |
@@ -176,6 +194,7 @@ int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, char *str) | |||
176 | { | 194 | { |
177 | ASN1_STRING_set((ASN1_STRING *)s, | 195 | ASN1_STRING_set((ASN1_STRING *)s, |
178 | (unsigned char *)str,t.length); | 196 | (unsigned char *)str,t.length); |
197 | s->type=V_ASN1_GENERALIZEDTIME; | ||
179 | } | 198 | } |
180 | return(1); | 199 | return(1); |
181 | } | 200 | } |
@@ -188,28 +207,24 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, | |||
188 | { | 207 | { |
189 | char *p; | 208 | char *p; |
190 | struct tm *ts; | 209 | struct tm *ts; |
191 | #if defined(THREADS) && !defined(WIN32) | ||
192 | struct tm data; | 210 | struct tm data; |
193 | #endif | ||
194 | 211 | ||
195 | if (s == NULL) | 212 | if (s == NULL) |
196 | s=ASN1_GENERALIZEDTIME_new(); | 213 | s=M_ASN1_GENERALIZEDTIME_new(); |
197 | if (s == NULL) | 214 | if (s == NULL) |
198 | return(NULL); | 215 | return(NULL); |
199 | 216 | ||
200 | #if defined(THREADS) && !defined(WIN32) | 217 | ts=OPENSSL_gmtime(&t, &data); |
201 | gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ | 218 | if (ts == NULL) |
202 | ts=&data; | 219 | return(NULL); |
203 | #else | 220 | |
204 | ts=gmtime(&t); | ||
205 | #endif | ||
206 | p=(char *)s->data; | 221 | p=(char *)s->data; |
207 | if ((p == NULL) || (s->length < 16)) | 222 | if ((p == NULL) || (s->length < 16)) |
208 | { | 223 | { |
209 | p=Malloc(20); | 224 | p=OPENSSL_malloc(20); |
210 | if (p == NULL) return(NULL); | 225 | if (p == NULL) return(NULL); |
211 | if (s->data != NULL) | 226 | if (s->data != NULL) |
212 | Free(s->data); | 227 | OPENSSL_free(s->data); |
213 | s->data=(unsigned char *)p; | 228 | s->data=(unsigned char *)p; |
214 | } | 229 | } |
215 | 230 | ||
diff --git a/src/lib/libcrypto/asn1/a_hdr.c b/src/lib/libcrypto/asn1/a_hdr.c index 4fb7a5fa75..b1aad81f77 100644 --- a/src/lib/libcrypto/asn1/a_hdr.c +++ b/src/lib/libcrypto/asn1/a_hdr.c | |||
@@ -58,19 +58,10 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "asn1_mac.h" | 61 | #include <openssl/asn1_mac.h> |
62 | #include "asn1.h" | 62 | #include <openssl/asn1.h> |
63 | 63 | ||
64 | /* | 64 | int i2d_ASN1_HEADER(ASN1_HEADER *a, unsigned char **pp) |
65 | * ASN1err(ASN1_F_D2I_ASN1_HEADER,ASN1_R_LENGTH_MISMATCH); | ||
66 | * ASN1err(ASN1_F_I2D_ASN1_HEADER,ASN1_R_BAD_GET_OBJECT); | ||
67 | * ASN1err(ASN1_F_I2D_ASN1_HEADER,ASN1_R_BAD_GET_OBJECT); | ||
68 | * ASN1err(ASN1_F_ASN1_HEADER_NEW,ASN1_R_BAD_GET_OBJECT); | ||
69 | */ | ||
70 | |||
71 | int i2d_ASN1_HEADER(a,pp) | ||
72 | ASN1_HEADER *a; | ||
73 | unsigned char **pp; | ||
74 | { | 65 | { |
75 | M_ASN1_I2D_vars(a); | 66 | M_ASN1_I2D_vars(a); |
76 | 67 | ||
@@ -85,10 +76,8 @@ unsigned char **pp; | |||
85 | M_ASN1_I2D_finish(); | 76 | M_ASN1_I2D_finish(); |
86 | } | 77 | } |
87 | 78 | ||
88 | ASN1_HEADER *d2i_ASN1_HEADER(a,pp,length) | 79 | ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a, unsigned char **pp, |
89 | ASN1_HEADER **a; | 80 | long length) |
90 | unsigned char **pp; | ||
91 | long length; | ||
92 | { | 81 | { |
93 | M_ASN1_D2I_vars(a,ASN1_HEADER *,ASN1_HEADER_new); | 82 | M_ASN1_D2I_vars(a,ASN1_HEADER *,ASN1_HEADER_new); |
94 | 83 | ||
@@ -107,24 +96,24 @@ long length; | |||
107 | M_ASN1_D2I_Finish(a,ASN1_HEADER_free,ASN1_F_D2I_ASN1_HEADER); | 96 | M_ASN1_D2I_Finish(a,ASN1_HEADER_free,ASN1_F_D2I_ASN1_HEADER); |
108 | } | 97 | } |
109 | 98 | ||
110 | ASN1_HEADER *ASN1_HEADER_new() | 99 | ASN1_HEADER *ASN1_HEADER_new(void) |
111 | { | 100 | { |
112 | ASN1_HEADER *ret=NULL; | 101 | ASN1_HEADER *ret=NULL; |
102 | ASN1_CTX c; | ||
113 | 103 | ||
114 | M_ASN1_New_Malloc(ret,ASN1_HEADER); | 104 | M_ASN1_New_Malloc(ret,ASN1_HEADER); |
115 | M_ASN1_New(ret->header,ASN1_OCTET_STRING_new); | 105 | M_ASN1_New(ret->header,M_ASN1_OCTET_STRING_new); |
116 | ret->meth=NULL; | 106 | ret->meth=NULL; |
117 | ret->data=NULL; | 107 | ret->data=NULL; |
118 | return(ret); | 108 | return(ret); |
119 | M_ASN1_New_Error(ASN1_F_ASN1_HEADER_NEW); | 109 | M_ASN1_New_Error(ASN1_F_ASN1_HEADER_NEW); |
120 | } | 110 | } |
121 | 111 | ||
122 | void ASN1_HEADER_free(a) | 112 | void ASN1_HEADER_free(ASN1_HEADER *a) |
123 | ASN1_HEADER *a; | ||
124 | { | 113 | { |
125 | if (a == NULL) return; | 114 | if (a == NULL) return; |
126 | ASN1_OCTET_STRING_free(a->header); | 115 | M_ASN1_OCTET_STRING_free(a->header); |
127 | if (a->meth != NULL) | 116 | if (a->meth != NULL) |
128 | a->meth->destroy(a->data); | 117 | a->meth->destroy(a->data); |
129 | Free((char *)a); | 118 | OPENSSL_free(a); |
130 | } | 119 | } |
diff --git a/src/lib/libcrypto/asn1/a_meth.c b/src/lib/libcrypto/asn1/a_meth.c index 513625c305..63158e9cab 100644 --- a/src/lib/libcrypto/asn1/a_meth.c +++ b/src/lib/libcrypto/asn1/a_meth.c | |||
@@ -58,8 +58,8 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "buffer.h" | 61 | #include <openssl/buffer.h> |
62 | #include "x509.h" | 62 | #include <openssl/asn1.h> |
63 | 63 | ||
64 | static ASN1_METHOD ia5string_meth={ | 64 | static ASN1_METHOD ia5string_meth={ |
65 | (int (*)()) i2d_ASN1_IA5STRING, | 65 | (int (*)()) i2d_ASN1_IA5STRING, |
@@ -73,12 +73,12 @@ static ASN1_METHOD bit_string_meth={ | |||
73 | (char *(*)()) ASN1_STRING_new, | 73 | (char *(*)()) ASN1_STRING_new, |
74 | (void (*)()) ASN1_STRING_free}; | 74 | (void (*)()) ASN1_STRING_free}; |
75 | 75 | ||
76 | ASN1_METHOD *ASN1_IA5STRING_asn1_meth() | 76 | ASN1_METHOD *ASN1_IA5STRING_asn1_meth(void) |
77 | { | 77 | { |
78 | return(&ia5string_meth); | 78 | return(&ia5string_meth); |
79 | } | 79 | } |
80 | 80 | ||
81 | ASN1_METHOD *ASN1_BIT_STRING_asn1_meth() | 81 | ASN1_METHOD *ASN1_BIT_STRING_asn1_meth(void) |
82 | { | 82 | { |
83 | return(&bit_string_meth); | 83 | return(&bit_string_meth); |
84 | } | 84 | } |
diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c index 17a7abbb67..ed2d827db2 100644 --- a/src/lib/libcrypto/asn1/a_utctm.c +++ b/src/lib/libcrypto/asn1/a_utctm.c | |||
@@ -59,25 +59,31 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <time.h> | 60 | #include <time.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include "asn1.h" | 62 | #include "o_time.h" |
63 | #include <openssl/asn1.h> | ||
63 | 64 | ||
64 | /* ASN1err(ASN1_F_ASN1_UTCTIME_NEW,ASN1_R_UTCTIME_TOO_LONG); | 65 | #if 0 |
65 | * ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_EXPECTING_A_UTCTIME); | 66 | int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp) |
66 | */ | ||
67 | |||
68 | int i2d_ASN1_UTCTIME(a,pp) | ||
69 | ASN1_UTCTIME *a; | ||
70 | unsigned char **pp; | ||
71 | { | 67 | { |
68 | #ifndef CHARSET_EBCDIC | ||
72 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | 69 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, |
73 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL)); | 70 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL)); |
71 | #else | ||
72 | /* KLUDGE! We convert to ascii before writing DER */ | ||
73 | int len; | ||
74 | char tmp[24]; | ||
75 | ASN1_STRING x = *(ASN1_STRING *)a; | ||
76 | |||
77 | len = x.length; | ||
78 | ebcdic2ascii(tmp, x.data, (len >= sizeof tmp) ? sizeof tmp : len); | ||
79 | x.data = tmp; | ||
80 | return i2d_ASN1_bytes(&x, pp, V_ASN1_UTCTIME,V_ASN1_UNIVERSAL); | ||
81 | #endif | ||
74 | } | 82 | } |
75 | 83 | ||
76 | 84 | ||
77 | ASN1_UTCTIME *d2i_ASN1_UTCTIME(a, pp, length) | 85 | ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp, |
78 | ASN1_UTCTIME **a; | 86 | long length) |
79 | unsigned char **pp; | ||
80 | long length; | ||
81 | { | 87 | { |
82 | ASN1_UTCTIME *ret=NULL; | 88 | ASN1_UTCTIME *ret=NULL; |
83 | 89 | ||
@@ -85,9 +91,12 @@ long length; | |||
85 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL); | 91 | V_ASN1_UTCTIME,V_ASN1_UNIVERSAL); |
86 | if (ret == NULL) | 92 | if (ret == NULL) |
87 | { | 93 | { |
88 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_ERROR_STACK); | 94 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ERR_R_NESTED_ASN1_ERROR); |
89 | return(NULL); | 95 | return(NULL); |
90 | } | 96 | } |
97 | #ifdef CHARSET_EBCDIC | ||
98 | ascii2ebcdic(ret->data, ret->data, ret->length); | ||
99 | #endif | ||
91 | if (!ASN1_UTCTIME_check(ret)) | 100 | if (!ASN1_UTCTIME_check(ret)) |
92 | { | 101 | { |
93 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_INVALID_TIME_FORMAT); | 102 | ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_INVALID_TIME_FORMAT); |
@@ -97,12 +106,13 @@ long length; | |||
97 | return(ret); | 106 | return(ret); |
98 | err: | 107 | err: |
99 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) | 108 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) |
100 | ASN1_UTCTIME_free(ret); | 109 | M_ASN1_UTCTIME_free(ret); |
101 | return(NULL); | 110 | return(NULL); |
102 | } | 111 | } |
103 | 112 | ||
104 | int ASN1_UTCTIME_check(d) | 113 | #endif |
105 | ASN1_UTCTIME *d; | 114 | |
115 | int ASN1_UTCTIME_check(ASN1_UTCTIME *d) | ||
106 | { | 116 | { |
107 | static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0}; | 117 | static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0}; |
108 | static int max[8]={99,12,31,23,59,59,12,59}; | 118 | static int max[8]={99,12,31,23,59,59,12,59}; |
@@ -152,9 +162,7 @@ err: | |||
152 | return(0); | 162 | return(0); |
153 | } | 163 | } |
154 | 164 | ||
155 | int ASN1_UTCTIME_set_string(s,str) | 165 | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, char *str) |
156 | ASN1_UTCTIME *s; | ||
157 | char *str; | ||
158 | { | 166 | { |
159 | ASN1_UTCTIME t; | 167 | ASN1_UTCTIME t; |
160 | 168 | ||
@@ -167,6 +175,7 @@ char *str; | |||
167 | { | 175 | { |
168 | ASN1_STRING_set((ASN1_STRING *)s, | 176 | ASN1_STRING_set((ASN1_STRING *)s, |
169 | (unsigned char *)str,t.length); | 177 | (unsigned char *)str,t.length); |
178 | s->type = V_ASN1_UTCTIME; | ||
170 | } | 179 | } |
171 | return(1); | 180 | return(1); |
172 | } | 181 | } |
@@ -174,33 +183,28 @@ char *str; | |||
174 | return(0); | 183 | return(0); |
175 | } | 184 | } |
176 | 185 | ||
177 | ASN1_UTCTIME *ASN1_UTCTIME_set(s, t) | 186 | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) |
178 | ASN1_UTCTIME *s; | ||
179 | time_t t; | ||
180 | { | 187 | { |
181 | char *p; | 188 | char *p; |
182 | struct tm *ts; | 189 | struct tm *ts; |
183 | #if defined(THREADS) | ||
184 | struct tm data; | 190 | struct tm data; |
185 | #endif | ||
186 | 191 | ||
187 | if (s == NULL) | 192 | if (s == NULL) |
188 | s=ASN1_UTCTIME_new(); | 193 | s=M_ASN1_UTCTIME_new(); |
189 | if (s == NULL) | 194 | if (s == NULL) |
190 | return(NULL); | 195 | return(NULL); |
191 | 196 | ||
192 | #if defined(THREADS) | 197 | ts=OPENSSL_gmtime(&t, &data); |
193 | ts=(struct tm *)gmtime_r(&t,&data); | 198 | if (ts == NULL) |
194 | #else | 199 | return(NULL); |
195 | ts=(struct tm *)gmtime(&t); | 200 | |
196 | #endif | ||
197 | p=(char *)s->data; | 201 | p=(char *)s->data; |
198 | if ((p == NULL) || (s->length < 14)) | 202 | if ((p == NULL) || (s->length < 14)) |
199 | { | 203 | { |
200 | p=Malloc(20); | 204 | p=OPENSSL_malloc(20); |
201 | if (p == NULL) return(NULL); | 205 | if (p == NULL) return(NULL); |
202 | if (s->data != NULL) | 206 | if (s->data != NULL) |
203 | Free(s->data); | 207 | OPENSSL_free(s->data); |
204 | s->data=(unsigned char *)p; | 208 | s->data=(unsigned char *)p; |
205 | } | 209 | } |
206 | 210 | ||
@@ -208,5 +212,85 @@ time_t t; | |||
208 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); | 212 | ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); |
209 | s->length=strlen(p); | 213 | s->length=strlen(p); |
210 | s->type=V_ASN1_UTCTIME; | 214 | s->type=V_ASN1_UTCTIME; |
215 | #ifdef CHARSET_EBCDIC_not | ||
216 | ebcdic2ascii(s->data, s->data, s->length); | ||
217 | #endif | ||
211 | return(s); | 218 | return(s); |
212 | } | 219 | } |
220 | |||
221 | |||
222 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) | ||
223 | { | ||
224 | struct tm *tm; | ||
225 | int offset; | ||
226 | int year; | ||
227 | |||
228 | #define g2(p) (((p)[0]-'0')*10+(p)[1]-'0') | ||
229 | |||
230 | if (s->data[12] == 'Z') | ||
231 | offset=0; | ||
232 | else | ||
233 | { | ||
234 | offset = g2(s->data+13)*60+g2(s->data+15); | ||
235 | if (s->data[12] == '-') | ||
236 | offset = -offset; | ||
237 | } | ||
238 | |||
239 | t -= offset*60; /* FIXME: may overflow in extreme cases */ | ||
240 | |||
241 | { struct tm data; tm = OPENSSL_gmtime(&t, &data); } | ||
242 | |||
243 | #define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1 | ||
244 | year = g2(s->data); | ||
245 | if (year < 50) | ||
246 | year += 100; | ||
247 | return_cmp(year, tm->tm_year); | ||
248 | return_cmp(g2(s->data+2) - 1, tm->tm_mon); | ||
249 | return_cmp(g2(s->data+4), tm->tm_mday); | ||
250 | return_cmp(g2(s->data+6), tm->tm_hour); | ||
251 | return_cmp(g2(s->data+8), tm->tm_min); | ||
252 | return_cmp(g2(s->data+10), tm->tm_sec); | ||
253 | #undef g2 | ||
254 | #undef return_cmp | ||
255 | |||
256 | return 0; | ||
257 | } | ||
258 | |||
259 | |||
260 | #if 0 | ||
261 | time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s) | ||
262 | { | ||
263 | struct tm tm; | ||
264 | int offset; | ||
265 | |||
266 | memset(&tm,'\0',sizeof tm); | ||
267 | |||
268 | #define g2(p) (((p)[0]-'0')*10+(p)[1]-'0') | ||
269 | tm.tm_year=g2(s->data); | ||
270 | if(tm.tm_year < 50) | ||
271 | tm.tm_year+=100; | ||
272 | tm.tm_mon=g2(s->data+2)-1; | ||
273 | tm.tm_mday=g2(s->data+4); | ||
274 | tm.tm_hour=g2(s->data+6); | ||
275 | tm.tm_min=g2(s->data+8); | ||
276 | tm.tm_sec=g2(s->data+10); | ||
277 | if(s->data[12] == 'Z') | ||
278 | offset=0; | ||
279 | else | ||
280 | { | ||
281 | offset=g2(s->data+13)*60+g2(s->data+15); | ||
282 | if(s->data[12] == '-') | ||
283 | offset= -offset; | ||
284 | } | ||
285 | #undef g2 | ||
286 | |||
287 | return mktime(&tm)-offset*60; /* FIXME: mktime assumes the current timezone | ||
288 | * instead of UTC, and unless we rewrite OpenSSL | ||
289 | * in Lisp we cannot locally change the timezone | ||
290 | * without possibly interfering with other parts | ||
291 | * of the program. timegm, which uses UTC, is | ||
292 | * non-standard. | ||
293 | * Also time_t is inappropriate for general | ||
294 | * UTC times because it may a 32 bit type. */ | ||
295 | } | ||
296 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/p8_key.c b/src/lib/libcrypto/asn1/p8_key.c index 0b24374627..3a31248e14 100644 --- a/src/lib/libcrypto/asn1/p8_key.c +++ b/src/lib/libcrypto/asn1/p8_key.c | |||
@@ -94,7 +94,7 @@ X509 *X509_KEY_new(void) | |||
94 | { | 94 | { |
95 | X509_KEY *ret=NULL; | 95 | X509_KEY *ret=NULL; |
96 | 96 | ||
97 | M_ASN1_New_Malloc(ret,X509_KEY); | 97 | M_ASN1_New_OPENSSL_malloc(ret,X509_KEY); |
98 | ret->references=1; | 98 | ret->references=1; |
99 | ret->type=NID | 99 | ret->type=NID |
100 | M_ASN1_New(ret->cert_info,X509_CINF_new); | 100 | M_ASN1_New(ret->cert_info,X509_CINF_new); |
@@ -126,6 +126,6 @@ void X509_KEY_free(X509 *a) | |||
126 | X509_CINF_free(a->cert_info); | 126 | X509_CINF_free(a->cert_info); |
127 | X509_ALGOR_free(a->sig_alg); | 127 | X509_ALGOR_free(a->sig_alg); |
128 | ASN1_BIT_STRING_free(a->signature); | 128 | ASN1_BIT_STRING_free(a->signature); |
129 | Free(a); | 129 | OPENSSL_free(a); |
130 | } | 130 | } |
131 | 131 | ||
diff --git a/src/lib/libcrypto/bf/asm/bf-686.pl b/src/lib/libcrypto/bf/asm/bf-686.pl index bed303d786..8e4c25f598 100644 --- a/src/lib/libcrypto/bf/asm/bf-686.pl +++ b/src/lib/libcrypto/bf/asm/bf-686.pl | |||
@@ -1,4 +1,3 @@ | |||
1 | #!/usr/bin/perl | ||
2 | #!/usr/local/bin/perl | 1 | #!/usr/local/bin/perl |
3 | 2 | ||
4 | push(@INC,"perlasm","../../perlasm"); | 3 | push(@INC,"perlasm","../../perlasm"); |
diff --git a/src/lib/libcrypto/bf/bf_opts.c b/src/lib/libcrypto/bf/bf_opts.c index 5cfa60c537..171dada2ca 100644 --- a/src/lib/libcrypto/bf/bf_opts.c +++ b/src/lib/libcrypto/bf/bf_opts.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. | 59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. |
60 | * This is for machines with 64k code segment size restrictions. */ | 60 | * This is for machines with 64k code segment size restrictions. */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern void exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,25 +77,26 @@ extern void exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "blowfish.h" | 99 | #include <openssl/blowfish.h> |
101 | 100 | ||
102 | #define BF_DEFAULT_OPTIONS | 101 | #define BF_DEFAULT_OPTIONS |
103 | 102 | ||
@@ -126,11 +125,7 @@ struct tms { | |||
126 | #ifndef HZ | 125 | #ifndef HZ |
127 | # ifndef CLK_TCK | 126 | # ifndef CLK_TCK |
128 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ | 127 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ |
129 | # ifndef VMS | 128 | # define HZ 100.0 |
130 | # define HZ 100.0 | ||
131 | # else /* VMS */ | ||
132 | # define HZ 100.0 | ||
133 | # endif | ||
134 | # else /* _BSD_CLK_TCK_ */ | 129 | # else /* _BSD_CLK_TCK_ */ |
135 | # define HZ ((double)_BSD_CLK_TCK_) | 130 | # define HZ ((double)_BSD_CLK_TCK_) |
136 | # endif | 131 | # endif |
@@ -142,12 +137,7 @@ struct tms { | |||
142 | #define BUFSIZE ((long)1024) | 137 | #define BUFSIZE ((long)1024) |
143 | long run=0; | 138 | long run=0; |
144 | 139 | ||
145 | #ifndef NOPROTO | ||
146 | double Time_F(int s); | 140 | double Time_F(int s); |
147 | #else | ||
148 | double Time_F(); | ||
149 | #endif | ||
150 | |||
151 | #ifdef SIGALRM | 141 | #ifdef SIGALRM |
152 | #if defined(__STDC__) || defined(sgi) | 142 | #if defined(__STDC__) || defined(sgi) |
153 | #define SIGRETTYPE void | 143 | #define SIGRETTYPE void |
@@ -155,14 +145,8 @@ double Time_F(); | |||
155 | #define SIGRETTYPE int | 145 | #define SIGRETTYPE int |
156 | #endif | 146 | #endif |
157 | 147 | ||
158 | #ifndef NOPROTO | ||
159 | SIGRETTYPE sig_done(int sig); | 148 | SIGRETTYPE sig_done(int sig); |
160 | #else | 149 | SIGRETTYPE sig_done(int sig) |
161 | SIGRETTYPE sig_done(); | ||
162 | #endif | ||
163 | |||
164 | SIGRETTYPE sig_done(sig) | ||
165 | int sig; | ||
166 | { | 150 | { |
167 | signal(SIGALRM,sig_done); | 151 | signal(SIGALRM,sig_done); |
168 | run=0; | 152 | run=0; |
@@ -175,8 +159,7 @@ int sig; | |||
175 | #define START 0 | 159 | #define START 0 |
176 | #define STOP 1 | 160 | #define STOP 1 |
177 | 161 | ||
178 | double Time_F(s) | 162 | double Time_F(int s) |
179 | int s; | ||
180 | { | 163 | { |
181 | double ret; | 164 | double ret; |
182 | #ifdef TIMES | 165 | #ifdef TIMES |
@@ -237,9 +220,7 @@ int s; | |||
237 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ | 220 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ |
238 | tm[index]*8,1.0e6/tm[index]); | 221 | tm[index]*8,1.0e6/tm[index]); |
239 | 222 | ||
240 | int main(argc,argv) | 223 | int main(int argc, char **argv) |
241 | int argc; | ||
242 | char **argv; | ||
243 | { | 224 | { |
244 | long count; | 225 | long count; |
245 | static unsigned char buf[BUFSIZE]; | 226 | static unsigned char buf[BUFSIZE]; |
@@ -261,7 +242,7 @@ char **argv; | |||
261 | } | 242 | } |
262 | 243 | ||
263 | #ifndef TIMES | 244 | #ifndef TIMES |
264 | fprintf(stderr,"To get the most acurate results, try to run this\n"); | 245 | fprintf(stderr,"To get the most accurate results, try to run this\n"); |
265 | fprintf(stderr,"program when this computer is idle.\n"); | 246 | fprintf(stderr,"program when this computer is idle.\n"); |
266 | #endif | 247 | #endif |
267 | 248 | ||
@@ -341,7 +322,7 @@ char **argv; | |||
341 | break; | 322 | break; |
342 | } | 323 | } |
343 | exit(0); | 324 | exit(0); |
344 | #if defined(LINT) || defined(MSDOS) | 325 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
345 | return(0); | 326 | return(0); |
346 | #endif | 327 | #endif |
347 | } | 328 | } |
diff --git a/src/lib/libcrypto/bf/bfs.cpp b/src/lib/libcrypto/bf/bfs.cpp index 272ed2f978..d74c457760 100644 --- a/src/lib/libcrypto/bf/bfs.cpp +++ b/src/lib/libcrypto/bf/bfs.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "blowfish.h" | 35 | #include <openssl/blowfish.h> |
36 | 36 | ||
37 | void main(int argc,char *argv[]) | 37 | void main(int argc,char *argv[]) |
38 | { | 38 | { |
diff --git a/src/lib/libcrypto/bf/bfspeed.c b/src/lib/libcrypto/bf/bfspeed.c index 640d820dd3..f346af64f3 100644 --- a/src/lib/libcrypto/bf/bfspeed.c +++ b/src/lib/libcrypto/bf/bfspeed.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,34 +77,31 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "blowfish.h" | 99 | #include <openssl/blowfish.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | #ifndef CLK_TCK | 103 | #ifndef CLK_TCK |
105 | #ifndef VMS | ||
106 | #define HZ 100.0 | ||
107 | #else /* VMS */ | ||
108 | #define HZ 100.0 | 104 | #define HZ 100.0 |
109 | #endif | ||
110 | #else /* CLK_TCK */ | 105 | #else /* CLK_TCK */ |
111 | #define HZ ((double)CLK_TCK) | 106 | #define HZ ((double)CLK_TCK) |
112 | #endif | 107 | #endif |
@@ -115,12 +110,7 @@ struct tms { | |||
115 | #define BUFSIZE ((long)1024) | 110 | #define BUFSIZE ((long)1024) |
116 | long run=0; | 111 | long run=0; |
117 | 112 | ||
118 | #ifndef NOPROTO | ||
119 | double Time_F(int s); | 113 | double Time_F(int s); |
120 | #else | ||
121 | double Time_F(); | ||
122 | #endif | ||
123 | |||
124 | #ifdef SIGALRM | 114 | #ifdef SIGALRM |
125 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 115 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
126 | #define SIGRETTYPE void | 116 | #define SIGRETTYPE void |
@@ -128,14 +118,8 @@ double Time_F(); | |||
128 | #define SIGRETTYPE int | 118 | #define SIGRETTYPE int |
129 | #endif | 119 | #endif |
130 | 120 | ||
131 | #ifndef NOPROTO | ||
132 | SIGRETTYPE sig_done(int sig); | 121 | SIGRETTYPE sig_done(int sig); |
133 | #else | 122 | SIGRETTYPE sig_done(int sig) |
134 | SIGRETTYPE sig_done(); | ||
135 | #endif | ||
136 | |||
137 | SIGRETTYPE sig_done(sig) | ||
138 | int sig; | ||
139 | { | 123 | { |
140 | signal(SIGALRM,sig_done); | 124 | signal(SIGALRM,sig_done); |
141 | run=0; | 125 | run=0; |
@@ -148,8 +132,7 @@ int sig; | |||
148 | #define START 0 | 132 | #define START 0 |
149 | #define STOP 1 | 133 | #define STOP 1 |
150 | 134 | ||
151 | double Time_F(s) | 135 | double Time_F(int s) |
152 | int s; | ||
153 | { | 136 | { |
154 | double ret; | 137 | double ret; |
155 | #ifdef TIMES | 138 | #ifdef TIMES |
@@ -185,9 +168,7 @@ int s; | |||
185 | #endif | 168 | #endif |
186 | } | 169 | } |
187 | 170 | ||
188 | int main(argc,argv) | 171 | int main(int argc, char **argv) |
189 | int argc; | ||
190 | char **argv; | ||
191 | { | 172 | { |
192 | long count; | 173 | long count; |
193 | static unsigned char buf[BUFSIZE]; | 174 | static unsigned char buf[BUFSIZE]; |
@@ -202,7 +183,7 @@ char **argv; | |||
202 | #endif | 183 | #endif |
203 | 184 | ||
204 | #ifndef TIMES | 185 | #ifndef TIMES |
205 | printf("To get the most acurate results, try to run this\n"); | 186 | printf("To get the most accurate results, try to run this\n"); |
206 | printf("program when this computer is idle.\n"); | 187 | printf("program when this computer is idle.\n"); |
207 | #endif | 188 | #endif |
208 | 189 | ||
@@ -287,7 +268,7 @@ char **argv; | |||
287 | printf("Blowfish raw ecb bytes per sec = %12.3f (%9.3fuS)\n",b,8.0e6/b); | 268 | printf("Blowfish raw ecb bytes per sec = %12.3f (%9.3fuS)\n",b,8.0e6/b); |
288 | printf("Blowfish cbc bytes per sec = %12.3f (%9.3fuS)\n",c,8.0e6/c); | 269 | printf("Blowfish cbc bytes per sec = %12.3f (%9.3fuS)\n",c,8.0e6/c); |
289 | exit(0); | 270 | exit(0); |
290 | #if defined(LINT) || defined(MSDOS) | 271 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
291 | return(0); | 272 | return(0); |
292 | #endif | 273 | #endif |
293 | } | 274 | } |
diff --git a/src/lib/libcrypto/bf/bftest.c b/src/lib/libcrypto/bf/bftest.c index 9266cf813a..09895f2542 100644 --- a/src/lib/libcrypto/bf/bftest.c +++ b/src/lib/libcrypto/bf/bftest.c | |||
@@ -62,20 +62,32 @@ | |||
62 | #include <stdio.h> | 62 | #include <stdio.h> |
63 | #include <string.h> | 63 | #include <string.h> |
64 | #include <stdlib.h> | 64 | #include <stdlib.h> |
65 | #include "blowfish.h" | ||
66 | 65 | ||
67 | char *bf_key[2]={ | 66 | #ifdef OPENSSL_NO_BF |
67 | int main(int argc, char *argv[]) | ||
68 | { | ||
69 | printf("No BF support\n"); | ||
70 | return(0); | ||
71 | } | ||
72 | #else | ||
73 | #include <openssl/blowfish.h> | ||
74 | |||
75 | #ifdef CHARSET_EBCDIC | ||
76 | #include <openssl/ebcdic.h> | ||
77 | #endif | ||
78 | |||
79 | static char *bf_key[2]={ | ||
68 | "abcdefghijklmnopqrstuvwxyz", | 80 | "abcdefghijklmnopqrstuvwxyz", |
69 | "Who is John Galt?" | 81 | "Who is John Galt?" |
70 | }; | 82 | }; |
71 | 83 | ||
72 | /* big endian */ | 84 | /* big endian */ |
73 | BF_LONG bf_plain[2][2]={ | 85 | static BF_LONG bf_plain[2][2]={ |
74 | {0x424c4f57L,0x46495348L}, | 86 | {0x424c4f57L,0x46495348L}, |
75 | {0xfedcba98L,0x76543210L} | 87 | {0xfedcba98L,0x76543210L} |
76 | }; | 88 | }; |
77 | 89 | ||
78 | BF_LONG bf_cipher[2][2]={ | 90 | static BF_LONG bf_cipher[2][2]={ |
79 | {0x324ed0feL,0xf413a203L}, | 91 | {0x324ed0feL,0xf413a203L}, |
80 | {0xcc91732bL,0x8022f684L} | 92 | {0xcc91732bL,0x8022f684L} |
81 | }; | 93 | }; |
@@ -216,16 +228,16 @@ static unsigned char ofb64_ok[]={ | |||
216 | 0x63,0xC2,0xCF,0x80,0xDA}; | 228 | 0x63,0xC2,0xCF,0x80,0xDA}; |
217 | 229 | ||
218 | #define KEY_TEST_NUM 25 | 230 | #define KEY_TEST_NUM 25 |
219 | unsigned char key_test[KEY_TEST_NUM]={ | 231 | static unsigned char key_test[KEY_TEST_NUM]={ |
220 | 0xf0,0xe1,0xd2,0xc3,0xb4,0xa5,0x96,0x87, | 232 | 0xf0,0xe1,0xd2,0xc3,0xb4,0xa5,0x96,0x87, |
221 | 0x78,0x69,0x5a,0x4b,0x3c,0x2d,0x1e,0x0f, | 233 | 0x78,0x69,0x5a,0x4b,0x3c,0x2d,0x1e,0x0f, |
222 | 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, | 234 | 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77, |
223 | 0x88}; | 235 | 0x88}; |
224 | 236 | ||
225 | unsigned char key_data[8]= | 237 | static unsigned char key_data[8]= |
226 | {0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10}; | 238 | {0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10}; |
227 | 239 | ||
228 | unsigned char key_out[KEY_TEST_NUM][8]={ | 240 | static unsigned char key_out[KEY_TEST_NUM][8]={ |
229 | {0xF9,0xAD,0x59,0x7C,0x49,0xDB,0x00,0x5E}, | 241 | {0xF9,0xAD,0x59,0x7C,0x49,0xDB,0x00,0x5E}, |
230 | {0xE9,0x1D,0x21,0xC1,0xD9,0x61,0xA6,0xD6}, | 242 | {0xE9,0x1D,0x21,0xC1,0xD9,0x61,0xA6,0xD6}, |
231 | {0xE9,0xC2,0xB7,0x0A,0x1B,0xC6,0x5C,0xF3}, | 243 | {0xE9,0xC2,0xB7,0x0A,0x1B,0xC6,0x5C,0xF3}, |
@@ -252,17 +264,9 @@ unsigned char key_out[KEY_TEST_NUM][8]={ | |||
252 | {0x05,0x04,0x4B,0x62,0xFA,0x52,0xD0,0x80}, | 264 | {0x05,0x04,0x4B,0x62,0xFA,0x52,0xD0,0x80}, |
253 | }; | 265 | }; |
254 | 266 | ||
255 | #ifndef NOPROTO | ||
256 | static int test(void ); | 267 | static int test(void ); |
257 | static int print_test_data(void ); | 268 | static int print_test_data(void ); |
258 | #else | 269 | int main(int argc, char *argv[]) |
259 | static int test(); | ||
260 | static int print_test_data(); | ||
261 | #endif | ||
262 | |||
263 | int main(argc,argv) | ||
264 | int argc; | ||
265 | char *argv[]; | ||
266 | { | 270 | { |
267 | int ret; | 271 | int ret; |
268 | 272 | ||
@@ -275,7 +279,7 @@ char *argv[]; | |||
275 | return(0); | 279 | return(0); |
276 | } | 280 | } |
277 | 281 | ||
278 | static int print_test_data() | 282 | static int print_test_data(void) |
279 | { | 283 | { |
280 | unsigned int i,j; | 284 | unsigned int i,j; |
281 | 285 | ||
@@ -304,7 +308,7 @@ static int print_test_data() | |||
304 | printf("c="); | 308 | printf("c="); |
305 | for (j=0; j<8; j++) | 309 | for (j=0; j<8; j++) |
306 | printf("%02X",key_out[i][j]); | 310 | printf("%02X",key_out[i][j]); |
307 | printf(" k[%2d]=",i+1); | 311 | printf(" k[%2u]=",i+1); |
308 | for (j=0; j<i+1; j++) | 312 | for (j=0; j<i+1; j++) |
309 | printf("%02X",key_test[j]); | 313 | printf("%02X",key_test[j]); |
310 | printf("\n"); | 314 | printf("\n"); |
@@ -342,7 +346,7 @@ static int print_test_data() | |||
342 | return(0); | 346 | return(0); |
343 | } | 347 | } |
344 | 348 | ||
345 | static int test() | 349 | static int test(void) |
346 | { | 350 | { |
347 | unsigned char cbc_in[40],cbc_out[40],iv[8]; | 351 | unsigned char cbc_in[40],cbc_out[40],iv[8]; |
348 | int i,n,err=0; | 352 | int i,n,err=0; |
@@ -351,9 +355,16 @@ static int test() | |||
351 | unsigned char out[8]; | 355 | unsigned char out[8]; |
352 | BF_LONG len; | 356 | BF_LONG len; |
353 | 357 | ||
358 | #ifdef CHARSET_EBCDIC | ||
359 | ebcdic2ascii(cbc_data, cbc_data, strlen(cbc_data)); | ||
360 | #endif | ||
361 | |||
354 | printf("testing blowfish in raw ecb mode\n"); | 362 | printf("testing blowfish in raw ecb mode\n"); |
355 | for (n=0; n<2; n++) | 363 | for (n=0; n<2; n++) |
356 | { | 364 | { |
365 | #ifdef CHARSET_EBCDIC | ||
366 | ebcdic2ascii(bf_key[n], bf_key[n], strlen(bf_key[n])); | ||
367 | #endif | ||
357 | BF_set_key(&key,strlen(bf_key[n]),(unsigned char *)bf_key[n]); | 368 | BF_set_key(&key,strlen(bf_key[n]),(unsigned char *)bf_key[n]); |
358 | 369 | ||
359 | data[0]=bf_plain[n][0]; | 370 | data[0]=bf_plain[n][0]; |
@@ -364,11 +375,11 @@ static int test() | |||
364 | printf("BF_encrypt error encrypting\n"); | 375 | printf("BF_encrypt error encrypting\n"); |
365 | printf("got :"); | 376 | printf("got :"); |
366 | for (i=0; i<2; i++) | 377 | for (i=0; i<2; i++) |
367 | printf("%08lX ",data[i]); | 378 | printf("%08lX ",(unsigned long)data[i]); |
368 | printf("\n"); | 379 | printf("\n"); |
369 | printf("expected:"); | 380 | printf("expected:"); |
370 | for (i=0; i<2; i++) | 381 | for (i=0; i<2; i++) |
371 | printf("%08lX ",bf_cipher[n][i]); | 382 | printf("%08lX ",(unsigned long)bf_cipher[n][i]); |
372 | err=1; | 383 | err=1; |
373 | printf("\n"); | 384 | printf("\n"); |
374 | } | 385 | } |
@@ -379,11 +390,11 @@ static int test() | |||
379 | printf("BF_encrypt error decrypting\n"); | 390 | printf("BF_encrypt error decrypting\n"); |
380 | printf("got :"); | 391 | printf("got :"); |
381 | for (i=0; i<2; i++) | 392 | for (i=0; i<2; i++) |
382 | printf("%08lX ",data[i]); | 393 | printf("%08lX ",(unsigned long)data[i]); |
383 | printf("\n"); | 394 | printf("\n"); |
384 | printf("expected:"); | 395 | printf("expected:"); |
385 | for (i=0; i<2; i++) | 396 | for (i=0; i<2; i++) |
386 | printf("%08lX ",bf_plain[n][i]); | 397 | printf("%08lX ",(unsigned long)bf_plain[n][i]); |
387 | printf("\n"); | 398 | printf("\n"); |
388 | err=1; | 399 | err=1; |
389 | } | 400 | } |
@@ -431,7 +442,8 @@ static int test() | |||
431 | { | 442 | { |
432 | BF_set_key(&key,n,key_test); | 443 | BF_set_key(&key,n,key_test); |
433 | BF_ecb_encrypt(key_data,out,&key,BF_ENCRYPT); | 444 | BF_ecb_encrypt(key_data,out,&key,BF_ENCRYPT); |
434 | if (memcmp(out,&(key_out[n-1][0]),8) != 0) | 445 | /* mips-sgi-irix6.5-gcc vv -mabi=64 bug workaround */ |
446 | if (memcmp(out,&(key_out[i=n-1][0]),8) != 0) | ||
435 | { | 447 | { |
436 | printf("blowfish setkey error\n"); | 448 | printf("blowfish setkey error\n"); |
437 | err=1; | 449 | err=1; |
@@ -519,3 +531,4 @@ static int test() | |||
519 | 531 | ||
520 | return(err); | 532 | return(err); |
521 | } | 533 | } |
534 | #endif | ||
diff --git a/src/lib/libcrypto/bio/bss_rtcp.c b/src/lib/libcrypto/bio/bss_rtcp.c index 6eb434dee8..7dae485564 100644 --- a/src/lib/libcrypto/bio/bss_rtcp.c +++ b/src/lib/libcrypto/bio/bss_rtcp.c | |||
@@ -58,6 +58,7 @@ | |||
58 | 58 | ||
59 | /* Written by David L. Jones <jonesd@kcgl1.eng.ohio-state.edu> | 59 | /* Written by David L. Jones <jonesd@kcgl1.eng.ohio-state.edu> |
60 | * Date: 22-JUL-1996 | 60 | * Date: 22-JUL-1996 |
61 | * Revised: 25-SEP-1997 Update for 0.8.1, BIO_CTRL_SET -> BIO_C_SET_FD | ||
61 | */ | 62 | */ |
62 | /* VMS */ | 63 | /* VMS */ |
63 | #include <stdio.h> | 64 | #include <stdio.h> |
@@ -65,10 +66,11 @@ | |||
65 | #include <string.h> | 66 | #include <string.h> |
66 | #include <errno.h> | 67 | #include <errno.h> |
67 | #include "cryptlib.h" | 68 | #include "cryptlib.h" |
68 | #include "bio.h" | 69 | #include <openssl/bio.h> |
69 | 70 | ||
70 | #include <iodef.h> /* VMS IO$_ definitions */ | 71 | #include <iodef.h> /* VMS IO$_ definitions */ |
71 | extern int SYS$QIOW(); | 72 | #include <starlet.h> |
73 | |||
72 | typedef unsigned short io_channel; | 74 | typedef unsigned short io_channel; |
73 | /*************************************************************************/ | 75 | /*************************************************************************/ |
74 | struct io_status { short status, count; long flags; }; | 76 | struct io_status { short status, count; long flags; }; |
@@ -86,11 +88,11 @@ struct rpc_ctx { | |||
86 | struct rpc_msg msg; | 88 | struct rpc_msg msg; |
87 | }; | 89 | }; |
88 | 90 | ||
89 | static int rtcp_write(BIO *h,char *buf,int num); | 91 | static int rtcp_write(BIO *h,const char *buf,int num); |
90 | static int rtcp_read(BIO *h,char *buf,int size); | 92 | static int rtcp_read(BIO *h,char *buf,int size); |
91 | static int rtcp_puts(BIO *h,char *str); | 93 | static int rtcp_puts(BIO *h,const char *str); |
92 | static int rtcp_gets(BIO *h,char *str,int size); | 94 | static int rtcp_gets(BIO *h,char *str,int size); |
93 | static long rtcp_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 95 | static long rtcp_ctrl(BIO *h,int cmd,long arg1,void *arg2); |
94 | static int rtcp_new(BIO *h); | 96 | static int rtcp_new(BIO *h); |
95 | static int rtcp_free(BIO *data); | 97 | static int rtcp_free(BIO *data); |
96 | 98 | ||
@@ -105,20 +107,27 @@ static BIO_METHOD rtcp_method= | |||
105 | rtcp_ctrl, | 107 | rtcp_ctrl, |
106 | rtcp_new, | 108 | rtcp_new, |
107 | rtcp_free, | 109 | rtcp_free, |
110 | NULL, | ||
108 | }; | 111 | }; |
109 | 112 | ||
110 | BIO_METHOD *BIO_s_rtcp() | 113 | BIO_METHOD *BIO_s_rtcp(void) |
111 | { | 114 | { |
112 | return(&rtcp_method); | 115 | return(&rtcp_method); |
113 | } | 116 | } |
114 | /*****************************************************************************/ | 117 | /*****************************************************************************/ |
115 | /* Decnet I/O routines. | 118 | /* Decnet I/O routines. |
116 | */ | 119 | */ |
120 | |||
121 | #ifdef __DECC | ||
122 | #pragma message save | ||
123 | #pragma message disable DOLLARID | ||
124 | #endif | ||
125 | |||
117 | static int get ( io_channel chan, char *buffer, int maxlen, int *length ) | 126 | static int get ( io_channel chan, char *buffer, int maxlen, int *length ) |
118 | { | 127 | { |
119 | int status; | 128 | int status; |
120 | struct io_status iosb; | 129 | struct io_status iosb; |
121 | status = SYS$QIOW ( 0, chan, IO$_READVBLK, &iosb, 0, 0, | 130 | status = sys$qiow ( 0, chan, IO$_READVBLK, &iosb, 0, 0, |
122 | buffer, maxlen, 0, 0, 0, 0 ); | 131 | buffer, maxlen, 0, 0, 0, 0 ); |
123 | if ( (status&1) == 1 ) status = iosb.status; | 132 | if ( (status&1) == 1 ) status = iosb.status; |
124 | if ( (status&1) == 1 ) *length = iosb.count; | 133 | if ( (status&1) == 1 ) *length = iosb.count; |
@@ -129,40 +138,40 @@ static int put ( io_channel chan, char *buffer, int length ) | |||
129 | { | 138 | { |
130 | int status; | 139 | int status; |
131 | struct io_status iosb; | 140 | struct io_status iosb; |
132 | status = SYS$QIOW ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0, | 141 | status = sys$qiow ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0, |
133 | buffer, length, 0, 0, 0, 0 ); | 142 | buffer, length, 0, 0, 0, 0 ); |
134 | if ( (status&1) == 1 ) status = iosb.status; | 143 | if ( (status&1) == 1 ) status = iosb.status; |
135 | return status; | 144 | return status; |
136 | } | 145 | } |
146 | |||
147 | #ifdef __DECC | ||
148 | #pragma message restore | ||
149 | #endif | ||
150 | |||
137 | /***************************************************************************/ | 151 | /***************************************************************************/ |
138 | 152 | ||
139 | static int rtcp_new(bi) | 153 | static int rtcp_new(BIO *bi) |
140 | BIO *bi; | ||
141 | { | 154 | { |
142 | struct rpc_ctx *ctx; | 155 | struct rpc_ctx *ctx; |
143 | bi->init=1; | 156 | bi->init=1; |
144 | bi->num=0; | 157 | bi->num=0; |
145 | bi->flags = 0; | 158 | bi->flags = 0; |
146 | bi->ptr=Malloc(sizeof(struct rpc_ctx)); | 159 | bi->ptr=OPENSSL_malloc(sizeof(struct rpc_ctx)); |
147 | ctx = (struct rpc_ctx *) bi->ptr; | 160 | ctx = (struct rpc_ctx *) bi->ptr; |
148 | ctx->filled = 0; | 161 | ctx->filled = 0; |
149 | ctx->pos = 0; | 162 | ctx->pos = 0; |
150 | return(1); | 163 | return(1); |
151 | } | 164 | } |
152 | 165 | ||
153 | static int rtcp_free(a) | 166 | static int rtcp_free(BIO *a) |
154 | BIO *a; | ||
155 | { | 167 | { |
156 | if (a == NULL) return(0); | 168 | if (a == NULL) return(0); |
157 | if ( a->ptr ) Free ( a->ptr ); | 169 | if ( a->ptr ) OPENSSL_free ( a->ptr ); |
158 | a->ptr = NULL; | 170 | a->ptr = NULL; |
159 | return(1); | 171 | return(1); |
160 | } | 172 | } |
161 | 173 | ||
162 | static int rtcp_read(b,out,outl) | 174 | static int rtcp_read(BIO *b, char *out, int outl) |
163 | BIO *b; | ||
164 | char *out; | ||
165 | int outl; | ||
166 | { | 175 | { |
167 | int status, length; | 176 | int status, length; |
168 | struct rpc_ctx *ctx; | 177 | struct rpc_ctx *ctx; |
@@ -209,10 +218,7 @@ int outl; | |||
209 | return length; | 218 | return length; |
210 | } | 219 | } |
211 | 220 | ||
212 | static int rtcp_write(b,in,inl) | 221 | static int rtcp_write(BIO *b, const char *in, int inl) |
213 | BIO *b; | ||
214 | char *in; | ||
215 | int inl; | ||
216 | { | 222 | { |
217 | int status, i, segment, length; | 223 | int status, i, segment, length; |
218 | struct rpc_ctx *ctx; | 224 | struct rpc_ctx *ctx; |
@@ -241,11 +247,7 @@ int inl; | |||
241 | return(i); | 247 | return(i); |
242 | } | 248 | } |
243 | 249 | ||
244 | static long rtcp_ctrl(b,cmd,num,ptr) | 250 | static long rtcp_ctrl(BIO *b, int cmd, long num, void *ptr) |
245 | BIO *b; | ||
246 | int cmd; | ||
247 | long num; | ||
248 | char *ptr; | ||
249 | { | 251 | { |
250 | long ret=1; | 252 | long ret=1; |
251 | 253 | ||
@@ -255,7 +257,7 @@ char *ptr; | |||
255 | case BIO_CTRL_EOF: | 257 | case BIO_CTRL_EOF: |
256 | ret = 1; | 258 | ret = 1; |
257 | break; | 259 | break; |
258 | case BIO_CTRL_SET: | 260 | case BIO_C_SET_FD: |
259 | b->num = num; | 261 | b->num = num; |
260 | ret = 1; | 262 | ret = 1; |
261 | break; | 263 | break; |
@@ -276,17 +278,12 @@ char *ptr; | |||
276 | return(ret); | 278 | return(ret); |
277 | } | 279 | } |
278 | 280 | ||
279 | static int rtcp_gets(bp,buf,size) | 281 | static int rtcp_gets(BIO *bp, char *buf, int size) |
280 | BIO *bp; | ||
281 | char *buf; | ||
282 | int size; | ||
283 | { | 282 | { |
284 | return(0); | 283 | return(0); |
285 | } | 284 | } |
286 | 285 | ||
287 | static int rtcp_puts(bp,str) | 286 | static int rtcp_puts(BIO *bp, const char *str) |
288 | BIO *bp; | ||
289 | char *str; | ||
290 | { | 287 | { |
291 | int length; | 288 | int length; |
292 | if (str == NULL) return(0); | 289 | if (str == NULL) return(0); |
diff --git a/src/lib/libcrypto/bn/asm/README b/src/lib/libcrypto/bn/asm/README index d93fbff77f..b0f3a68a06 100644 --- a/src/lib/libcrypto/bn/asm/README +++ b/src/lib/libcrypto/bn/asm/README | |||
@@ -1,5 +1,7 @@ | |||
1 | <OBSOLETE> | ||
2 | |||
1 | All assember in this directory are just version of the file | 3 | All assember in this directory are just version of the file |
2 | crypto/bn/bn_mulw.c. | 4 | crypto/bn/bn_asm.c. |
3 | 5 | ||
4 | Quite a few of these files are just the assember output from gcc since on | 6 | Quite a few of these files are just the assember output from gcc since on |
5 | quite a few machines they are 2 times faster than the system compiler. | 7 | quite a few machines they are 2 times faster than the system compiler. |
@@ -15,16 +17,11 @@ On the 2 alpha C compilers I had access to, it was not possible to do | |||
15 | were 64 bits). So the hand assember gives access to the 128 bit result and | 17 | were 64 bits). So the hand assember gives access to the 128 bit result and |
16 | a 2 times speedup :-). | 18 | a 2 times speedup :-). |
17 | 19 | ||
18 | The x86xxxx.obj files are the assembled version of x86xxxx.asm files. | 20 | There are 3 versions of assember for the HP PA-RISC. |
19 | I had such a hard time finding a macro assember for Microsoft, I decided to | 21 | |
20 | include the object file to save others the hassle :-). | 22 | pa-risc.s is the origional one which works fine and generated using gcc :-) |
21 | 23 | ||
22 | I have also included uu encoded versions of the .obj incase they get | 24 | pa-risc2W.s and pa-risc2.s are 64 and 32-bit PA-RISC 2.0 implementations |
23 | trashed. | 25 | by Chris Ruemmler from HP (with some help from the HP C compiler). |
24 | 26 | ||
25 | There are 2 versions of assember for the HP PA-RISC. | 27 | </OBSOLETE> |
26 | pa-risc.s is the origional one which works fine. | ||
27 | pa-risc2.s is a new version that often generates warnings but if the | ||
28 | tests pass, it gives performance that is over 2 times faster than | ||
29 | pa-risc.s. | ||
30 | Both were generated using gcc :-) | ||
diff --git a/src/lib/libcrypto/bn/asm/alpha.s b/src/lib/libcrypto/bn/asm/alpha.s index 1d17b1d619..555ff0b92d 100644 --- a/src/lib/libcrypto/bn/asm/alpha.s +++ b/src/lib/libcrypto/bn/asm/alpha.s | |||
@@ -1,8 +1,14 @@ | |||
1 | # DEC Alpha assember | 1 | # DEC Alpha assember |
2 | # The bn_div64 is actually gcc output but the other parts are hand done. | 2 | # The bn_div_words is actually gcc output but the other parts are hand done. |
3 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for | 3 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for |
4 | # bn_div64. | 4 | # bn_div_words. |
5 | .file 1 "bn_mulw.c" | 5 | # I've gone back and re-done most of routines. |
6 | # The key thing to remeber for the 164 CPU is that while a | ||
7 | # multiply operation takes 8 cycles, another one can only be issued | ||
8 | # after 4 cycles have elapsed. I've done modification to help | ||
9 | # improve this. Also, normally, a ld instruction will not be available | ||
10 | # for about 3 cycles. | ||
11 | .file 1 "bn_asm.c" | ||
6 | .set noat | 12 | .set noat |
7 | gcc2_compiled.: | 13 | gcc2_compiled.: |
8 | __gnu_compiled_c: | 14 | __gnu_compiled_c: |
@@ -14,65 +20,91 @@ bn_mul_add_words: | |||
14 | bn_mul_add_words..ng: | 20 | bn_mul_add_words..ng: |
15 | .frame $30,0,$26,0 | 21 | .frame $30,0,$26,0 |
16 | .prologue 0 | 22 | .prologue 0 |
17 | subq $18,2,$25 # num=-2 | ||
18 | bis $31,$31,$0 | ||
19 | blt $25,$42 | ||
20 | .align 5 | 23 | .align 5 |
21 | $142: | 24 | subq $18,4,$18 |
22 | subq $18,2,$18 # num-=2 | 25 | bis $31,$31,$0 |
23 | subq $25,2,$25 # num-=2 | 26 | blt $18,$43 # if we are -1, -2, -3 or -4 goto tail code |
24 | 27 | ldq $20,0($17) # 1 1 | |
25 | ldq $1,0($17) # a[0] | 28 | ldq $1,0($16) # 1 1 |
26 | ldq $2,8($17) # a[1] | 29 | .align 3 |
27 | 30 | $42: | |
28 | mulq $19,$1,$3 # a[0]*w low part r3 | 31 | mulq $20,$19,$5 # 1 2 1 ###### |
29 | umulh $19,$1,$1 # a[0]*w high part r1 | 32 | ldq $21,8($17) # 2 1 |
30 | mulq $19,$2,$4 # a[1]*w low part r4 | 33 | ldq $2,8($16) # 2 1 |
31 | umulh $19,$2,$2 # a[1]*w high part r2 | 34 | umulh $20,$19,$20 # 1 2 ###### |
32 | 35 | ldq $27,16($17) # 3 1 | |
33 | ldq $22,0($16) # r[0] r22 | 36 | ldq $3,16($16) # 3 1 |
34 | ldq $23,8($16) # r[1] r23 | 37 | mulq $21,$19,$6 # 2 2 1 ###### |
35 | 38 | ldq $28,24($17) # 4 1 | |
36 | addq $3,$22,$3 # a0 low part + r[0] | 39 | addq $1,$5,$1 # 1 2 2 |
37 | addq $4,$23,$4 # a1 low part + r[1] | 40 | ldq $4,24($16) # 4 1 |
38 | cmpult $3,$22,$5 # overflow? | 41 | umulh $21,$19,$21 # 2 2 ###### |
39 | cmpult $4,$23,$6 # overflow? | 42 | cmpult $1,$5,$22 # 1 2 3 1 |
40 | addq $5,$1,$1 # high part + overflow | 43 | addq $20,$22,$20 # 1 3 1 |
41 | addq $6,$2,$2 # high part + overflow | 44 | addq $1,$0,$1 # 1 2 3 1 |
42 | 45 | mulq $27,$19,$7 # 3 2 1 ###### | |
43 | addq $3,$0,$3 # add c | 46 | cmpult $1,$0,$0 # 1 2 3 2 |
44 | cmpult $3,$0,$5 # overflow? | 47 | addq $2,$6,$2 # 2 2 2 |
45 | stq $3,0($16) | 48 | addq $20,$0,$0 # 1 3 2 |
46 | addq $5,$1,$0 # c=high part + overflow | 49 | cmpult $2,$6,$23 # 2 2 3 1 |
47 | 50 | addq $21,$23,$21 # 2 3 1 | |
48 | addq $4,$0,$4 # add c | 51 | umulh $27,$19,$27 # 3 2 ###### |
49 | cmpult $4,$0,$5 # overflow? | 52 | addq $2,$0,$2 # 2 2 3 1 |
50 | stq $4,8($16) | 53 | cmpult $2,$0,$0 # 2 2 3 2 |
51 | addq $5,$2,$0 # c=high part + overflow | 54 | subq $18,4,$18 |
55 | mulq $28,$19,$8 # 4 2 1 ###### | ||
56 | addq $21,$0,$0 # 2 3 2 | ||
57 | addq $3,$7,$3 # 3 2 2 | ||
58 | addq $16,32,$16 | ||
59 | cmpult $3,$7,$24 # 3 2 3 1 | ||
60 | stq $1,-32($16) # 1 2 4 | ||
61 | umulh $28,$19,$28 # 4 2 ###### | ||
62 | addq $27,$24,$27 # 3 3 1 | ||
63 | addq $3,$0,$3 # 3 2 3 1 | ||
64 | stq $2,-24($16) # 2 2 4 | ||
65 | cmpult $3,$0,$0 # 3 2 3 2 | ||
66 | stq $3,-16($16) # 3 2 4 | ||
67 | addq $4,$8,$4 # 4 2 2 | ||
68 | addq $27,$0,$0 # 3 3 2 | ||
69 | cmpult $4,$8,$25 # 4 2 3 1 | ||
70 | addq $17,32,$17 | ||
71 | addq $28,$25,$28 # 4 3 1 | ||
72 | addq $4,$0,$4 # 4 2 3 1 | ||
73 | cmpult $4,$0,$0 # 4 2 3 2 | ||
74 | stq $4,-8($16) # 4 2 4 | ||
75 | addq $28,$0,$0 # 4 3 2 | ||
76 | blt $18,$43 | ||
52 | 77 | ||
53 | ble $18,$43 | 78 | ldq $20,0($17) # 1 1 |
79 | ldq $1,0($16) # 1 1 | ||
54 | 80 | ||
55 | addq $16,16,$16 | 81 | br $42 |
56 | addq $17,16,$17 | ||
57 | blt $25,$42 | ||
58 | 82 | ||
59 | br $31,$142 | 83 | .align 4 |
60 | $42: | 84 | $45: |
61 | ldq $1,0($17) # a[0] | 85 | ldq $20,0($17) # 4 1 |
62 | umulh $19,$1,$3 # a[0]*w high part | 86 | ldq $1,0($16) # 4 1 |
63 | mulq $19,$1,$1 # a[0]*w low part | 87 | mulq $20,$19,$5 # 4 2 1 |
64 | ldq $2,0($16) # r[0] | 88 | subq $18,1,$18 |
65 | addq $1,$2,$1 # low part + r[0] | 89 | addq $16,8,$16 |
66 | cmpult $1,$2,$4 # overflow? | 90 | addq $17,8,$17 |
67 | addq $4,$3,$3 # high part + overflow | 91 | umulh $20,$19,$20 # 4 2 |
68 | addq $1,$0,$1 # add c | 92 | addq $1,$5,$1 # 4 2 2 |
69 | cmpult $1,$0,$4 # overflow? | 93 | cmpult $1,$5,$22 # 4 2 3 1 |
70 | addq $4,$3,$0 # c=high part + overflow | 94 | addq $20,$22,$20 # 4 3 1 |
71 | stq $1,0($16) | 95 | addq $1,$0,$1 # 4 2 3 1 |
96 | cmpult $1,$0,$0 # 4 2 3 2 | ||
97 | addq $20,$0,$0 # 4 3 2 | ||
98 | stq $1,-8($16) # 4 2 4 | ||
99 | bgt $18,$45 | ||
100 | ret $31,($26),1 # else exit | ||
72 | 101 | ||
73 | .align 4 | 102 | .align 4 |
74 | $43: | 103 | $43: |
75 | ret $31,($26),1 | 104 | addq $18,4,$18 |
105 | bgt $18,$45 # goto tail code | ||
106 | ret $31,($26),1 # else exit | ||
107 | |||
76 | .end bn_mul_add_words | 108 | .end bn_mul_add_words |
77 | .align 3 | 109 | .align 3 |
78 | .globl bn_mul_words | 110 | .globl bn_mul_words |
@@ -81,49 +113,75 @@ bn_mul_words: | |||
81 | bn_mul_words..ng: | 113 | bn_mul_words..ng: |
82 | .frame $30,0,$26,0 | 114 | .frame $30,0,$26,0 |
83 | .prologue 0 | 115 | .prologue 0 |
84 | subq $18,2,$25 # num=-2 | ||
85 | bis $31,$31,$0 | ||
86 | blt $25,$242 | ||
87 | .align 5 | 116 | .align 5 |
88 | $342: | 117 | subq $18,4,$18 |
89 | subq $18,2,$18 # num-=2 | 118 | bis $31,$31,$0 |
90 | subq $25,2,$25 # num-=2 | 119 | blt $18,$143 # if we are -1, -2, -3 or -4 goto tail code |
91 | 120 | ldq $20,0($17) # 1 1 | |
92 | ldq $1,0($17) # a[0] | 121 | .align 3 |
93 | ldq $2,8($17) # a[1] | 122 | $142: |
94 | 123 | ||
95 | mulq $19,$1,$3 # a[0]*w low part r3 | 124 | mulq $20,$19,$5 # 1 2 1 ##### |
96 | umulh $19,$1,$1 # a[0]*w high part r1 | 125 | ldq $21,8($17) # 2 1 |
97 | mulq $19,$2,$4 # a[1]*w low part r4 | 126 | ldq $27,16($17) # 3 1 |
98 | umulh $19,$2,$2 # a[1]*w high part r2 | 127 | umulh $20,$19,$20 # 1 2 ##### |
99 | 128 | ldq $28,24($17) # 4 1 | |
100 | addq $3,$0,$3 # add c | 129 | mulq $21,$19,$6 # 2 2 1 ##### |
101 | cmpult $3,$0,$5 # overflow? | 130 | addq $5,$0,$5 # 1 2 3 1 |
102 | stq $3,0($16) | 131 | subq $18,4,$18 |
103 | addq $5,$1,$0 # c=high part + overflow | 132 | cmpult $5,$0,$0 # 1 2 3 2 |
104 | 133 | umulh $21,$19,$21 # 2 2 ##### | |
105 | addq $4,$0,$4 # add c | 134 | addq $20,$0,$0 # 1 3 2 |
106 | cmpult $4,$0,$5 # overflow? | 135 | addq $17,32,$17 |
107 | stq $4,8($16) | 136 | addq $6,$0,$6 # 2 2 3 1 |
108 | addq $5,$2,$0 # c=high part + overflow | 137 | mulq $27,$19,$7 # 3 2 1 ##### |
109 | 138 | cmpult $6,$0,$0 # 2 2 3 2 | |
110 | ble $18,$243 | 139 | addq $21,$0,$0 # 2 3 2 |
111 | 140 | addq $16,32,$16 | |
112 | addq $16,16,$16 | 141 | umulh $27,$19,$27 # 3 2 ##### |
113 | addq $17,16,$17 | 142 | stq $5,-32($16) # 1 2 4 |
114 | blt $25,$242 | 143 | mulq $28,$19,$8 # 4 2 1 ##### |
115 | 144 | addq $7,$0,$7 # 3 2 3 1 | |
116 | br $31,$342 | 145 | stq $6,-24($16) # 2 2 4 |
117 | $242: | 146 | cmpult $7,$0,$0 # 3 2 3 2 |
118 | ldq $1,0($17) # a[0] | 147 | umulh $28,$19,$28 # 4 2 ##### |
119 | umulh $19,$1,$3 # a[0]*w high part | 148 | addq $27,$0,$0 # 3 3 2 |
120 | mulq $19,$1,$1 # a[0]*w low part | 149 | stq $7,-16($16) # 3 2 4 |
121 | addq $1,$0,$1 # add c | 150 | addq $8,$0,$8 # 4 2 3 1 |
122 | cmpult $1,$0,$4 # overflow? | 151 | cmpult $8,$0,$0 # 4 2 3 2 |
123 | addq $4,$3,$0 # c=high part + overflow | 152 | |
124 | stq $1,0($16) | 153 | addq $28,$0,$0 # 4 3 2 |
125 | $243: | 154 | |
126 | ret $31,($26),1 | 155 | stq $8,-8($16) # 4 2 4 |
156 | |||
157 | blt $18,$143 | ||
158 | |||
159 | ldq $20,0($17) # 1 1 | ||
160 | |||
161 | br $142 | ||
162 | |||
163 | .align 4 | ||
164 | $145: | ||
165 | ldq $20,0($17) # 4 1 | ||
166 | mulq $20,$19,$5 # 4 2 1 | ||
167 | subq $18,1,$18 | ||
168 | umulh $20,$19,$20 # 4 2 | ||
169 | addq $5,$0,$5 # 4 2 3 1 | ||
170 | addq $16,8,$16 | ||
171 | cmpult $5,$0,$0 # 4 2 3 2 | ||
172 | addq $17,8,$17 | ||
173 | addq $20,$0,$0 # 4 3 2 | ||
174 | stq $5,-8($16) # 4 2 4 | ||
175 | |||
176 | bgt $18,$145 | ||
177 | ret $31,($26),1 # else exit | ||
178 | |||
179 | .align 4 | ||
180 | $143: | ||
181 | addq $18,4,$18 | ||
182 | bgt $18,$145 # goto tail code | ||
183 | ret $31,($26),1 # else exit | ||
184 | |||
127 | .end bn_mul_words | 185 | .end bn_mul_words |
128 | .align 3 | 186 | .align 3 |
129 | .globl bn_sqr_words | 187 | .globl bn_sqr_words |
@@ -132,44 +190,58 @@ bn_sqr_words: | |||
132 | bn_sqr_words..ng: | 190 | bn_sqr_words..ng: |
133 | .frame $30,0,$26,0 | 191 | .frame $30,0,$26,0 |
134 | .prologue 0 | 192 | .prologue 0 |
135 | |||
136 | subq $18,2,$25 # num=-2 | ||
137 | blt $25,$442 | ||
138 | .align 5 | ||
139 | $542: | ||
140 | subq $18,2,$18 # num-=2 | ||
141 | subq $25,2,$25 # num-=2 | ||
142 | 193 | ||
143 | ldq $1,0($17) # a[0] | 194 | subq $18,4,$18 |
144 | ldq $4,8($17) # a[1] | 195 | blt $18,$543 # if we are -1, -2, -3 or -4 goto tail code |
145 | 196 | ldq $20,0($17) # 1 1 | |
146 | mulq $1,$1,$2 # a[0]*w low part r2 | 197 | .align 3 |
147 | umulh $1,$1,$3 # a[0]*w high part r3 | 198 | $542: |
148 | mulq $4,$4,$5 # a[1]*w low part r5 | 199 | mulq $20,$20,$5 ###### |
149 | umulh $4,$4,$6 # a[1]*w high part r6 | 200 | ldq $21,8($17) # 1 1 |
150 | 201 | subq $18,4 | |
151 | stq $2,0($16) # r[0] | 202 | umulh $20,$20,$1 ###### |
152 | stq $3,8($16) # r[1] | 203 | ldq $27,16($17) # 1 1 |
153 | stq $5,16($16) # r[3] | 204 | mulq $21,$21,$6 ###### |
154 | stq $6,24($16) # r[4] | 205 | ldq $28,24($17) # 1 1 |
206 | stq $5,0($16) # r[0] | ||
207 | umulh $21,$21,$2 ###### | ||
208 | stq $1,8($16) # r[1] | ||
209 | mulq $27,$27,$7 ###### | ||
210 | stq $6,16($16) # r[0] | ||
211 | umulh $27,$27,$3 ###### | ||
212 | stq $2,24($16) # r[1] | ||
213 | mulq $28,$28,$8 ###### | ||
214 | stq $7,32($16) # r[0] | ||
215 | umulh $28,$28,$4 ###### | ||
216 | stq $3,40($16) # r[1] | ||
155 | 217 | ||
156 | ble $18,$443 | 218 | addq $16,64,$16 |
219 | addq $17,32,$17 | ||
220 | stq $8,-16($16) # r[0] | ||
221 | stq $4,-8($16) # r[1] | ||
157 | 222 | ||
158 | addq $16,32,$16 | 223 | blt $18,$543 |
159 | addq $17,16,$17 | 224 | ldq $20,0($17) # 1 1 |
160 | blt $25,$442 | 225 | br $542 |
161 | br $31,$542 | ||
162 | 226 | ||
163 | $442: | 227 | $442: |
164 | ldq $1,0($17) # a[0] | 228 | ldq $20,0($17) # a[0] |
165 | mulq $1,$1,$2 # a[0]*w low part r2 | 229 | mulq $20,$20,$5 # a[0]*w low part r2 |
166 | umulh $1,$1,$3 # a[0]*w high part r3 | 230 | addq $16,16,$16 |
167 | stq $2,0($16) # r[0] | 231 | addq $17,8,$17 |
168 | stq $3,8($16) # r[1] | 232 | subq $18,1,$18 |
233 | umulh $20,$20,$1 # a[0]*w high part r3 | ||
234 | stq $5,-16($16) # r[0] | ||
235 | stq $1,-8($16) # r[1] | ||
236 | |||
237 | bgt $18,$442 | ||
238 | ret $31,($26),1 # else exit | ||
169 | 239 | ||
170 | .align 4 | 240 | .align 4 |
171 | $443: | 241 | $543: |
172 | ret $31,($26),1 | 242 | addq $18,4,$18 |
243 | bgt $18,$442 # goto tail code | ||
244 | ret $31,($26),1 # else exit | ||
173 | .end bn_sqr_words | 245 | .end bn_sqr_words |
174 | 246 | ||
175 | .align 3 | 247 | .align 3 |
@@ -180,31 +252,74 @@ bn_add_words..ng: | |||
180 | .frame $30,0,$26,0 | 252 | .frame $30,0,$26,0 |
181 | .prologue 0 | 253 | .prologue 0 |
182 | 254 | ||
183 | bis $31,$31,$8 # carry = 0 | 255 | subq $19,4,$19 |
184 | ble $19,$900 | 256 | bis $31,$31,$0 # carry = 0 |
257 | blt $19,$900 | ||
258 | ldq $5,0($17) # a[0] | ||
259 | ldq $1,0($18) # b[1] | ||
260 | .align 3 | ||
185 | $901: | 261 | $901: |
186 | ldq $0,0($17) # a[0] | 262 | addq $1,$5,$1 # r=a+b; |
187 | ldq $1,0($18) # a[1] | 263 | ldq $6,8($17) # a[1] |
264 | cmpult $1,$5,$22 # did we overflow? | ||
265 | ldq $2,8($18) # b[1] | ||
266 | addq $1,$0,$1 # c+= overflow | ||
267 | ldq $7,16($17) # a[2] | ||
268 | cmpult $1,$0,$0 # overflow? | ||
269 | ldq $3,16($18) # b[2] | ||
270 | addq $0,$22,$0 | ||
271 | ldq $8,24($17) # a[3] | ||
272 | addq $2,$6,$2 # r=a+b; | ||
273 | ldq $4,24($18) # b[3] | ||
274 | cmpult $2,$6,$23 # did we overflow? | ||
275 | addq $3,$7,$3 # r=a+b; | ||
276 | addq $2,$0,$2 # c+= overflow | ||
277 | cmpult $3,$7,$24 # did we overflow? | ||
278 | cmpult $2,$0,$0 # overflow? | ||
279 | addq $4,$8,$4 # r=a+b; | ||
280 | addq $0,$23,$0 | ||
281 | cmpult $4,$8,$25 # did we overflow? | ||
282 | addq $3,$0,$3 # c+= overflow | ||
283 | stq $1,0($16) # r[0]=c | ||
284 | cmpult $3,$0,$0 # overflow? | ||
285 | stq $2,8($16) # r[1]=c | ||
286 | addq $0,$24,$0 | ||
287 | stq $3,16($16) # r[2]=c | ||
288 | addq $4,$0,$4 # c+= overflow | ||
289 | subq $19,4,$19 # loop-- | ||
290 | cmpult $4,$0,$0 # overflow? | ||
291 | addq $17,32,$17 # a++ | ||
292 | addq $0,$25,$0 | ||
293 | stq $4,24($16) # r[3]=c | ||
294 | addq $18,32,$18 # b++ | ||
295 | addq $16,32,$16 # r++ | ||
188 | 296 | ||
189 | addq $0,$1,$3 # c=a+b; | 297 | blt $19,$900 |
298 | ldq $5,0($17) # a[0] | ||
299 | ldq $1,0($18) # b[1] | ||
300 | br $901 | ||
301 | .align 4 | ||
302 | $945: | ||
303 | ldq $5,0($17) # a[0] | ||
304 | ldq $1,0($18) # b[1] | ||
305 | addq $1,$5,$1 # r=a+b; | ||
306 | subq $19,1,$19 # loop-- | ||
307 | addq $1,$0,$1 # c+= overflow | ||
190 | addq $17,8,$17 # a++ | 308 | addq $17,8,$17 # a++ |
309 | cmpult $1,$5,$22 # did we overflow? | ||
310 | cmpult $1,$0,$0 # overflow? | ||
311 | addq $18,8,$18 # b++ | ||
312 | stq $1,0($16) # r[0]=c | ||
313 | addq $0,$22,$0 | ||
314 | addq $16,8,$16 # r++ | ||
191 | 315 | ||
192 | cmpult $3,$1,$7 # did we overflow? | 316 | bgt $19,$945 |
193 | addq $18,8,$18 # b++ | 317 | ret $31,($26),1 # else exit |
194 | |||
195 | addq $8,$3,$3 # c+=carry | ||
196 | |||
197 | cmpult $3,$8,$8 # did we overflow? | ||
198 | stq $3,($16) # r[0]=c | ||
199 | |||
200 | addq $7,$8,$8 # add into overflow | ||
201 | subq $19,1,$19 # loop-- | ||
202 | 318 | ||
203 | addq $16,8,$16 # r++ | ||
204 | bgt $19,$901 | ||
205 | $900: | 319 | $900: |
206 | bis $8,$8,$0 # return carry | 320 | addq $19,4,$19 |
207 | ret $31,($26),1 | 321 | bgt $19,$945 # goto tail code |
322 | ret $31,($26),1 # else exit | ||
208 | .end bn_add_words | 323 | .end bn_add_words |
209 | 324 | ||
210 | # | 325 | # |
@@ -213,11 +328,11 @@ $900: | |||
213 | # | 328 | # |
214 | .text | 329 | .text |
215 | .align 3 | 330 | .align 3 |
216 | .globl bn_div64 | 331 | .globl bn_div_words |
217 | .ent bn_div64 | 332 | .ent bn_div_words |
218 | bn_div64: | 333 | bn_div_words: |
219 | ldgp $29,0($27) | 334 | ldgp $29,0($27) |
220 | bn_div64..ng: | 335 | bn_div_words..ng: |
221 | lda $30,-48($30) | 336 | lda $30,-48($30) |
222 | .frame $30,48,$26,0 | 337 | .frame $30,48,$26,0 |
223 | stq $26,0($30) | 338 | stq $26,0($30) |
@@ -338,7 +453,2747 @@ $136: | |||
338 | ldq $13,40($30) | 453 | ldq $13,40($30) |
339 | addq $30,48,$30 | 454 | addq $30,48,$30 |
340 | ret $31,($26),1 | 455 | ret $31,($26),1 |
341 | .end bn_div64 | 456 | .end bn_div_words |
342 | .ident "GCC: (GNU) 2.7.2.1" | 457 | |
458 | .set noat | ||
459 | .text | ||
460 | .align 3 | ||
461 | .globl bn_sub_words | ||
462 | .ent bn_sub_words | ||
463 | bn_sub_words: | ||
464 | bn_sub_words..ng: | ||
465 | .frame $30,0,$26,0 | ||
466 | .prologue 0 | ||
467 | |||
468 | subq $19, 4, $19 | ||
469 | bis $31, $31, $0 | ||
470 | blt $19, $100 | ||
471 | ldq $1, 0($17) | ||
472 | ldq $2, 0($18) | ||
473 | $101: | ||
474 | ldq $3, 8($17) | ||
475 | cmpult $1, $2, $4 | ||
476 | ldq $5, 8($18) | ||
477 | subq $1, $2, $1 | ||
478 | ldq $6, 16($17) | ||
479 | cmpult $1, $0, $2 | ||
480 | ldq $7, 16($18) | ||
481 | subq $1, $0, $23 | ||
482 | ldq $8, 24($17) | ||
483 | addq $2, $4, $0 | ||
484 | cmpult $3, $5, $24 | ||
485 | subq $3, $5, $3 | ||
486 | ldq $22, 24($18) | ||
487 | cmpult $3, $0, $5 | ||
488 | subq $3, $0, $25 | ||
489 | addq $5, $24, $0 | ||
490 | cmpult $6, $7, $27 | ||
491 | subq $6, $7, $6 | ||
492 | stq $23, 0($16) | ||
493 | cmpult $6, $0, $7 | ||
494 | subq $6, $0, $28 | ||
495 | addq $7, $27, $0 | ||
496 | cmpult $8, $22, $21 | ||
497 | subq $8, $22, $8 | ||
498 | stq $25, 8($16) | ||
499 | cmpult $8, $0, $22 | ||
500 | subq $8, $0, $20 | ||
501 | addq $22, $21, $0 | ||
502 | stq $28, 16($16) | ||
503 | subq $19, 4, $19 | ||
504 | stq $20, 24($16) | ||
505 | addq $17, 32, $17 | ||
506 | addq $18, 32, $18 | ||
507 | addq $16, 32, $16 | ||
508 | blt $19, $100 | ||
509 | ldq $1, 0($17) | ||
510 | ldq $2, 0($18) | ||
511 | br $101 | ||
512 | $102: | ||
513 | ldq $1, 0($17) | ||
514 | ldq $2, 0($18) | ||
515 | cmpult $1, $2, $27 | ||
516 | subq $1, $2, $1 | ||
517 | cmpult $1, $0, $2 | ||
518 | subq $1, $0, $1 | ||
519 | stq $1, 0($16) | ||
520 | addq $2, $27, $0 | ||
521 | addq $17, 8, $17 | ||
522 | addq $18, 8, $18 | ||
523 | addq $16, 8, $16 | ||
524 | subq $19, 1, $19 | ||
525 | bgt $19, $102 | ||
526 | ret $31,($26),1 | ||
527 | $100: | ||
528 | addq $19, 4, $19 | ||
529 | bgt $19, $102 | ||
530 | $103: | ||
531 | ret $31,($26),1 | ||
532 | .end bn_sub_words | ||
533 | .text | ||
534 | .align 3 | ||
535 | .globl bn_mul_comba4 | ||
536 | .ent bn_mul_comba4 | ||
537 | bn_mul_comba4: | ||
538 | bn_mul_comba4..ng: | ||
539 | .frame $30,0,$26,0 | ||
540 | .prologue 0 | ||
343 | 541 | ||
542 | ldq $0, 0($17) | ||
543 | ldq $1, 0($18) | ||
544 | ldq $2, 8($17) | ||
545 | ldq $3, 8($18) | ||
546 | ldq $4, 16($17) | ||
547 | ldq $5, 16($18) | ||
548 | ldq $6, 24($17) | ||
549 | ldq $7, 24($18) | ||
550 | bis $31, $31, $23 | ||
551 | mulq $0, $1, $8 | ||
552 | umulh $0, $1, $22 | ||
553 | stq $8, 0($16) | ||
554 | bis $31, $31, $8 | ||
555 | mulq $0, $3, $24 | ||
556 | umulh $0, $3, $25 | ||
557 | addq $22, $24, $22 | ||
558 | cmpult $22, $24, $27 | ||
559 | addq $27, $25, $25 | ||
560 | addq $23, $25, $23 | ||
561 | cmpult $23, $25, $28 | ||
562 | addq $8, $28, $8 | ||
563 | mulq $2, $1, $21 | ||
564 | umulh $2, $1, $20 | ||
565 | addq $22, $21, $22 | ||
566 | cmpult $22, $21, $19 | ||
567 | addq $19, $20, $20 | ||
568 | addq $23, $20, $23 | ||
569 | cmpult $23, $20, $17 | ||
570 | addq $8, $17, $8 | ||
571 | stq $22, 8($16) | ||
572 | bis $31, $31, $22 | ||
573 | mulq $2, $3, $18 | ||
574 | umulh $2, $3, $24 | ||
575 | addq $23, $18, $23 | ||
576 | cmpult $23, $18, $27 | ||
577 | addq $27, $24, $24 | ||
578 | addq $8, $24, $8 | ||
579 | cmpult $8, $24, $25 | ||
580 | addq $22, $25, $22 | ||
581 | mulq $0, $5, $28 | ||
582 | umulh $0, $5, $21 | ||
583 | addq $23, $28, $23 | ||
584 | cmpult $23, $28, $19 | ||
585 | addq $19, $21, $21 | ||
586 | addq $8, $21, $8 | ||
587 | cmpult $8, $21, $20 | ||
588 | addq $22, $20, $22 | ||
589 | mulq $4, $1, $17 | ||
590 | umulh $4, $1, $18 | ||
591 | addq $23, $17, $23 | ||
592 | cmpult $23, $17, $27 | ||
593 | addq $27, $18, $18 | ||
594 | addq $8, $18, $8 | ||
595 | cmpult $8, $18, $24 | ||
596 | addq $22, $24, $22 | ||
597 | stq $23, 16($16) | ||
598 | bis $31, $31, $23 | ||
599 | mulq $0, $7, $25 | ||
600 | umulh $0, $7, $28 | ||
601 | addq $8, $25, $8 | ||
602 | cmpult $8, $25, $19 | ||
603 | addq $19, $28, $28 | ||
604 | addq $22, $28, $22 | ||
605 | cmpult $22, $28, $21 | ||
606 | addq $23, $21, $23 | ||
607 | mulq $2, $5, $20 | ||
608 | umulh $2, $5, $17 | ||
609 | addq $8, $20, $8 | ||
610 | cmpult $8, $20, $27 | ||
611 | addq $27, $17, $17 | ||
612 | addq $22, $17, $22 | ||
613 | cmpult $22, $17, $18 | ||
614 | addq $23, $18, $23 | ||
615 | mulq $4, $3, $24 | ||
616 | umulh $4, $3, $25 | ||
617 | addq $8, $24, $8 | ||
618 | cmpult $8, $24, $19 | ||
619 | addq $19, $25, $25 | ||
620 | addq $22, $25, $22 | ||
621 | cmpult $22, $25, $28 | ||
622 | addq $23, $28, $23 | ||
623 | mulq $6, $1, $21 | ||
624 | umulh $6, $1, $0 | ||
625 | addq $8, $21, $8 | ||
626 | cmpult $8, $21, $20 | ||
627 | addq $20, $0, $0 | ||
628 | addq $22, $0, $22 | ||
629 | cmpult $22, $0, $27 | ||
630 | addq $23, $27, $23 | ||
631 | stq $8, 24($16) | ||
632 | bis $31, $31, $8 | ||
633 | mulq $2, $7, $17 | ||
634 | umulh $2, $7, $18 | ||
635 | addq $22, $17, $22 | ||
636 | cmpult $22, $17, $24 | ||
637 | addq $24, $18, $18 | ||
638 | addq $23, $18, $23 | ||
639 | cmpult $23, $18, $19 | ||
640 | addq $8, $19, $8 | ||
641 | mulq $4, $5, $25 | ||
642 | umulh $4, $5, $28 | ||
643 | addq $22, $25, $22 | ||
644 | cmpult $22, $25, $21 | ||
645 | addq $21, $28, $28 | ||
646 | addq $23, $28, $23 | ||
647 | cmpult $23, $28, $20 | ||
648 | addq $8, $20, $8 | ||
649 | mulq $6, $3, $0 | ||
650 | umulh $6, $3, $27 | ||
651 | addq $22, $0, $22 | ||
652 | cmpult $22, $0, $1 | ||
653 | addq $1, $27, $27 | ||
654 | addq $23, $27, $23 | ||
655 | cmpult $23, $27, $17 | ||
656 | addq $8, $17, $8 | ||
657 | stq $22, 32($16) | ||
658 | bis $31, $31, $22 | ||
659 | mulq $4, $7, $24 | ||
660 | umulh $4, $7, $18 | ||
661 | addq $23, $24, $23 | ||
662 | cmpult $23, $24, $19 | ||
663 | addq $19, $18, $18 | ||
664 | addq $8, $18, $8 | ||
665 | cmpult $8, $18, $2 | ||
666 | addq $22, $2, $22 | ||
667 | mulq $6, $5, $25 | ||
668 | umulh $6, $5, $21 | ||
669 | addq $23, $25, $23 | ||
670 | cmpult $23, $25, $28 | ||
671 | addq $28, $21, $21 | ||
672 | addq $8, $21, $8 | ||
673 | cmpult $8, $21, $20 | ||
674 | addq $22, $20, $22 | ||
675 | stq $23, 40($16) | ||
676 | bis $31, $31, $23 | ||
677 | mulq $6, $7, $0 | ||
678 | umulh $6, $7, $1 | ||
679 | addq $8, $0, $8 | ||
680 | cmpult $8, $0, $27 | ||
681 | addq $27, $1, $1 | ||
682 | addq $22, $1, $22 | ||
683 | cmpult $22, $1, $17 | ||
684 | addq $23, $17, $23 | ||
685 | stq $8, 48($16) | ||
686 | stq $22, 56($16) | ||
687 | ret $31,($26),1 | ||
688 | .end bn_mul_comba4 | ||
689 | .text | ||
690 | .align 3 | ||
691 | .globl bn_mul_comba8 | ||
692 | .ent bn_mul_comba8 | ||
693 | bn_mul_comba8: | ||
694 | bn_mul_comba8..ng: | ||
695 | .frame $30,0,$26,0 | ||
696 | .prologue 0 | ||
697 | ldq $1, 0($17) | ||
698 | ldq $2, 0($18) | ||
699 | zapnot $1, 15, $7 | ||
700 | srl $2, 32, $8 | ||
701 | mulq $8, $7, $22 | ||
702 | srl $1, 32, $6 | ||
703 | zapnot $2, 15, $5 | ||
704 | mulq $5, $6, $4 | ||
705 | mulq $7, $5, $24 | ||
706 | addq $22, $4, $22 | ||
707 | cmpult $22, $4, $1 | ||
708 | mulq $6, $8, $3 | ||
709 | beq $1, $173 | ||
710 | bis $31, 1, $1 | ||
711 | sll $1, 32, $1 | ||
712 | addq $3, $1, $3 | ||
713 | $173: | ||
714 | sll $22, 32, $4 | ||
715 | addq $24, $4, $24 | ||
716 | stq $24, 0($16) | ||
717 | ldq $2, 0($17) | ||
718 | ldq $1, 8($18) | ||
719 | zapnot $2, 15, $7 | ||
720 | srl $1, 32, $8 | ||
721 | mulq $8, $7, $25 | ||
722 | zapnot $1, 15, $5 | ||
723 | mulq $7, $5, $0 | ||
724 | srl $2, 32, $6 | ||
725 | mulq $5, $6, $23 | ||
726 | mulq $6, $8, $6 | ||
727 | srl $22, 32, $1 | ||
728 | cmpult $24, $4, $2 | ||
729 | addq $3, $1, $3 | ||
730 | addq $2, $3, $22 | ||
731 | addq $25, $23, $25 | ||
732 | cmpult $25, $23, $1 | ||
733 | bis $31, 1, $2 | ||
734 | beq $1, $177 | ||
735 | sll $2, 32, $1 | ||
736 | addq $6, $1, $6 | ||
737 | $177: | ||
738 | sll $25, 32, $23 | ||
739 | ldq $1, 0($18) | ||
740 | addq $0, $23, $0 | ||
741 | bis $0, $0, $7 | ||
742 | ldq $3, 8($17) | ||
743 | addq $22, $7, $22 | ||
744 | srl $1, 32, $8 | ||
745 | cmpult $22, $7, $4 | ||
746 | zapnot $3, 15, $7 | ||
747 | mulq $8, $7, $28 | ||
748 | zapnot $1, 15, $5 | ||
749 | mulq $7, $5, $21 | ||
750 | srl $25, 32, $1 | ||
751 | cmpult $0, $23, $2 | ||
752 | addq $6, $1, $6 | ||
753 | addq $2, $6, $6 | ||
754 | addq $4, $6, $24 | ||
755 | srl $3, 32, $6 | ||
756 | mulq $5, $6, $2 | ||
757 | mulq $6, $8, $6 | ||
758 | addq $28, $2, $28 | ||
759 | cmpult $28, $2, $1 | ||
760 | bis $31, 1, $2 | ||
761 | beq $1, $181 | ||
762 | sll $2, 32, $1 | ||
763 | addq $6, $1, $6 | ||
764 | $181: | ||
765 | sll $28, 32, $2 | ||
766 | addq $21, $2, $21 | ||
767 | bis $21, $21, $7 | ||
768 | addq $22, $7, $22 | ||
769 | stq $22, 8($16) | ||
770 | ldq $3, 16($17) | ||
771 | ldq $1, 0($18) | ||
772 | cmpult $22, $7, $4 | ||
773 | zapnot $3, 15, $7 | ||
774 | srl $1, 32, $8 | ||
775 | mulq $8, $7, $22 | ||
776 | zapnot $1, 15, $5 | ||
777 | mulq $7, $5, $20 | ||
778 | srl $28, 32, $1 | ||
779 | cmpult $21, $2, $2 | ||
780 | addq $6, $1, $6 | ||
781 | addq $2, $6, $6 | ||
782 | addq $4, $6, $6 | ||
783 | addq $24, $6, $24 | ||
784 | cmpult $24, $6, $23 | ||
785 | srl $3, 32, $6 | ||
786 | mulq $5, $6, $2 | ||
787 | mulq $6, $8, $6 | ||
788 | addq $22, $2, $22 | ||
789 | cmpult $22, $2, $1 | ||
790 | bis $31, 1, $2 | ||
791 | beq $1, $185 | ||
792 | sll $2, 32, $1 | ||
793 | addq $6, $1, $6 | ||
794 | $185: | ||
795 | sll $22, 32, $2 | ||
796 | ldq $1, 8($18) | ||
797 | addq $20, $2, $20 | ||
798 | bis $20, $20, $7 | ||
799 | ldq $4, 8($17) | ||
800 | addq $24, $7, $24 | ||
801 | srl $1, 32, $8 | ||
802 | cmpult $24, $7, $3 | ||
803 | zapnot $4, 15, $7 | ||
804 | mulq $8, $7, $25 | ||
805 | zapnot $1, 15, $5 | ||
806 | mulq $7, $5, $0 | ||
807 | srl $22, 32, $1 | ||
808 | cmpult $20, $2, $2 | ||
809 | addq $6, $1, $6 | ||
810 | addq $2, $6, $6 | ||
811 | addq $3, $6, $6 | ||
812 | addq $23, $6, $23 | ||
813 | cmpult $23, $6, $22 | ||
814 | srl $4, 32, $6 | ||
815 | mulq $5, $6, $5 | ||
816 | bis $31, 1, $21 | ||
817 | addq $25, $5, $25 | ||
818 | cmpult $25, $5, $1 | ||
819 | mulq $6, $8, $6 | ||
820 | beq $1, $189 | ||
821 | sll $21, 32, $1 | ||
822 | addq $6, $1, $6 | ||
823 | $189: | ||
824 | sll $25, 32, $5 | ||
825 | ldq $2, 16($18) | ||
826 | addq $0, $5, $0 | ||
827 | bis $0, $0, $7 | ||
828 | ldq $4, 0($17) | ||
829 | addq $24, $7, $24 | ||
830 | srl $2, 32, $8 | ||
831 | cmpult $24, $7, $3 | ||
832 | zapnot $4, 15, $7 | ||
833 | mulq $8, $7, $28 | ||
834 | srl $25, 32, $1 | ||
835 | addq $6, $1, $6 | ||
836 | cmpult $0, $5, $1 | ||
837 | zapnot $2, 15, $5 | ||
838 | addq $1, $6, $6 | ||
839 | addq $3, $6, $6 | ||
840 | addq $23, $6, $23 | ||
841 | cmpult $23, $6, $1 | ||
842 | srl $4, 32, $6 | ||
843 | mulq $5, $6, $25 | ||
844 | mulq $7, $5, $2 | ||
845 | addq $1, $22, $22 | ||
846 | addq $28, $25, $28 | ||
847 | cmpult $28, $25, $1 | ||
848 | mulq $6, $8, $6 | ||
849 | beq $1, $193 | ||
850 | sll $21, 32, $1 | ||
851 | addq $6, $1, $6 | ||
852 | $193: | ||
853 | sll $28, 32, $25 | ||
854 | addq $2, $25, $2 | ||
855 | bis $2, $2, $7 | ||
856 | addq $24, $7, $24 | ||
857 | stq $24, 16($16) | ||
858 | ldq $4, 0($17) | ||
859 | ldq $5, 24($18) | ||
860 | cmpult $24, $7, $3 | ||
861 | zapnot $4, 15, $7 | ||
862 | srl $5, 32, $8 | ||
863 | mulq $8, $7, $0 | ||
864 | srl $28, 32, $1 | ||
865 | cmpult $2, $25, $2 | ||
866 | addq $6, $1, $6 | ||
867 | addq $2, $6, $6 | ||
868 | addq $3, $6, $6 | ||
869 | addq $23, $6, $23 | ||
870 | cmpult $23, $6, $1 | ||
871 | srl $4, 32, $6 | ||
872 | zapnot $5, 15, $5 | ||
873 | mulq $5, $6, $24 | ||
874 | mulq $7, $5, $2 | ||
875 | addq $1, $22, $22 | ||
876 | addq $0, $24, $0 | ||
877 | cmpult $0, $24, $1 | ||
878 | mulq $6, $8, $6 | ||
879 | beq $1, $197 | ||
880 | sll $21, 32, $1 | ||
881 | addq $6, $1, $6 | ||
882 | $197: | ||
883 | sll $0, 32, $24 | ||
884 | ldq $1, 16($18) | ||
885 | addq $2, $24, $2 | ||
886 | bis $2, $2, $7 | ||
887 | ldq $4, 8($17) | ||
888 | addq $23, $7, $23 | ||
889 | srl $1, 32, $8 | ||
890 | cmpult $23, $7, $3 | ||
891 | zapnot $4, 15, $7 | ||
892 | mulq $8, $7, $25 | ||
893 | zapnot $1, 15, $5 | ||
894 | mulq $7, $5, $21 | ||
895 | srl $0, 32, $1 | ||
896 | cmpult $2, $24, $2 | ||
897 | addq $6, $1, $6 | ||
898 | addq $2, $6, $6 | ||
899 | addq $3, $6, $6 | ||
900 | addq $22, $6, $22 | ||
901 | cmpult $22, $6, $24 | ||
902 | srl $4, 32, $6 | ||
903 | mulq $5, $6, $5 | ||
904 | bis $31, 1, $20 | ||
905 | addq $25, $5, $25 | ||
906 | cmpult $25, $5, $1 | ||
907 | mulq $6, $8, $6 | ||
908 | beq $1, $201 | ||
909 | sll $20, 32, $1 | ||
910 | addq $6, $1, $6 | ||
911 | $201: | ||
912 | sll $25, 32, $5 | ||
913 | ldq $2, 8($18) | ||
914 | addq $21, $5, $21 | ||
915 | bis $21, $21, $7 | ||
916 | ldq $4, 16($17) | ||
917 | addq $23, $7, $23 | ||
918 | srl $2, 32, $8 | ||
919 | cmpult $23, $7, $3 | ||
920 | zapnot $4, 15, $7 | ||
921 | mulq $8, $7, $28 | ||
922 | srl $25, 32, $1 | ||
923 | addq $6, $1, $6 | ||
924 | cmpult $21, $5, $1 | ||
925 | zapnot $2, 15, $5 | ||
926 | addq $1, $6, $6 | ||
927 | addq $3, $6, $6 | ||
928 | addq $22, $6, $22 | ||
929 | cmpult $22, $6, $1 | ||
930 | srl $4, 32, $6 | ||
931 | mulq $5, $6, $25 | ||
932 | mulq $7, $5, $5 | ||
933 | addq $1, $24, $24 | ||
934 | addq $28, $25, $28 | ||
935 | cmpult $28, $25, $1 | ||
936 | mulq $6, $8, $6 | ||
937 | beq $1, $205 | ||
938 | sll $20, 32, $1 | ||
939 | addq $6, $1, $6 | ||
940 | $205: | ||
941 | sll $28, 32, $25 | ||
942 | ldq $2, 0($18) | ||
943 | addq $5, $25, $5 | ||
944 | bis $5, $5, $7 | ||
945 | ldq $4, 24($17) | ||
946 | addq $23, $7, $23 | ||
947 | srl $2, 32, $8 | ||
948 | cmpult $23, $7, $3 | ||
949 | zapnot $4, 15, $7 | ||
950 | mulq $8, $7, $0 | ||
951 | srl $28, 32, $1 | ||
952 | addq $6, $1, $6 | ||
953 | cmpult $5, $25, $1 | ||
954 | zapnot $2, 15, $5 | ||
955 | addq $1, $6, $6 | ||
956 | addq $3, $6, $6 | ||
957 | addq $22, $6, $22 | ||
958 | cmpult $22, $6, $1 | ||
959 | srl $4, 32, $6 | ||
960 | mulq $5, $6, $25 | ||
961 | mulq $7, $5, $2 | ||
962 | addq $1, $24, $24 | ||
963 | addq $0, $25, $0 | ||
964 | cmpult $0, $25, $1 | ||
965 | mulq $6, $8, $6 | ||
966 | beq $1, $209 | ||
967 | sll $20, 32, $1 | ||
968 | addq $6, $1, $6 | ||
969 | $209: | ||
970 | sll $0, 32, $25 | ||
971 | addq $2, $25, $2 | ||
972 | bis $2, $2, $7 | ||
973 | addq $23, $7, $23 | ||
974 | stq $23, 24($16) | ||
975 | ldq $4, 32($17) | ||
976 | ldq $5, 0($18) | ||
977 | cmpult $23, $7, $3 | ||
978 | zapnot $4, 15, $7 | ||
979 | srl $5, 32, $8 | ||
980 | mulq $8, $7, $28 | ||
981 | srl $0, 32, $1 | ||
982 | cmpult $2, $25, $2 | ||
983 | addq $6, $1, $6 | ||
984 | addq $2, $6, $6 | ||
985 | addq $3, $6, $6 | ||
986 | addq $22, $6, $22 | ||
987 | cmpult $22, $6, $1 | ||
988 | srl $4, 32, $6 | ||
989 | zapnot $5, 15, $5 | ||
990 | mulq $5, $6, $23 | ||
991 | mulq $7, $5, $2 | ||
992 | addq $1, $24, $24 | ||
993 | addq $28, $23, $28 | ||
994 | cmpult $28, $23, $1 | ||
995 | mulq $6, $8, $6 | ||
996 | beq $1, $213 | ||
997 | sll $20, 32, $1 | ||
998 | addq $6, $1, $6 | ||
999 | $213: | ||
1000 | sll $28, 32, $23 | ||
1001 | ldq $1, 8($18) | ||
1002 | addq $2, $23, $2 | ||
1003 | bis $2, $2, $7 | ||
1004 | ldq $4, 24($17) | ||
1005 | addq $22, $7, $22 | ||
1006 | srl $1, 32, $8 | ||
1007 | cmpult $22, $7, $3 | ||
1008 | zapnot $4, 15, $7 | ||
1009 | mulq $8, $7, $25 | ||
1010 | zapnot $1, 15, $5 | ||
1011 | mulq $7, $5, $0 | ||
1012 | srl $28, 32, $1 | ||
1013 | cmpult $2, $23, $2 | ||
1014 | addq $6, $1, $6 | ||
1015 | addq $2, $6, $6 | ||
1016 | addq $3, $6, $6 | ||
1017 | addq $24, $6, $24 | ||
1018 | cmpult $24, $6, $23 | ||
1019 | srl $4, 32, $6 | ||
1020 | mulq $5, $6, $5 | ||
1021 | bis $31, 1, $21 | ||
1022 | addq $25, $5, $25 | ||
1023 | cmpult $25, $5, $1 | ||
1024 | mulq $6, $8, $6 | ||
1025 | beq $1, $217 | ||
1026 | sll $21, 32, $1 | ||
1027 | addq $6, $1, $6 | ||
1028 | $217: | ||
1029 | sll $25, 32, $5 | ||
1030 | ldq $2, 16($18) | ||
1031 | addq $0, $5, $0 | ||
1032 | bis $0, $0, $7 | ||
1033 | ldq $4, 16($17) | ||
1034 | addq $22, $7, $22 | ||
1035 | srl $2, 32, $8 | ||
1036 | cmpult $22, $7, $3 | ||
1037 | zapnot $4, 15, $7 | ||
1038 | mulq $8, $7, $28 | ||
1039 | srl $25, 32, $1 | ||
1040 | addq $6, $1, $6 | ||
1041 | cmpult $0, $5, $1 | ||
1042 | zapnot $2, 15, $5 | ||
1043 | addq $1, $6, $6 | ||
1044 | addq $3, $6, $6 | ||
1045 | addq $24, $6, $24 | ||
1046 | cmpult $24, $6, $1 | ||
1047 | srl $4, 32, $6 | ||
1048 | mulq $5, $6, $25 | ||
1049 | mulq $7, $5, $5 | ||
1050 | addq $1, $23, $23 | ||
1051 | addq $28, $25, $28 | ||
1052 | cmpult $28, $25, $1 | ||
1053 | mulq $6, $8, $6 | ||
1054 | beq $1, $221 | ||
1055 | sll $21, 32, $1 | ||
1056 | addq $6, $1, $6 | ||
1057 | $221: | ||
1058 | sll $28, 32, $25 | ||
1059 | ldq $2, 24($18) | ||
1060 | addq $5, $25, $5 | ||
1061 | bis $5, $5, $7 | ||
1062 | ldq $4, 8($17) | ||
1063 | addq $22, $7, $22 | ||
1064 | srl $2, 32, $8 | ||
1065 | cmpult $22, $7, $3 | ||
1066 | zapnot $4, 15, $7 | ||
1067 | mulq $8, $7, $0 | ||
1068 | srl $28, 32, $1 | ||
1069 | addq $6, $1, $6 | ||
1070 | cmpult $5, $25, $1 | ||
1071 | zapnot $2, 15, $5 | ||
1072 | addq $1, $6, $6 | ||
1073 | addq $3, $6, $6 | ||
1074 | addq $24, $6, $24 | ||
1075 | cmpult $24, $6, $1 | ||
1076 | srl $4, 32, $6 | ||
1077 | mulq $5, $6, $25 | ||
1078 | mulq $7, $5, $5 | ||
1079 | addq $1, $23, $23 | ||
1080 | addq $0, $25, $0 | ||
1081 | cmpult $0, $25, $1 | ||
1082 | mulq $6, $8, $6 | ||
1083 | beq $1, $225 | ||
1084 | sll $21, 32, $1 | ||
1085 | addq $6, $1, $6 | ||
1086 | $225: | ||
1087 | sll $0, 32, $25 | ||
1088 | ldq $2, 32($18) | ||
1089 | addq $5, $25, $5 | ||
1090 | bis $5, $5, $7 | ||
1091 | ldq $4, 0($17) | ||
1092 | addq $22, $7, $22 | ||
1093 | srl $2, 32, $8 | ||
1094 | cmpult $22, $7, $3 | ||
1095 | zapnot $4, 15, $7 | ||
1096 | mulq $8, $7, $28 | ||
1097 | srl $0, 32, $1 | ||
1098 | addq $6, $1, $6 | ||
1099 | cmpult $5, $25, $1 | ||
1100 | zapnot $2, 15, $5 | ||
1101 | addq $1, $6, $6 | ||
1102 | addq $3, $6, $6 | ||
1103 | addq $24, $6, $24 | ||
1104 | cmpult $24, $6, $1 | ||
1105 | srl $4, 32, $6 | ||
1106 | mulq $5, $6, $25 | ||
1107 | mulq $7, $5, $2 | ||
1108 | addq $1, $23, $23 | ||
1109 | addq $28, $25, $28 | ||
1110 | cmpult $28, $25, $1 | ||
1111 | mulq $6, $8, $6 | ||
1112 | beq $1, $229 | ||
1113 | sll $21, 32, $1 | ||
1114 | addq $6, $1, $6 | ||
1115 | $229: | ||
1116 | sll $28, 32, $25 | ||
1117 | addq $2, $25, $2 | ||
1118 | bis $2, $2, $7 | ||
1119 | addq $22, $7, $22 | ||
1120 | stq $22, 32($16) | ||
1121 | ldq $4, 0($17) | ||
1122 | ldq $5, 40($18) | ||
1123 | cmpult $22, $7, $3 | ||
1124 | zapnot $4, 15, $7 | ||
1125 | srl $5, 32, $8 | ||
1126 | mulq $8, $7, $0 | ||
1127 | srl $28, 32, $1 | ||
1128 | cmpult $2, $25, $2 | ||
1129 | addq $6, $1, $6 | ||
1130 | addq $2, $6, $6 | ||
1131 | addq $3, $6, $6 | ||
1132 | addq $24, $6, $24 | ||
1133 | cmpult $24, $6, $1 | ||
1134 | srl $4, 32, $6 | ||
1135 | zapnot $5, 15, $5 | ||
1136 | mulq $5, $6, $22 | ||
1137 | mulq $7, $5, $2 | ||
1138 | addq $1, $23, $23 | ||
1139 | addq $0, $22, $0 | ||
1140 | cmpult $0, $22, $1 | ||
1141 | mulq $6, $8, $6 | ||
1142 | beq $1, $233 | ||
1143 | sll $21, 32, $1 | ||
1144 | addq $6, $1, $6 | ||
1145 | $233: | ||
1146 | sll $0, 32, $22 | ||
1147 | ldq $1, 32($18) | ||
1148 | addq $2, $22, $2 | ||
1149 | bis $2, $2, $7 | ||
1150 | ldq $4, 8($17) | ||
1151 | addq $24, $7, $24 | ||
1152 | srl $1, 32, $8 | ||
1153 | cmpult $24, $7, $3 | ||
1154 | zapnot $4, 15, $7 | ||
1155 | mulq $8, $7, $25 | ||
1156 | zapnot $1, 15, $5 | ||
1157 | mulq $7, $5, $21 | ||
1158 | srl $0, 32, $1 | ||
1159 | cmpult $2, $22, $2 | ||
1160 | addq $6, $1, $6 | ||
1161 | addq $2, $6, $6 | ||
1162 | addq $3, $6, $6 | ||
1163 | addq $23, $6, $23 | ||
1164 | cmpult $23, $6, $22 | ||
1165 | srl $4, 32, $6 | ||
1166 | mulq $5, $6, $5 | ||
1167 | bis $31, 1, $20 | ||
1168 | addq $25, $5, $25 | ||
1169 | cmpult $25, $5, $1 | ||
1170 | mulq $6, $8, $6 | ||
1171 | beq $1, $237 | ||
1172 | sll $20, 32, $1 | ||
1173 | addq $6, $1, $6 | ||
1174 | $237: | ||
1175 | sll $25, 32, $5 | ||
1176 | ldq $2, 24($18) | ||
1177 | addq $21, $5, $21 | ||
1178 | bis $21, $21, $7 | ||
1179 | ldq $4, 16($17) | ||
1180 | addq $24, $7, $24 | ||
1181 | srl $2, 32, $8 | ||
1182 | cmpult $24, $7, $3 | ||
1183 | zapnot $4, 15, $7 | ||
1184 | mulq $8, $7, $28 | ||
1185 | srl $25, 32, $1 | ||
1186 | addq $6, $1, $6 | ||
1187 | cmpult $21, $5, $1 | ||
1188 | zapnot $2, 15, $5 | ||
1189 | addq $1, $6, $6 | ||
1190 | addq $3, $6, $6 | ||
1191 | addq $23, $6, $23 | ||
1192 | cmpult $23, $6, $1 | ||
1193 | srl $4, 32, $6 | ||
1194 | mulq $5, $6, $25 | ||
1195 | mulq $7, $5, $5 | ||
1196 | addq $1, $22, $22 | ||
1197 | addq $28, $25, $28 | ||
1198 | cmpult $28, $25, $1 | ||
1199 | mulq $6, $8, $6 | ||
1200 | beq $1, $241 | ||
1201 | sll $20, 32, $1 | ||
1202 | addq $6, $1, $6 | ||
1203 | $241: | ||
1204 | sll $28, 32, $25 | ||
1205 | ldq $2, 16($18) | ||
1206 | addq $5, $25, $5 | ||
1207 | bis $5, $5, $7 | ||
1208 | ldq $4, 24($17) | ||
1209 | addq $24, $7, $24 | ||
1210 | srl $2, 32, $8 | ||
1211 | cmpult $24, $7, $3 | ||
1212 | zapnot $4, 15, $7 | ||
1213 | mulq $8, $7, $0 | ||
1214 | srl $28, 32, $1 | ||
1215 | addq $6, $1, $6 | ||
1216 | cmpult $5, $25, $1 | ||
1217 | zapnot $2, 15, $5 | ||
1218 | addq $1, $6, $6 | ||
1219 | addq $3, $6, $6 | ||
1220 | addq $23, $6, $23 | ||
1221 | cmpult $23, $6, $1 | ||
1222 | srl $4, 32, $6 | ||
1223 | mulq $5, $6, $25 | ||
1224 | mulq $7, $5, $5 | ||
1225 | addq $1, $22, $22 | ||
1226 | addq $0, $25, $0 | ||
1227 | cmpult $0, $25, $1 | ||
1228 | mulq $6, $8, $6 | ||
1229 | beq $1, $245 | ||
1230 | sll $20, 32, $1 | ||
1231 | addq $6, $1, $6 | ||
1232 | $245: | ||
1233 | sll $0, 32, $25 | ||
1234 | ldq $2, 8($18) | ||
1235 | addq $5, $25, $5 | ||
1236 | bis $5, $5, $7 | ||
1237 | ldq $4, 32($17) | ||
1238 | addq $24, $7, $24 | ||
1239 | srl $2, 32, $8 | ||
1240 | cmpult $24, $7, $3 | ||
1241 | zapnot $4, 15, $7 | ||
1242 | mulq $8, $7, $28 | ||
1243 | srl $0, 32, $1 | ||
1244 | addq $6, $1, $6 | ||
1245 | cmpult $5, $25, $1 | ||
1246 | zapnot $2, 15, $5 | ||
1247 | addq $1, $6, $6 | ||
1248 | addq $3, $6, $6 | ||
1249 | addq $23, $6, $23 | ||
1250 | cmpult $23, $6, $1 | ||
1251 | srl $4, 32, $6 | ||
1252 | mulq $5, $6, $25 | ||
1253 | mulq $7, $5, $5 | ||
1254 | addq $1, $22, $22 | ||
1255 | addq $28, $25, $28 | ||
1256 | cmpult $28, $25, $1 | ||
1257 | mulq $6, $8, $6 | ||
1258 | beq $1, $249 | ||
1259 | sll $20, 32, $1 | ||
1260 | addq $6, $1, $6 | ||
1261 | $249: | ||
1262 | sll $28, 32, $25 | ||
1263 | ldq $2, 0($18) | ||
1264 | addq $5, $25, $5 | ||
1265 | bis $5, $5, $7 | ||
1266 | ldq $4, 40($17) | ||
1267 | addq $24, $7, $24 | ||
1268 | srl $2, 32, $8 | ||
1269 | cmpult $24, $7, $3 | ||
1270 | zapnot $4, 15, $7 | ||
1271 | mulq $8, $7, $0 | ||
1272 | srl $28, 32, $1 | ||
1273 | addq $6, $1, $6 | ||
1274 | cmpult $5, $25, $1 | ||
1275 | zapnot $2, 15, $5 | ||
1276 | addq $1, $6, $6 | ||
1277 | addq $3, $6, $6 | ||
1278 | addq $23, $6, $23 | ||
1279 | cmpult $23, $6, $1 | ||
1280 | srl $4, 32, $6 | ||
1281 | mulq $5, $6, $25 | ||
1282 | mulq $7, $5, $2 | ||
1283 | addq $1, $22, $22 | ||
1284 | addq $0, $25, $0 | ||
1285 | cmpult $0, $25, $1 | ||
1286 | mulq $6, $8, $6 | ||
1287 | beq $1, $253 | ||
1288 | sll $20, 32, $1 | ||
1289 | addq $6, $1, $6 | ||
1290 | $253: | ||
1291 | sll $0, 32, $25 | ||
1292 | addq $2, $25, $2 | ||
1293 | bis $2, $2, $7 | ||
1294 | addq $24, $7, $24 | ||
1295 | stq $24, 40($16) | ||
1296 | ldq $4, 48($17) | ||
1297 | ldq $5, 0($18) | ||
1298 | cmpult $24, $7, $3 | ||
1299 | zapnot $4, 15, $7 | ||
1300 | srl $5, 32, $8 | ||
1301 | mulq $8, $7, $28 | ||
1302 | srl $0, 32, $1 | ||
1303 | cmpult $2, $25, $2 | ||
1304 | addq $6, $1, $6 | ||
1305 | addq $2, $6, $6 | ||
1306 | addq $3, $6, $6 | ||
1307 | addq $23, $6, $23 | ||
1308 | cmpult $23, $6, $1 | ||
1309 | srl $4, 32, $6 | ||
1310 | zapnot $5, 15, $5 | ||
1311 | mulq $5, $6, $24 | ||
1312 | mulq $7, $5, $2 | ||
1313 | addq $1, $22, $22 | ||
1314 | addq $28, $24, $28 | ||
1315 | cmpult $28, $24, $1 | ||
1316 | mulq $6, $8, $6 | ||
1317 | beq $1, $257 | ||
1318 | sll $20, 32, $1 | ||
1319 | addq $6, $1, $6 | ||
1320 | $257: | ||
1321 | sll $28, 32, $24 | ||
1322 | ldq $1, 8($18) | ||
1323 | addq $2, $24, $2 | ||
1324 | bis $2, $2, $7 | ||
1325 | ldq $4, 40($17) | ||
1326 | addq $23, $7, $23 | ||
1327 | srl $1, 32, $8 | ||
1328 | cmpult $23, $7, $3 | ||
1329 | zapnot $4, 15, $7 | ||
1330 | mulq $8, $7, $25 | ||
1331 | zapnot $1, 15, $5 | ||
1332 | mulq $7, $5, $0 | ||
1333 | srl $28, 32, $1 | ||
1334 | cmpult $2, $24, $2 | ||
1335 | addq $6, $1, $6 | ||
1336 | addq $2, $6, $6 | ||
1337 | addq $3, $6, $6 | ||
1338 | addq $22, $6, $22 | ||
1339 | cmpult $22, $6, $24 | ||
1340 | srl $4, 32, $6 | ||
1341 | mulq $5, $6, $5 | ||
1342 | bis $31, 1, $21 | ||
1343 | addq $25, $5, $25 | ||
1344 | cmpult $25, $5, $1 | ||
1345 | mulq $6, $8, $6 | ||
1346 | beq $1, $261 | ||
1347 | sll $21, 32, $1 | ||
1348 | addq $6, $1, $6 | ||
1349 | $261: | ||
1350 | sll $25, 32, $5 | ||
1351 | ldq $2, 16($18) | ||
1352 | addq $0, $5, $0 | ||
1353 | bis $0, $0, $7 | ||
1354 | ldq $4, 32($17) | ||
1355 | addq $23, $7, $23 | ||
1356 | srl $2, 32, $8 | ||
1357 | cmpult $23, $7, $3 | ||
1358 | zapnot $4, 15, $7 | ||
1359 | mulq $8, $7, $28 | ||
1360 | srl $25, 32, $1 | ||
1361 | addq $6, $1, $6 | ||
1362 | cmpult $0, $5, $1 | ||
1363 | zapnot $2, 15, $5 | ||
1364 | addq $1, $6, $6 | ||
1365 | addq $3, $6, $6 | ||
1366 | addq $22, $6, $22 | ||
1367 | cmpult $22, $6, $1 | ||
1368 | srl $4, 32, $6 | ||
1369 | mulq $5, $6, $25 | ||
1370 | mulq $7, $5, $5 | ||
1371 | addq $1, $24, $24 | ||
1372 | addq $28, $25, $28 | ||
1373 | cmpult $28, $25, $1 | ||
1374 | mulq $6, $8, $6 | ||
1375 | beq $1, $265 | ||
1376 | sll $21, 32, $1 | ||
1377 | addq $6, $1, $6 | ||
1378 | $265: | ||
1379 | sll $28, 32, $25 | ||
1380 | ldq $2, 24($18) | ||
1381 | addq $5, $25, $5 | ||
1382 | bis $5, $5, $7 | ||
1383 | ldq $4, 24($17) | ||
1384 | addq $23, $7, $23 | ||
1385 | srl $2, 32, $8 | ||
1386 | cmpult $23, $7, $3 | ||
1387 | zapnot $4, 15, $7 | ||
1388 | mulq $8, $7, $0 | ||
1389 | srl $28, 32, $1 | ||
1390 | addq $6, $1, $6 | ||
1391 | cmpult $5, $25, $1 | ||
1392 | zapnot $2, 15, $5 | ||
1393 | addq $1, $6, $6 | ||
1394 | addq $3, $6, $6 | ||
1395 | addq $22, $6, $22 | ||
1396 | cmpult $22, $6, $1 | ||
1397 | srl $4, 32, $6 | ||
1398 | mulq $5, $6, $25 | ||
1399 | mulq $7, $5, $5 | ||
1400 | addq $1, $24, $24 | ||
1401 | addq $0, $25, $0 | ||
1402 | cmpult $0, $25, $1 | ||
1403 | mulq $6, $8, $6 | ||
1404 | beq $1, $269 | ||
1405 | sll $21, 32, $1 | ||
1406 | addq $6, $1, $6 | ||
1407 | $269: | ||
1408 | sll $0, 32, $25 | ||
1409 | ldq $2, 32($18) | ||
1410 | addq $5, $25, $5 | ||
1411 | bis $5, $5, $7 | ||
1412 | ldq $4, 16($17) | ||
1413 | addq $23, $7, $23 | ||
1414 | srl $2, 32, $8 | ||
1415 | cmpult $23, $7, $3 | ||
1416 | zapnot $4, 15, $7 | ||
1417 | mulq $8, $7, $28 | ||
1418 | srl $0, 32, $1 | ||
1419 | addq $6, $1, $6 | ||
1420 | cmpult $5, $25, $1 | ||
1421 | zapnot $2, 15, $5 | ||
1422 | addq $1, $6, $6 | ||
1423 | addq $3, $6, $6 | ||
1424 | addq $22, $6, $22 | ||
1425 | cmpult $22, $6, $1 | ||
1426 | srl $4, 32, $6 | ||
1427 | mulq $5, $6, $25 | ||
1428 | mulq $7, $5, $5 | ||
1429 | addq $1, $24, $24 | ||
1430 | addq $28, $25, $28 | ||
1431 | cmpult $28, $25, $1 | ||
1432 | mulq $6, $8, $6 | ||
1433 | beq $1, $273 | ||
1434 | sll $21, 32, $1 | ||
1435 | addq $6, $1, $6 | ||
1436 | $273: | ||
1437 | sll $28, 32, $25 | ||
1438 | ldq $2, 40($18) | ||
1439 | addq $5, $25, $5 | ||
1440 | bis $5, $5, $7 | ||
1441 | ldq $4, 8($17) | ||
1442 | addq $23, $7, $23 | ||
1443 | srl $2, 32, $8 | ||
1444 | cmpult $23, $7, $3 | ||
1445 | zapnot $4, 15, $7 | ||
1446 | mulq $8, $7, $0 | ||
1447 | srl $28, 32, $1 | ||
1448 | addq $6, $1, $6 | ||
1449 | cmpult $5, $25, $1 | ||
1450 | zapnot $2, 15, $5 | ||
1451 | addq $1, $6, $6 | ||
1452 | addq $3, $6, $6 | ||
1453 | addq $22, $6, $22 | ||
1454 | cmpult $22, $6, $1 | ||
1455 | srl $4, 32, $6 | ||
1456 | mulq $5, $6, $25 | ||
1457 | mulq $7, $5, $5 | ||
1458 | addq $1, $24, $24 | ||
1459 | addq $0, $25, $0 | ||
1460 | cmpult $0, $25, $1 | ||
1461 | mulq $6, $8, $6 | ||
1462 | beq $1, $277 | ||
1463 | sll $21, 32, $1 | ||
1464 | addq $6, $1, $6 | ||
1465 | $277: | ||
1466 | sll $0, 32, $25 | ||
1467 | ldq $2, 48($18) | ||
1468 | addq $5, $25, $5 | ||
1469 | bis $5, $5, $7 | ||
1470 | ldq $4, 0($17) | ||
1471 | addq $23, $7, $23 | ||
1472 | srl $2, 32, $8 | ||
1473 | cmpult $23, $7, $3 | ||
1474 | zapnot $4, 15, $7 | ||
1475 | mulq $8, $7, $28 | ||
1476 | srl $0, 32, $1 | ||
1477 | addq $6, $1, $6 | ||
1478 | cmpult $5, $25, $1 | ||
1479 | zapnot $2, 15, $5 | ||
1480 | addq $1, $6, $6 | ||
1481 | addq $3, $6, $6 | ||
1482 | addq $22, $6, $22 | ||
1483 | cmpult $22, $6, $1 | ||
1484 | srl $4, 32, $6 | ||
1485 | mulq $5, $6, $25 | ||
1486 | mulq $7, $5, $2 | ||
1487 | addq $1, $24, $24 | ||
1488 | addq $28, $25, $28 | ||
1489 | cmpult $28, $25, $1 | ||
1490 | mulq $6, $8, $6 | ||
1491 | beq $1, $281 | ||
1492 | sll $21, 32, $1 | ||
1493 | addq $6, $1, $6 | ||
1494 | $281: | ||
1495 | sll $28, 32, $25 | ||
1496 | addq $2, $25, $2 | ||
1497 | bis $2, $2, $7 | ||
1498 | addq $23, $7, $23 | ||
1499 | stq $23, 48($16) | ||
1500 | ldq $4, 0($17) | ||
1501 | ldq $5, 56($18) | ||
1502 | cmpult $23, $7, $3 | ||
1503 | zapnot $4, 15, $7 | ||
1504 | srl $5, 32, $8 | ||
1505 | mulq $8, $7, $0 | ||
1506 | srl $28, 32, $1 | ||
1507 | cmpult $2, $25, $2 | ||
1508 | addq $6, $1, $6 | ||
1509 | addq $2, $6, $6 | ||
1510 | addq $3, $6, $6 | ||
1511 | addq $22, $6, $22 | ||
1512 | cmpult $22, $6, $1 | ||
1513 | srl $4, 32, $6 | ||
1514 | zapnot $5, 15, $5 | ||
1515 | mulq $5, $6, $23 | ||
1516 | mulq $7, $5, $2 | ||
1517 | addq $1, $24, $24 | ||
1518 | addq $0, $23, $0 | ||
1519 | cmpult $0, $23, $1 | ||
1520 | mulq $6, $8, $6 | ||
1521 | beq $1, $285 | ||
1522 | sll $21, 32, $1 | ||
1523 | addq $6, $1, $6 | ||
1524 | $285: | ||
1525 | sll $0, 32, $23 | ||
1526 | ldq $1, 48($18) | ||
1527 | addq $2, $23, $2 | ||
1528 | bis $2, $2, $7 | ||
1529 | ldq $4, 8($17) | ||
1530 | addq $22, $7, $22 | ||
1531 | srl $1, 32, $8 | ||
1532 | cmpult $22, $7, $3 | ||
1533 | zapnot $4, 15, $7 | ||
1534 | mulq $8, $7, $25 | ||
1535 | zapnot $1, 15, $5 | ||
1536 | mulq $7, $5, $21 | ||
1537 | srl $0, 32, $1 | ||
1538 | cmpult $2, $23, $2 | ||
1539 | addq $6, $1, $6 | ||
1540 | addq $2, $6, $6 | ||
1541 | addq $3, $6, $6 | ||
1542 | addq $24, $6, $24 | ||
1543 | cmpult $24, $6, $23 | ||
1544 | srl $4, 32, $6 | ||
1545 | mulq $5, $6, $5 | ||
1546 | bis $31, 1, $20 | ||
1547 | addq $25, $5, $25 | ||
1548 | cmpult $25, $5, $1 | ||
1549 | mulq $6, $8, $6 | ||
1550 | beq $1, $289 | ||
1551 | sll $20, 32, $1 | ||
1552 | addq $6, $1, $6 | ||
1553 | $289: | ||
1554 | sll $25, 32, $5 | ||
1555 | ldq $2, 40($18) | ||
1556 | addq $21, $5, $21 | ||
1557 | bis $21, $21, $7 | ||
1558 | ldq $4, 16($17) | ||
1559 | addq $22, $7, $22 | ||
1560 | srl $2, 32, $8 | ||
1561 | cmpult $22, $7, $3 | ||
1562 | zapnot $4, 15, $7 | ||
1563 | mulq $8, $7, $28 | ||
1564 | srl $25, 32, $1 | ||
1565 | addq $6, $1, $6 | ||
1566 | cmpult $21, $5, $1 | ||
1567 | zapnot $2, 15, $5 | ||
1568 | addq $1, $6, $6 | ||
1569 | addq $3, $6, $6 | ||
1570 | addq $24, $6, $24 | ||
1571 | cmpult $24, $6, $1 | ||
1572 | srl $4, 32, $6 | ||
1573 | mulq $5, $6, $25 | ||
1574 | mulq $7, $5, $5 | ||
1575 | addq $1, $23, $23 | ||
1576 | addq $28, $25, $28 | ||
1577 | cmpult $28, $25, $1 | ||
1578 | mulq $6, $8, $6 | ||
1579 | beq $1, $293 | ||
1580 | sll $20, 32, $1 | ||
1581 | addq $6, $1, $6 | ||
1582 | $293: | ||
1583 | sll $28, 32, $25 | ||
1584 | ldq $2, 32($18) | ||
1585 | addq $5, $25, $5 | ||
1586 | bis $5, $5, $7 | ||
1587 | ldq $4, 24($17) | ||
1588 | addq $22, $7, $22 | ||
1589 | srl $2, 32, $8 | ||
1590 | cmpult $22, $7, $3 | ||
1591 | zapnot $4, 15, $7 | ||
1592 | mulq $8, $7, $0 | ||
1593 | srl $28, 32, $1 | ||
1594 | addq $6, $1, $6 | ||
1595 | cmpult $5, $25, $1 | ||
1596 | zapnot $2, 15, $5 | ||
1597 | addq $1, $6, $6 | ||
1598 | addq $3, $6, $6 | ||
1599 | addq $24, $6, $24 | ||
1600 | cmpult $24, $6, $1 | ||
1601 | srl $4, 32, $6 | ||
1602 | mulq $5, $6, $25 | ||
1603 | mulq $7, $5, $5 | ||
1604 | addq $1, $23, $23 | ||
1605 | addq $0, $25, $0 | ||
1606 | cmpult $0, $25, $1 | ||
1607 | mulq $6, $8, $6 | ||
1608 | beq $1, $297 | ||
1609 | sll $20, 32, $1 | ||
1610 | addq $6, $1, $6 | ||
1611 | $297: | ||
1612 | sll $0, 32, $25 | ||
1613 | ldq $2, 24($18) | ||
1614 | addq $5, $25, $5 | ||
1615 | bis $5, $5, $7 | ||
1616 | ldq $4, 32($17) | ||
1617 | addq $22, $7, $22 | ||
1618 | srl $2, 32, $8 | ||
1619 | cmpult $22, $7, $3 | ||
1620 | zapnot $4, 15, $7 | ||
1621 | mulq $8, $7, $28 | ||
1622 | srl $0, 32, $1 | ||
1623 | addq $6, $1, $6 | ||
1624 | cmpult $5, $25, $1 | ||
1625 | zapnot $2, 15, $5 | ||
1626 | addq $1, $6, $6 | ||
1627 | addq $3, $6, $6 | ||
1628 | addq $24, $6, $24 | ||
1629 | cmpult $24, $6, $1 | ||
1630 | srl $4, 32, $6 | ||
1631 | mulq $5, $6, $25 | ||
1632 | mulq $7, $5, $5 | ||
1633 | addq $1, $23, $23 | ||
1634 | addq $28, $25, $28 | ||
1635 | cmpult $28, $25, $1 | ||
1636 | mulq $6, $8, $6 | ||
1637 | beq $1, $301 | ||
1638 | sll $20, 32, $1 | ||
1639 | addq $6, $1, $6 | ||
1640 | $301: | ||
1641 | sll $28, 32, $25 | ||
1642 | ldq $2, 16($18) | ||
1643 | addq $5, $25, $5 | ||
1644 | bis $5, $5, $7 | ||
1645 | ldq $4, 40($17) | ||
1646 | addq $22, $7, $22 | ||
1647 | srl $2, 32, $8 | ||
1648 | cmpult $22, $7, $3 | ||
1649 | zapnot $4, 15, $7 | ||
1650 | mulq $8, $7, $0 | ||
1651 | srl $28, 32, $1 | ||
1652 | addq $6, $1, $6 | ||
1653 | cmpult $5, $25, $1 | ||
1654 | zapnot $2, 15, $5 | ||
1655 | addq $1, $6, $6 | ||
1656 | addq $3, $6, $6 | ||
1657 | addq $24, $6, $24 | ||
1658 | cmpult $24, $6, $1 | ||
1659 | srl $4, 32, $6 | ||
1660 | mulq $5, $6, $25 | ||
1661 | mulq $7, $5, $5 | ||
1662 | addq $1, $23, $23 | ||
1663 | addq $0, $25, $0 | ||
1664 | cmpult $0, $25, $1 | ||
1665 | mulq $6, $8, $6 | ||
1666 | beq $1, $305 | ||
1667 | sll $20, 32, $1 | ||
1668 | addq $6, $1, $6 | ||
1669 | $305: | ||
1670 | sll $0, 32, $25 | ||
1671 | ldq $2, 8($18) | ||
1672 | addq $5, $25, $5 | ||
1673 | bis $5, $5, $7 | ||
1674 | ldq $4, 48($17) | ||
1675 | addq $22, $7, $22 | ||
1676 | srl $2, 32, $8 | ||
1677 | cmpult $22, $7, $3 | ||
1678 | zapnot $4, 15, $7 | ||
1679 | mulq $8, $7, $28 | ||
1680 | srl $0, 32, $1 | ||
1681 | addq $6, $1, $6 | ||
1682 | cmpult $5, $25, $1 | ||
1683 | zapnot $2, 15, $5 | ||
1684 | addq $1, $6, $6 | ||
1685 | addq $3, $6, $6 | ||
1686 | addq $24, $6, $24 | ||
1687 | cmpult $24, $6, $1 | ||
1688 | srl $4, 32, $6 | ||
1689 | mulq $5, $6, $25 | ||
1690 | mulq $7, $5, $5 | ||
1691 | addq $1, $23, $23 | ||
1692 | addq $28, $25, $28 | ||
1693 | cmpult $28, $25, $1 | ||
1694 | mulq $6, $8, $6 | ||
1695 | beq $1, $309 | ||
1696 | sll $20, 32, $1 | ||
1697 | addq $6, $1, $6 | ||
1698 | $309: | ||
1699 | sll $28, 32, $25 | ||
1700 | ldq $2, 0($18) | ||
1701 | addq $5, $25, $5 | ||
1702 | bis $5, $5, $7 | ||
1703 | ldq $4, 56($17) | ||
1704 | addq $22, $7, $22 | ||
1705 | srl $2, 32, $8 | ||
1706 | cmpult $22, $7, $3 | ||
1707 | zapnot $4, 15, $7 | ||
1708 | mulq $8, $7, $0 | ||
1709 | srl $28, 32, $1 | ||
1710 | addq $6, $1, $6 | ||
1711 | cmpult $5, $25, $1 | ||
1712 | zapnot $2, 15, $5 | ||
1713 | addq $1, $6, $6 | ||
1714 | addq $3, $6, $6 | ||
1715 | addq $24, $6, $24 | ||
1716 | cmpult $24, $6, $1 | ||
1717 | srl $4, 32, $6 | ||
1718 | mulq $5, $6, $25 | ||
1719 | mulq $7, $5, $2 | ||
1720 | addq $1, $23, $23 | ||
1721 | addq $0, $25, $0 | ||
1722 | cmpult $0, $25, $1 | ||
1723 | mulq $6, $8, $6 | ||
1724 | beq $1, $313 | ||
1725 | sll $20, 32, $1 | ||
1726 | addq $6, $1, $6 | ||
1727 | $313: | ||
1728 | sll $0, 32, $25 | ||
1729 | addq $2, $25, $2 | ||
1730 | bis $2, $2, $7 | ||
1731 | addq $22, $7, $22 | ||
1732 | stq $22, 56($16) | ||
1733 | ldq $4, 56($17) | ||
1734 | ldq $5, 8($18) | ||
1735 | cmpult $22, $7, $3 | ||
1736 | zapnot $4, 15, $7 | ||
1737 | srl $5, 32, $8 | ||
1738 | mulq $8, $7, $28 | ||
1739 | srl $0, 32, $1 | ||
1740 | cmpult $2, $25, $2 | ||
1741 | addq $6, $1, $6 | ||
1742 | addq $2, $6, $6 | ||
1743 | addq $3, $6, $6 | ||
1744 | addq $24, $6, $24 | ||
1745 | cmpult $24, $6, $1 | ||
1746 | srl $4, 32, $6 | ||
1747 | zapnot $5, 15, $5 | ||
1748 | mulq $5, $6, $22 | ||
1749 | mulq $7, $5, $2 | ||
1750 | addq $1, $23, $23 | ||
1751 | addq $28, $22, $28 | ||
1752 | cmpult $28, $22, $1 | ||
1753 | mulq $6, $8, $6 | ||
1754 | beq $1, $317 | ||
1755 | sll $20, 32, $1 | ||
1756 | addq $6, $1, $6 | ||
1757 | $317: | ||
1758 | sll $28, 32, $22 | ||
1759 | ldq $1, 16($18) | ||
1760 | addq $2, $22, $2 | ||
1761 | bis $2, $2, $7 | ||
1762 | ldq $4, 48($17) | ||
1763 | addq $24, $7, $24 | ||
1764 | srl $1, 32, $8 | ||
1765 | cmpult $24, $7, $3 | ||
1766 | zapnot $4, 15, $7 | ||
1767 | mulq $8, $7, $25 | ||
1768 | zapnot $1, 15, $5 | ||
1769 | mulq $7, $5, $0 | ||
1770 | srl $28, 32, $1 | ||
1771 | cmpult $2, $22, $2 | ||
1772 | addq $6, $1, $6 | ||
1773 | addq $2, $6, $6 | ||
1774 | addq $3, $6, $6 | ||
1775 | addq $23, $6, $23 | ||
1776 | cmpult $23, $6, $22 | ||
1777 | srl $4, 32, $6 | ||
1778 | mulq $5, $6, $5 | ||
1779 | bis $31, 1, $21 | ||
1780 | addq $25, $5, $25 | ||
1781 | cmpult $25, $5, $1 | ||
1782 | mulq $6, $8, $6 | ||
1783 | beq $1, $321 | ||
1784 | sll $21, 32, $1 | ||
1785 | addq $6, $1, $6 | ||
1786 | $321: | ||
1787 | sll $25, 32, $5 | ||
1788 | ldq $2, 24($18) | ||
1789 | addq $0, $5, $0 | ||
1790 | bis $0, $0, $7 | ||
1791 | ldq $4, 40($17) | ||
1792 | addq $24, $7, $24 | ||
1793 | srl $2, 32, $8 | ||
1794 | cmpult $24, $7, $3 | ||
1795 | zapnot $4, 15, $7 | ||
1796 | mulq $8, $7, $28 | ||
1797 | srl $25, 32, $1 | ||
1798 | addq $6, $1, $6 | ||
1799 | cmpult $0, $5, $1 | ||
1800 | zapnot $2, 15, $5 | ||
1801 | addq $1, $6, $6 | ||
1802 | addq $3, $6, $6 | ||
1803 | addq $23, $6, $23 | ||
1804 | cmpult $23, $6, $1 | ||
1805 | srl $4, 32, $6 | ||
1806 | mulq $5, $6, $25 | ||
1807 | mulq $7, $5, $5 | ||
1808 | addq $1, $22, $22 | ||
1809 | addq $28, $25, $28 | ||
1810 | cmpult $28, $25, $1 | ||
1811 | mulq $6, $8, $6 | ||
1812 | beq $1, $325 | ||
1813 | sll $21, 32, $1 | ||
1814 | addq $6, $1, $6 | ||
1815 | $325: | ||
1816 | sll $28, 32, $25 | ||
1817 | ldq $2, 32($18) | ||
1818 | addq $5, $25, $5 | ||
1819 | bis $5, $5, $7 | ||
1820 | ldq $4, 32($17) | ||
1821 | addq $24, $7, $24 | ||
1822 | srl $2, 32, $8 | ||
1823 | cmpult $24, $7, $3 | ||
1824 | zapnot $4, 15, $7 | ||
1825 | mulq $8, $7, $0 | ||
1826 | srl $28, 32, $1 | ||
1827 | addq $6, $1, $6 | ||
1828 | cmpult $5, $25, $1 | ||
1829 | zapnot $2, 15, $5 | ||
1830 | addq $1, $6, $6 | ||
1831 | addq $3, $6, $6 | ||
1832 | addq $23, $6, $23 | ||
1833 | cmpult $23, $6, $1 | ||
1834 | srl $4, 32, $6 | ||
1835 | mulq $5, $6, $25 | ||
1836 | mulq $7, $5, $5 | ||
1837 | addq $1, $22, $22 | ||
1838 | addq $0, $25, $0 | ||
1839 | cmpult $0, $25, $1 | ||
1840 | mulq $6, $8, $6 | ||
1841 | beq $1, $329 | ||
1842 | sll $21, 32, $1 | ||
1843 | addq $6, $1, $6 | ||
1844 | $329: | ||
1845 | sll $0, 32, $25 | ||
1846 | ldq $2, 40($18) | ||
1847 | addq $5, $25, $5 | ||
1848 | bis $5, $5, $7 | ||
1849 | ldq $4, 24($17) | ||
1850 | addq $24, $7, $24 | ||
1851 | srl $2, 32, $8 | ||
1852 | cmpult $24, $7, $3 | ||
1853 | zapnot $4, 15, $7 | ||
1854 | mulq $8, $7, $28 | ||
1855 | srl $0, 32, $1 | ||
1856 | addq $6, $1, $6 | ||
1857 | cmpult $5, $25, $1 | ||
1858 | zapnot $2, 15, $5 | ||
1859 | addq $1, $6, $6 | ||
1860 | addq $3, $6, $6 | ||
1861 | addq $23, $6, $23 | ||
1862 | cmpult $23, $6, $1 | ||
1863 | srl $4, 32, $6 | ||
1864 | mulq $5, $6, $25 | ||
1865 | mulq $7, $5, $5 | ||
1866 | addq $1, $22, $22 | ||
1867 | addq $28, $25, $28 | ||
1868 | cmpult $28, $25, $1 | ||
1869 | mulq $6, $8, $6 | ||
1870 | beq $1, $333 | ||
1871 | sll $21, 32, $1 | ||
1872 | addq $6, $1, $6 | ||
1873 | $333: | ||
1874 | sll $28, 32, $25 | ||
1875 | ldq $2, 48($18) | ||
1876 | addq $5, $25, $5 | ||
1877 | bis $5, $5, $7 | ||
1878 | ldq $4, 16($17) | ||
1879 | addq $24, $7, $24 | ||
1880 | srl $2, 32, $8 | ||
1881 | cmpult $24, $7, $3 | ||
1882 | zapnot $4, 15, $7 | ||
1883 | mulq $8, $7, $0 | ||
1884 | srl $28, 32, $1 | ||
1885 | addq $6, $1, $6 | ||
1886 | cmpult $5, $25, $1 | ||
1887 | zapnot $2, 15, $5 | ||
1888 | addq $1, $6, $6 | ||
1889 | addq $3, $6, $6 | ||
1890 | addq $23, $6, $23 | ||
1891 | cmpult $23, $6, $1 | ||
1892 | srl $4, 32, $6 | ||
1893 | mulq $5, $6, $25 | ||
1894 | mulq $7, $5, $5 | ||
1895 | addq $1, $22, $22 | ||
1896 | addq $0, $25, $0 | ||
1897 | cmpult $0, $25, $1 | ||
1898 | mulq $6, $8, $6 | ||
1899 | beq $1, $337 | ||
1900 | sll $21, 32, $1 | ||
1901 | addq $6, $1, $6 | ||
1902 | $337: | ||
1903 | sll $0, 32, $25 | ||
1904 | ldq $2, 56($18) | ||
1905 | addq $5, $25, $5 | ||
1906 | bis $5, $5, $7 | ||
1907 | ldq $4, 8($17) | ||
1908 | addq $24, $7, $24 | ||
1909 | srl $2, 32, $8 | ||
1910 | cmpult $24, $7, $3 | ||
1911 | zapnot $4, 15, $7 | ||
1912 | mulq $8, $7, $28 | ||
1913 | srl $0, 32, $1 | ||
1914 | addq $6, $1, $6 | ||
1915 | cmpult $5, $25, $1 | ||
1916 | zapnot $2, 15, $5 | ||
1917 | addq $1, $6, $6 | ||
1918 | addq $3, $6, $6 | ||
1919 | addq $23, $6, $23 | ||
1920 | cmpult $23, $6, $1 | ||
1921 | srl $4, 32, $6 | ||
1922 | mulq $5, $6, $25 | ||
1923 | mulq $7, $5, $2 | ||
1924 | addq $1, $22, $22 | ||
1925 | addq $28, $25, $28 | ||
1926 | cmpult $28, $25, $1 | ||
1927 | mulq $6, $8, $6 | ||
1928 | beq $1, $341 | ||
1929 | sll $21, 32, $1 | ||
1930 | addq $6, $1, $6 | ||
1931 | $341: | ||
1932 | sll $28, 32, $25 | ||
1933 | addq $2, $25, $2 | ||
1934 | bis $2, $2, $7 | ||
1935 | addq $24, $7, $24 | ||
1936 | stq $24, 64($16) | ||
1937 | ldq $4, 16($17) | ||
1938 | ldq $5, 56($18) | ||
1939 | cmpult $24, $7, $3 | ||
1940 | zapnot $4, 15, $7 | ||
1941 | srl $5, 32, $8 | ||
1942 | mulq $8, $7, $0 | ||
1943 | srl $28, 32, $1 | ||
1944 | cmpult $2, $25, $2 | ||
1945 | addq $6, $1, $6 | ||
1946 | addq $2, $6, $6 | ||
1947 | addq $3, $6, $6 | ||
1948 | addq $23, $6, $23 | ||
1949 | cmpult $23, $6, $1 | ||
1950 | srl $4, 32, $6 | ||
1951 | zapnot $5, 15, $5 | ||
1952 | mulq $5, $6, $24 | ||
1953 | mulq $7, $5, $2 | ||
1954 | addq $1, $22, $22 | ||
1955 | addq $0, $24, $0 | ||
1956 | cmpult $0, $24, $1 | ||
1957 | mulq $6, $8, $6 | ||
1958 | beq $1, $345 | ||
1959 | sll $21, 32, $1 | ||
1960 | addq $6, $1, $6 | ||
1961 | $345: | ||
1962 | sll $0, 32, $24 | ||
1963 | ldq $1, 48($18) | ||
1964 | addq $2, $24, $2 | ||
1965 | bis $2, $2, $7 | ||
1966 | ldq $4, 24($17) | ||
1967 | addq $23, $7, $23 | ||
1968 | srl $1, 32, $8 | ||
1969 | cmpult $23, $7, $3 | ||
1970 | zapnot $4, 15, $7 | ||
1971 | mulq $8, $7, $25 | ||
1972 | zapnot $1, 15, $5 | ||
1973 | mulq $7, $5, $21 | ||
1974 | srl $0, 32, $1 | ||
1975 | cmpult $2, $24, $2 | ||
1976 | addq $6, $1, $6 | ||
1977 | addq $2, $6, $6 | ||
1978 | addq $3, $6, $6 | ||
1979 | addq $22, $6, $22 | ||
1980 | cmpult $22, $6, $24 | ||
1981 | srl $4, 32, $6 | ||
1982 | mulq $5, $6, $5 | ||
1983 | bis $31, 1, $20 | ||
1984 | addq $25, $5, $25 | ||
1985 | cmpult $25, $5, $1 | ||
1986 | mulq $6, $8, $6 | ||
1987 | beq $1, $349 | ||
1988 | sll $20, 32, $1 | ||
1989 | addq $6, $1, $6 | ||
1990 | $349: | ||
1991 | sll $25, 32, $5 | ||
1992 | ldq $2, 40($18) | ||
1993 | addq $21, $5, $21 | ||
1994 | bis $21, $21, $7 | ||
1995 | ldq $4, 32($17) | ||
1996 | addq $23, $7, $23 | ||
1997 | srl $2, 32, $8 | ||
1998 | cmpult $23, $7, $3 | ||
1999 | zapnot $4, 15, $7 | ||
2000 | mulq $8, $7, $28 | ||
2001 | srl $25, 32, $1 | ||
2002 | addq $6, $1, $6 | ||
2003 | cmpult $21, $5, $1 | ||
2004 | zapnot $2, 15, $5 | ||
2005 | addq $1, $6, $6 | ||
2006 | addq $3, $6, $6 | ||
2007 | addq $22, $6, $22 | ||
2008 | cmpult $22, $6, $1 | ||
2009 | srl $4, 32, $6 | ||
2010 | mulq $5, $6, $25 | ||
2011 | mulq $7, $5, $5 | ||
2012 | addq $1, $24, $24 | ||
2013 | addq $28, $25, $28 | ||
2014 | cmpult $28, $25, $1 | ||
2015 | mulq $6, $8, $6 | ||
2016 | beq $1, $353 | ||
2017 | sll $20, 32, $1 | ||
2018 | addq $6, $1, $6 | ||
2019 | $353: | ||
2020 | sll $28, 32, $25 | ||
2021 | ldq $2, 32($18) | ||
2022 | addq $5, $25, $5 | ||
2023 | bis $5, $5, $7 | ||
2024 | ldq $4, 40($17) | ||
2025 | addq $23, $7, $23 | ||
2026 | srl $2, 32, $8 | ||
2027 | cmpult $23, $7, $3 | ||
2028 | zapnot $4, 15, $7 | ||
2029 | mulq $8, $7, $0 | ||
2030 | srl $28, 32, $1 | ||
2031 | addq $6, $1, $6 | ||
2032 | cmpult $5, $25, $1 | ||
2033 | zapnot $2, 15, $5 | ||
2034 | addq $1, $6, $6 | ||
2035 | addq $3, $6, $6 | ||
2036 | addq $22, $6, $22 | ||
2037 | cmpult $22, $6, $1 | ||
2038 | srl $4, 32, $6 | ||
2039 | mulq $5, $6, $25 | ||
2040 | mulq $7, $5, $5 | ||
2041 | addq $1, $24, $24 | ||
2042 | addq $0, $25, $0 | ||
2043 | cmpult $0, $25, $1 | ||
2044 | mulq $6, $8, $6 | ||
2045 | beq $1, $357 | ||
2046 | sll $20, 32, $1 | ||
2047 | addq $6, $1, $6 | ||
2048 | $357: | ||
2049 | sll $0, 32, $25 | ||
2050 | ldq $2, 24($18) | ||
2051 | addq $5, $25, $5 | ||
2052 | bis $5, $5, $7 | ||
2053 | ldq $4, 48($17) | ||
2054 | addq $23, $7, $23 | ||
2055 | srl $2, 32, $8 | ||
2056 | cmpult $23, $7, $3 | ||
2057 | zapnot $4, 15, $7 | ||
2058 | mulq $8, $7, $28 | ||
2059 | srl $0, 32, $1 | ||
2060 | addq $6, $1, $6 | ||
2061 | cmpult $5, $25, $1 | ||
2062 | zapnot $2, 15, $5 | ||
2063 | addq $1, $6, $6 | ||
2064 | addq $3, $6, $6 | ||
2065 | addq $22, $6, $22 | ||
2066 | cmpult $22, $6, $1 | ||
2067 | srl $4, 32, $6 | ||
2068 | mulq $5, $6, $25 | ||
2069 | mulq $7, $5, $5 | ||
2070 | addq $1, $24, $24 | ||
2071 | addq $28, $25, $28 | ||
2072 | cmpult $28, $25, $1 | ||
2073 | mulq $6, $8, $6 | ||
2074 | beq $1, $361 | ||
2075 | sll $20, 32, $1 | ||
2076 | addq $6, $1, $6 | ||
2077 | $361: | ||
2078 | sll $28, 32, $25 | ||
2079 | ldq $2, 16($18) | ||
2080 | addq $5, $25, $5 | ||
2081 | bis $5, $5, $7 | ||
2082 | ldq $4, 56($17) | ||
2083 | addq $23, $7, $23 | ||
2084 | srl $2, 32, $8 | ||
2085 | cmpult $23, $7, $3 | ||
2086 | zapnot $4, 15, $7 | ||
2087 | mulq $8, $7, $0 | ||
2088 | srl $28, 32, $1 | ||
2089 | addq $6, $1, $6 | ||
2090 | cmpult $5, $25, $1 | ||
2091 | zapnot $2, 15, $5 | ||
2092 | addq $1, $6, $6 | ||
2093 | addq $3, $6, $6 | ||
2094 | addq $22, $6, $22 | ||
2095 | cmpult $22, $6, $1 | ||
2096 | srl $4, 32, $6 | ||
2097 | mulq $5, $6, $25 | ||
2098 | mulq $7, $5, $2 | ||
2099 | addq $1, $24, $24 | ||
2100 | addq $0, $25, $0 | ||
2101 | cmpult $0, $25, $1 | ||
2102 | mulq $6, $8, $6 | ||
2103 | beq $1, $365 | ||
2104 | sll $20, 32, $1 | ||
2105 | addq $6, $1, $6 | ||
2106 | $365: | ||
2107 | sll $0, 32, $25 | ||
2108 | addq $2, $25, $2 | ||
2109 | bis $2, $2, $7 | ||
2110 | addq $23, $7, $23 | ||
2111 | stq $23, 72($16) | ||
2112 | ldq $4, 56($17) | ||
2113 | ldq $5, 24($18) | ||
2114 | cmpult $23, $7, $3 | ||
2115 | zapnot $4, 15, $7 | ||
2116 | srl $5, 32, $8 | ||
2117 | mulq $8, $7, $28 | ||
2118 | srl $0, 32, $1 | ||
2119 | cmpult $2, $25, $2 | ||
2120 | addq $6, $1, $6 | ||
2121 | addq $2, $6, $6 | ||
2122 | addq $3, $6, $6 | ||
2123 | addq $22, $6, $22 | ||
2124 | cmpult $22, $6, $1 | ||
2125 | srl $4, 32, $6 | ||
2126 | zapnot $5, 15, $5 | ||
2127 | mulq $5, $6, $23 | ||
2128 | mulq $7, $5, $2 | ||
2129 | addq $1, $24, $24 | ||
2130 | addq $28, $23, $28 | ||
2131 | cmpult $28, $23, $1 | ||
2132 | mulq $6, $8, $6 | ||
2133 | beq $1, $369 | ||
2134 | sll $20, 32, $1 | ||
2135 | addq $6, $1, $6 | ||
2136 | $369: | ||
2137 | sll $28, 32, $23 | ||
2138 | ldq $1, 32($18) | ||
2139 | addq $2, $23, $2 | ||
2140 | bis $2, $2, $7 | ||
2141 | ldq $4, 48($17) | ||
2142 | addq $22, $7, $22 | ||
2143 | srl $1, 32, $8 | ||
2144 | cmpult $22, $7, $3 | ||
2145 | zapnot $4, 15, $7 | ||
2146 | mulq $8, $7, $25 | ||
2147 | zapnot $1, 15, $5 | ||
2148 | mulq $7, $5, $0 | ||
2149 | srl $28, 32, $1 | ||
2150 | cmpult $2, $23, $2 | ||
2151 | addq $6, $1, $6 | ||
2152 | addq $2, $6, $6 | ||
2153 | addq $3, $6, $6 | ||
2154 | addq $24, $6, $24 | ||
2155 | cmpult $24, $6, $23 | ||
2156 | srl $4, 32, $6 | ||
2157 | mulq $5, $6, $5 | ||
2158 | bis $31, 1, $21 | ||
2159 | addq $25, $5, $25 | ||
2160 | cmpult $25, $5, $1 | ||
2161 | mulq $6, $8, $6 | ||
2162 | beq $1, $373 | ||
2163 | sll $21, 32, $1 | ||
2164 | addq $6, $1, $6 | ||
2165 | $373: | ||
2166 | sll $25, 32, $5 | ||
2167 | ldq $2, 40($18) | ||
2168 | addq $0, $5, $0 | ||
2169 | bis $0, $0, $7 | ||
2170 | ldq $4, 40($17) | ||
2171 | addq $22, $7, $22 | ||
2172 | srl $2, 32, $8 | ||
2173 | cmpult $22, $7, $3 | ||
2174 | zapnot $4, 15, $7 | ||
2175 | mulq $8, $7, $28 | ||
2176 | srl $25, 32, $1 | ||
2177 | addq $6, $1, $6 | ||
2178 | cmpult $0, $5, $1 | ||
2179 | zapnot $2, 15, $5 | ||
2180 | addq $1, $6, $6 | ||
2181 | addq $3, $6, $6 | ||
2182 | addq $24, $6, $24 | ||
2183 | cmpult $24, $6, $1 | ||
2184 | srl $4, 32, $6 | ||
2185 | mulq $5, $6, $25 | ||
2186 | mulq $7, $5, $5 | ||
2187 | addq $1, $23, $23 | ||
2188 | addq $28, $25, $28 | ||
2189 | cmpult $28, $25, $1 | ||
2190 | mulq $6, $8, $6 | ||
2191 | beq $1, $377 | ||
2192 | sll $21, 32, $1 | ||
2193 | addq $6, $1, $6 | ||
2194 | $377: | ||
2195 | sll $28, 32, $25 | ||
2196 | ldq $2, 48($18) | ||
2197 | addq $5, $25, $5 | ||
2198 | bis $5, $5, $7 | ||
2199 | ldq $4, 32($17) | ||
2200 | addq $22, $7, $22 | ||
2201 | srl $2, 32, $8 | ||
2202 | cmpult $22, $7, $3 | ||
2203 | zapnot $4, 15, $7 | ||
2204 | mulq $8, $7, $0 | ||
2205 | srl $28, 32, $1 | ||
2206 | addq $6, $1, $6 | ||
2207 | cmpult $5, $25, $1 | ||
2208 | zapnot $2, 15, $5 | ||
2209 | addq $1, $6, $6 | ||
2210 | addq $3, $6, $6 | ||
2211 | addq $24, $6, $24 | ||
2212 | cmpult $24, $6, $1 | ||
2213 | srl $4, 32, $6 | ||
2214 | mulq $5, $6, $25 | ||
2215 | mulq $7, $5, $5 | ||
2216 | addq $1, $23, $23 | ||
2217 | addq $0, $25, $0 | ||
2218 | cmpult $0, $25, $1 | ||
2219 | mulq $6, $8, $6 | ||
2220 | beq $1, $381 | ||
2221 | sll $21, 32, $1 | ||
2222 | addq $6, $1, $6 | ||
2223 | $381: | ||
2224 | sll $0, 32, $25 | ||
2225 | ldq $2, 56($18) | ||
2226 | addq $5, $25, $5 | ||
2227 | bis $5, $5, $7 | ||
2228 | ldq $4, 24($17) | ||
2229 | addq $22, $7, $22 | ||
2230 | srl $2, 32, $8 | ||
2231 | cmpult $22, $7, $3 | ||
2232 | zapnot $4, 15, $7 | ||
2233 | mulq $8, $7, $28 | ||
2234 | srl $0, 32, $1 | ||
2235 | addq $6, $1, $6 | ||
2236 | cmpult $5, $25, $1 | ||
2237 | zapnot $2, 15, $5 | ||
2238 | addq $1, $6, $6 | ||
2239 | addq $3, $6, $6 | ||
2240 | addq $24, $6, $24 | ||
2241 | cmpult $24, $6, $1 | ||
2242 | srl $4, 32, $6 | ||
2243 | mulq $5, $6, $25 | ||
2244 | mulq $7, $5, $2 | ||
2245 | addq $1, $23, $23 | ||
2246 | addq $28, $25, $28 | ||
2247 | cmpult $28, $25, $1 | ||
2248 | mulq $6, $8, $6 | ||
2249 | beq $1, $385 | ||
2250 | sll $21, 32, $1 | ||
2251 | addq $6, $1, $6 | ||
2252 | $385: | ||
2253 | sll $28, 32, $25 | ||
2254 | addq $2, $25, $2 | ||
2255 | bis $2, $2, $7 | ||
2256 | addq $22, $7, $22 | ||
2257 | stq $22, 80($16) | ||
2258 | ldq $4, 32($17) | ||
2259 | ldq $5, 56($18) | ||
2260 | cmpult $22, $7, $3 | ||
2261 | zapnot $4, 15, $7 | ||
2262 | srl $5, 32, $8 | ||
2263 | mulq $8, $7, $0 | ||
2264 | srl $28, 32, $1 | ||
2265 | cmpult $2, $25, $2 | ||
2266 | addq $6, $1, $6 | ||
2267 | addq $2, $6, $6 | ||
2268 | addq $3, $6, $6 | ||
2269 | addq $24, $6, $24 | ||
2270 | cmpult $24, $6, $1 | ||
2271 | srl $4, 32, $6 | ||
2272 | zapnot $5, 15, $5 | ||
2273 | mulq $5, $6, $22 | ||
2274 | mulq $7, $5, $2 | ||
2275 | addq $1, $23, $23 | ||
2276 | addq $0, $22, $0 | ||
2277 | cmpult $0, $22, $1 | ||
2278 | mulq $6, $8, $6 | ||
2279 | beq $1, $389 | ||
2280 | sll $21, 32, $1 | ||
2281 | addq $6, $1, $6 | ||
2282 | $389: | ||
2283 | sll $0, 32, $22 | ||
2284 | ldq $1, 48($18) | ||
2285 | addq $2, $22, $2 | ||
2286 | bis $2, $2, $7 | ||
2287 | ldq $4, 40($17) | ||
2288 | addq $24, $7, $24 | ||
2289 | srl $1, 32, $8 | ||
2290 | cmpult $24, $7, $3 | ||
2291 | zapnot $4, 15, $7 | ||
2292 | mulq $8, $7, $25 | ||
2293 | zapnot $1, 15, $5 | ||
2294 | mulq $7, $5, $21 | ||
2295 | srl $0, 32, $1 | ||
2296 | cmpult $2, $22, $2 | ||
2297 | addq $6, $1, $6 | ||
2298 | addq $2, $6, $6 | ||
2299 | addq $3, $6, $6 | ||
2300 | addq $23, $6, $23 | ||
2301 | cmpult $23, $6, $22 | ||
2302 | srl $4, 32, $6 | ||
2303 | mulq $5, $6, $5 | ||
2304 | bis $31, 1, $20 | ||
2305 | addq $25, $5, $25 | ||
2306 | cmpult $25, $5, $1 | ||
2307 | mulq $6, $8, $6 | ||
2308 | beq $1, $393 | ||
2309 | sll $20, 32, $1 | ||
2310 | addq $6, $1, $6 | ||
2311 | $393: | ||
2312 | sll $25, 32, $5 | ||
2313 | ldq $2, 40($18) | ||
2314 | addq $21, $5, $21 | ||
2315 | bis $21, $21, $7 | ||
2316 | ldq $4, 48($17) | ||
2317 | addq $24, $7, $24 | ||
2318 | srl $2, 32, $8 | ||
2319 | cmpult $24, $7, $3 | ||
2320 | zapnot $4, 15, $7 | ||
2321 | mulq $8, $7, $28 | ||
2322 | srl $25, 32, $1 | ||
2323 | addq $6, $1, $6 | ||
2324 | cmpult $21, $5, $1 | ||
2325 | zapnot $2, 15, $5 | ||
2326 | addq $1, $6, $6 | ||
2327 | addq $3, $6, $6 | ||
2328 | addq $23, $6, $23 | ||
2329 | cmpult $23, $6, $1 | ||
2330 | srl $4, 32, $6 | ||
2331 | mulq $5, $6, $25 | ||
2332 | mulq $7, $5, $5 | ||
2333 | addq $1, $22, $22 | ||
2334 | addq $28, $25, $28 | ||
2335 | cmpult $28, $25, $1 | ||
2336 | mulq $6, $8, $6 | ||
2337 | beq $1, $397 | ||
2338 | sll $20, 32, $1 | ||
2339 | addq $6, $1, $6 | ||
2340 | $397: | ||
2341 | sll $28, 32, $25 | ||
2342 | ldq $2, 32($18) | ||
2343 | addq $5, $25, $5 | ||
2344 | bis $5, $5, $7 | ||
2345 | ldq $4, 56($17) | ||
2346 | addq $24, $7, $24 | ||
2347 | srl $2, 32, $8 | ||
2348 | cmpult $24, $7, $3 | ||
2349 | zapnot $4, 15, $7 | ||
2350 | mulq $8, $7, $21 | ||
2351 | srl $28, 32, $1 | ||
2352 | addq $6, $1, $6 | ||
2353 | cmpult $5, $25, $1 | ||
2354 | zapnot $2, 15, $5 | ||
2355 | addq $1, $6, $6 | ||
2356 | addq $3, $6, $6 | ||
2357 | addq $23, $6, $23 | ||
2358 | cmpult $23, $6, $1 | ||
2359 | srl $4, 32, $6 | ||
2360 | mulq $5, $6, $25 | ||
2361 | mulq $7, $5, $2 | ||
2362 | addq $1, $22, $22 | ||
2363 | addq $21, $25, $21 | ||
2364 | cmpult $21, $25, $1 | ||
2365 | mulq $6, $8, $6 | ||
2366 | beq $1, $401 | ||
2367 | sll $20, 32, $1 | ||
2368 | addq $6, $1, $6 | ||
2369 | $401: | ||
2370 | sll $21, 32, $25 | ||
2371 | addq $2, $25, $2 | ||
2372 | bis $2, $2, $7 | ||
2373 | addq $24, $7, $24 | ||
2374 | stq $24, 88($16) | ||
2375 | ldq $4, 56($17) | ||
2376 | ldq $5, 40($18) | ||
2377 | cmpult $24, $7, $3 | ||
2378 | zapnot $4, 15, $7 | ||
2379 | srl $5, 32, $8 | ||
2380 | mulq $8, $7, $0 | ||
2381 | srl $21, 32, $1 | ||
2382 | cmpult $2, $25, $2 | ||
2383 | addq $6, $1, $6 | ||
2384 | addq $2, $6, $6 | ||
2385 | addq $3, $6, $6 | ||
2386 | addq $23, $6, $23 | ||
2387 | cmpult $23, $6, $1 | ||
2388 | srl $4, 32, $6 | ||
2389 | zapnot $5, 15, $5 | ||
2390 | mulq $5, $6, $24 | ||
2391 | mulq $7, $5, $5 | ||
2392 | addq $1, $22, $22 | ||
2393 | addq $0, $24, $0 | ||
2394 | cmpult $0, $24, $1 | ||
2395 | mulq $6, $8, $6 | ||
2396 | beq $1, $405 | ||
2397 | sll $20, 32, $1 | ||
2398 | addq $6, $1, $6 | ||
2399 | $405: | ||
2400 | sll $0, 32, $24 | ||
2401 | ldq $2, 48($18) | ||
2402 | addq $5, $24, $5 | ||
2403 | bis $5, $5, $7 | ||
2404 | ldq $4, 48($17) | ||
2405 | addq $23, $7, $23 | ||
2406 | srl $2, 32, $8 | ||
2407 | cmpult $23, $7, $3 | ||
2408 | zapnot $4, 15, $7 | ||
2409 | mulq $8, $7, $28 | ||
2410 | srl $0, 32, $1 | ||
2411 | addq $6, $1, $6 | ||
2412 | cmpult $5, $24, $1 | ||
2413 | zapnot $2, 15, $5 | ||
2414 | addq $1, $6, $6 | ||
2415 | addq $3, $6, $6 | ||
2416 | addq $22, $6, $22 | ||
2417 | cmpult $22, $6, $24 | ||
2418 | srl $4, 32, $6 | ||
2419 | mulq $5, $6, $25 | ||
2420 | mulq $7, $5, $5 | ||
2421 | addq $28, $25, $28 | ||
2422 | cmpult $28, $25, $1 | ||
2423 | mulq $6, $8, $6 | ||
2424 | beq $1, $409 | ||
2425 | sll $20, 32, $1 | ||
2426 | addq $6, $1, $6 | ||
2427 | $409: | ||
2428 | sll $28, 32, $25 | ||
2429 | ldq $2, 56($18) | ||
2430 | addq $5, $25, $5 | ||
2431 | bis $5, $5, $7 | ||
2432 | ldq $4, 40($17) | ||
2433 | addq $23, $7, $23 | ||
2434 | srl $2, 32, $8 | ||
2435 | cmpult $23, $7, $3 | ||
2436 | zapnot $4, 15, $7 | ||
2437 | mulq $8, $7, $0 | ||
2438 | srl $28, 32, $1 | ||
2439 | addq $6, $1, $6 | ||
2440 | cmpult $5, $25, $1 | ||
2441 | zapnot $2, 15, $5 | ||
2442 | addq $1, $6, $6 | ||
2443 | addq $3, $6, $6 | ||
2444 | addq $22, $6, $22 | ||
2445 | cmpult $22, $6, $1 | ||
2446 | srl $4, 32, $6 | ||
2447 | mulq $5, $6, $25 | ||
2448 | mulq $7, $5, $2 | ||
2449 | addq $1, $24, $24 | ||
2450 | addq $0, $25, $0 | ||
2451 | cmpult $0, $25, $1 | ||
2452 | mulq $6, $8, $6 | ||
2453 | beq $1, $413 | ||
2454 | sll $20, 32, $1 | ||
2455 | addq $6, $1, $6 | ||
2456 | $413: | ||
2457 | sll $0, 32, $25 | ||
2458 | addq $2, $25, $2 | ||
2459 | bis $2, $2, $7 | ||
2460 | addq $23, $7, $23 | ||
2461 | stq $23, 96($16) | ||
2462 | ldq $4, 48($17) | ||
2463 | ldq $5, 56($18) | ||
2464 | cmpult $23, $7, $3 | ||
2465 | zapnot $4, 15, $7 | ||
2466 | srl $5, 32, $8 | ||
2467 | mulq $8, $7, $28 | ||
2468 | srl $0, 32, $1 | ||
2469 | cmpult $2, $25, $2 | ||
2470 | addq $6, $1, $6 | ||
2471 | addq $2, $6, $6 | ||
2472 | addq $3, $6, $6 | ||
2473 | addq $22, $6, $22 | ||
2474 | cmpult $22, $6, $1 | ||
2475 | srl $4, 32, $6 | ||
2476 | zapnot $5, 15, $5 | ||
2477 | mulq $5, $6, $23 | ||
2478 | mulq $7, $5, $5 | ||
2479 | addq $1, $24, $24 | ||
2480 | addq $28, $23, $28 | ||
2481 | cmpult $28, $23, $1 | ||
2482 | mulq $6, $8, $6 | ||
2483 | beq $1, $417 | ||
2484 | sll $20, 32, $1 | ||
2485 | addq $6, $1, $6 | ||
2486 | $417: | ||
2487 | sll $28, 32, $23 | ||
2488 | ldq $2, 48($18) | ||
2489 | addq $5, $23, $5 | ||
2490 | bis $5, $5, $7 | ||
2491 | ldq $4, 56($17) | ||
2492 | addq $22, $7, $22 | ||
2493 | srl $2, 32, $8 | ||
2494 | cmpult $22, $7, $3 | ||
2495 | zapnot $4, 15, $7 | ||
2496 | mulq $8, $7, $0 | ||
2497 | srl $28, 32, $1 | ||
2498 | addq $6, $1, $6 | ||
2499 | cmpult $5, $23, $1 | ||
2500 | zapnot $2, 15, $5 | ||
2501 | addq $1, $6, $6 | ||
2502 | addq $3, $6, $6 | ||
2503 | addq $24, $6, $24 | ||
2504 | cmpult $24, $6, $23 | ||
2505 | srl $4, 32, $6 | ||
2506 | mulq $5, $6, $25 | ||
2507 | mulq $7, $5, $2 | ||
2508 | addq $0, $25, $0 | ||
2509 | cmpult $0, $25, $1 | ||
2510 | mulq $6, $8, $6 | ||
2511 | beq $1, $421 | ||
2512 | sll $20, 32, $1 | ||
2513 | addq $6, $1, $6 | ||
2514 | $421: | ||
2515 | sll $0, 32, $25 | ||
2516 | addq $2, $25, $2 | ||
2517 | bis $2, $2, $7 | ||
2518 | addq $22, $7, $22 | ||
2519 | stq $22, 104($16) | ||
2520 | ldq $4, 56($17) | ||
2521 | ldq $5, 56($18) | ||
2522 | cmpult $22, $7, $3 | ||
2523 | zapnot $4, 15, $7 | ||
2524 | srl $5, 32, $8 | ||
2525 | mulq $8, $7, $28 | ||
2526 | srl $0, 32, $1 | ||
2527 | cmpult $2, $25, $2 | ||
2528 | addq $6, $1, $6 | ||
2529 | addq $2, $6, $6 | ||
2530 | addq $3, $6, $6 | ||
2531 | addq $24, $6, $24 | ||
2532 | cmpult $24, $6, $1 | ||
2533 | srl $4, 32, $6 | ||
2534 | zapnot $5, 15, $5 | ||
2535 | mulq $5, $6, $22 | ||
2536 | mulq $7, $5, $2 | ||
2537 | addq $1, $23, $23 | ||
2538 | addq $28, $22, $28 | ||
2539 | cmpult $28, $22, $1 | ||
2540 | mulq $6, $8, $3 | ||
2541 | beq $1, $425 | ||
2542 | sll $20, 32, $1 | ||
2543 | addq $3, $1, $3 | ||
2544 | $425: | ||
2545 | sll $28, 32, $22 | ||
2546 | srl $28, 32, $1 | ||
2547 | addq $2, $22, $2 | ||
2548 | addq $3, $1, $3 | ||
2549 | bis $2, $2, $7 | ||
2550 | addq $24, $7, $24 | ||
2551 | cmpult $7, $22, $1 | ||
2552 | cmpult $24, $7, $2 | ||
2553 | addq $1, $3, $6 | ||
2554 | addq $2, $6, $6 | ||
2555 | stq $24, 112($16) | ||
2556 | addq $23, $6, $23 | ||
2557 | stq $23, 120($16) | ||
2558 | ret $31, ($26), 1 | ||
2559 | .end bn_mul_comba8 | ||
2560 | .text | ||
2561 | .align 3 | ||
2562 | .globl bn_sqr_comba4 | ||
2563 | .ent bn_sqr_comba4 | ||
2564 | bn_sqr_comba4: | ||
2565 | bn_sqr_comba4..ng: | ||
2566 | .frame $30,0,$26,0 | ||
2567 | .prologue 0 | ||
2568 | |||
2569 | ldq $0, 0($17) | ||
2570 | ldq $1, 8($17) | ||
2571 | ldq $2, 16($17) | ||
2572 | ldq $3, 24($17) | ||
2573 | bis $31, $31, $6 | ||
2574 | mulq $0, $0, $4 | ||
2575 | umulh $0, $0, $5 | ||
2576 | stq $4, 0($16) | ||
2577 | bis $31, $31, $4 | ||
2578 | mulq $0, $1, $7 | ||
2579 | umulh $0, $1, $8 | ||
2580 | cmplt $7, $31, $22 | ||
2581 | cmplt $8, $31, $23 | ||
2582 | addq $7, $7, $7 | ||
2583 | addq $8, $8, $8 | ||
2584 | addq $8, $22, $8 | ||
2585 | addq $4, $23, $4 | ||
2586 | addq $5, $7, $5 | ||
2587 | addq $6, $8, $6 | ||
2588 | cmpult $5, $7, $24 | ||
2589 | cmpult $6, $8, $25 | ||
2590 | addq $6, $24, $6 | ||
2591 | addq $4, $25, $4 | ||
2592 | stq $5, 8($16) | ||
2593 | bis $31, $31, $5 | ||
2594 | mulq $1, $1, $27 | ||
2595 | umulh $1, $1, $28 | ||
2596 | addq $6, $27, $6 | ||
2597 | addq $4, $28, $4 | ||
2598 | cmpult $6, $27, $21 | ||
2599 | cmpult $4, $28, $20 | ||
2600 | addq $4, $21, $4 | ||
2601 | addq $5, $20, $5 | ||
2602 | mulq $2, $0, $19 | ||
2603 | umulh $2, $0, $18 | ||
2604 | cmplt $19, $31, $17 | ||
2605 | cmplt $18, $31, $22 | ||
2606 | addq $19, $19, $19 | ||
2607 | addq $18, $18, $18 | ||
2608 | addq $18, $17, $18 | ||
2609 | addq $5, $22, $5 | ||
2610 | addq $6, $19, $6 | ||
2611 | addq $4, $18, $4 | ||
2612 | cmpult $6, $19, $23 | ||
2613 | cmpult $4, $18, $7 | ||
2614 | addq $4, $23, $4 | ||
2615 | addq $5, $7, $5 | ||
2616 | stq $6, 16($16) | ||
2617 | bis $31, $31, $6 | ||
2618 | mulq $3, $0, $8 | ||
2619 | umulh $3, $0, $24 | ||
2620 | cmplt $8, $31, $25 | ||
2621 | cmplt $24, $31, $27 | ||
2622 | addq $8, $8, $8 | ||
2623 | addq $24, $24, $24 | ||
2624 | addq $24, $25, $24 | ||
2625 | addq $6, $27, $6 | ||
2626 | addq $4, $8, $4 | ||
2627 | addq $5, $24, $5 | ||
2628 | cmpult $4, $8, $28 | ||
2629 | cmpult $5, $24, $21 | ||
2630 | addq $5, $28, $5 | ||
2631 | addq $6, $21, $6 | ||
2632 | mulq $2, $1, $20 | ||
2633 | umulh $2, $1, $17 | ||
2634 | cmplt $20, $31, $22 | ||
2635 | cmplt $17, $31, $19 | ||
2636 | addq $20, $20, $20 | ||
2637 | addq $17, $17, $17 | ||
2638 | addq $17, $22, $17 | ||
2639 | addq $6, $19, $6 | ||
2640 | addq $4, $20, $4 | ||
2641 | addq $5, $17, $5 | ||
2642 | cmpult $4, $20, $18 | ||
2643 | cmpult $5, $17, $23 | ||
2644 | addq $5, $18, $5 | ||
2645 | addq $6, $23, $6 | ||
2646 | stq $4, 24($16) | ||
2647 | bis $31, $31, $4 | ||
2648 | mulq $2, $2, $7 | ||
2649 | umulh $2, $2, $25 | ||
2650 | addq $5, $7, $5 | ||
2651 | addq $6, $25, $6 | ||
2652 | cmpult $5, $7, $27 | ||
2653 | cmpult $6, $25, $8 | ||
2654 | addq $6, $27, $6 | ||
2655 | addq $4, $8, $4 | ||
2656 | mulq $3, $1, $24 | ||
2657 | umulh $3, $1, $28 | ||
2658 | cmplt $24, $31, $21 | ||
2659 | cmplt $28, $31, $22 | ||
2660 | addq $24, $24, $24 | ||
2661 | addq $28, $28, $28 | ||
2662 | addq $28, $21, $28 | ||
2663 | addq $4, $22, $4 | ||
2664 | addq $5, $24, $5 | ||
2665 | addq $6, $28, $6 | ||
2666 | cmpult $5, $24, $19 | ||
2667 | cmpult $6, $28, $20 | ||
2668 | addq $6, $19, $6 | ||
2669 | addq $4, $20, $4 | ||
2670 | stq $5, 32($16) | ||
2671 | bis $31, $31, $5 | ||
2672 | mulq $3, $2, $17 | ||
2673 | umulh $3, $2, $18 | ||
2674 | cmplt $17, $31, $23 | ||
2675 | cmplt $18, $31, $7 | ||
2676 | addq $17, $17, $17 | ||
2677 | addq $18, $18, $18 | ||
2678 | addq $18, $23, $18 | ||
2679 | addq $5, $7, $5 | ||
2680 | addq $6, $17, $6 | ||
2681 | addq $4, $18, $4 | ||
2682 | cmpult $6, $17, $25 | ||
2683 | cmpult $4, $18, $27 | ||
2684 | addq $4, $25, $4 | ||
2685 | addq $5, $27, $5 | ||
2686 | stq $6, 40($16) | ||
2687 | bis $31, $31, $6 | ||
2688 | mulq $3, $3, $8 | ||
2689 | umulh $3, $3, $21 | ||
2690 | addq $4, $8, $4 | ||
2691 | addq $5, $21, $5 | ||
2692 | cmpult $4, $8, $22 | ||
2693 | cmpult $5, $21, $24 | ||
2694 | addq $5, $22, $5 | ||
2695 | addq $6, $24, $6 | ||
2696 | stq $4, 48($16) | ||
2697 | stq $5, 56($16) | ||
2698 | ret $31,($26),1 | ||
2699 | .end bn_sqr_comba4 | ||
2700 | .text | ||
2701 | .align 3 | ||
2702 | .globl bn_sqr_comba8 | ||
2703 | .ent bn_sqr_comba8 | ||
2704 | bn_sqr_comba8: | ||
2705 | bn_sqr_comba8..ng: | ||
2706 | .frame $30,0,$26,0 | ||
2707 | .prologue 0 | ||
344 | 2708 | ||
2709 | ldq $0, 0($17) | ||
2710 | ldq $1, 8($17) | ||
2711 | ldq $2, 16($17) | ||
2712 | ldq $3, 24($17) | ||
2713 | ldq $4, 32($17) | ||
2714 | ldq $5, 40($17) | ||
2715 | ldq $6, 48($17) | ||
2716 | ldq $7, 56($17) | ||
2717 | bis $31, $31, $23 | ||
2718 | mulq $0, $0, $8 | ||
2719 | umulh $0, $0, $22 | ||
2720 | stq $8, 0($16) | ||
2721 | bis $31, $31, $8 | ||
2722 | mulq $1, $0, $24 | ||
2723 | umulh $1, $0, $25 | ||
2724 | cmplt $24, $31, $27 | ||
2725 | cmplt $25, $31, $28 | ||
2726 | addq $24, $24, $24 | ||
2727 | addq $25, $25, $25 | ||
2728 | addq $25, $27, $25 | ||
2729 | addq $8, $28, $8 | ||
2730 | addq $22, $24, $22 | ||
2731 | addq $23, $25, $23 | ||
2732 | cmpult $22, $24, $21 | ||
2733 | cmpult $23, $25, $20 | ||
2734 | addq $23, $21, $23 | ||
2735 | addq $8, $20, $8 | ||
2736 | stq $22, 8($16) | ||
2737 | bis $31, $31, $22 | ||
2738 | mulq $1, $1, $19 | ||
2739 | umulh $1, $1, $18 | ||
2740 | addq $23, $19, $23 | ||
2741 | addq $8, $18, $8 | ||
2742 | cmpult $23, $19, $17 | ||
2743 | cmpult $8, $18, $27 | ||
2744 | addq $8, $17, $8 | ||
2745 | addq $22, $27, $22 | ||
2746 | mulq $2, $0, $28 | ||
2747 | umulh $2, $0, $24 | ||
2748 | cmplt $28, $31, $25 | ||
2749 | cmplt $24, $31, $21 | ||
2750 | addq $28, $28, $28 | ||
2751 | addq $24, $24, $24 | ||
2752 | addq $24, $25, $24 | ||
2753 | addq $22, $21, $22 | ||
2754 | addq $23, $28, $23 | ||
2755 | addq $8, $24, $8 | ||
2756 | cmpult $23, $28, $20 | ||
2757 | cmpult $8, $24, $19 | ||
2758 | addq $8, $20, $8 | ||
2759 | addq $22, $19, $22 | ||
2760 | stq $23, 16($16) | ||
2761 | bis $31, $31, $23 | ||
2762 | mulq $2, $1, $18 | ||
2763 | umulh $2, $1, $17 | ||
2764 | cmplt $18, $31, $27 | ||
2765 | cmplt $17, $31, $25 | ||
2766 | addq $18, $18, $18 | ||
2767 | addq $17, $17, $17 | ||
2768 | addq $17, $27, $17 | ||
2769 | addq $23, $25, $23 | ||
2770 | addq $8, $18, $8 | ||
2771 | addq $22, $17, $22 | ||
2772 | cmpult $8, $18, $21 | ||
2773 | cmpult $22, $17, $28 | ||
2774 | addq $22, $21, $22 | ||
2775 | addq $23, $28, $23 | ||
2776 | mulq $3, $0, $24 | ||
2777 | umulh $3, $0, $20 | ||
2778 | cmplt $24, $31, $19 | ||
2779 | cmplt $20, $31, $27 | ||
2780 | addq $24, $24, $24 | ||
2781 | addq $20, $20, $20 | ||
2782 | addq $20, $19, $20 | ||
2783 | addq $23, $27, $23 | ||
2784 | addq $8, $24, $8 | ||
2785 | addq $22, $20, $22 | ||
2786 | cmpult $8, $24, $25 | ||
2787 | cmpult $22, $20, $18 | ||
2788 | addq $22, $25, $22 | ||
2789 | addq $23, $18, $23 | ||
2790 | stq $8, 24($16) | ||
2791 | bis $31, $31, $8 | ||
2792 | mulq $2, $2, $17 | ||
2793 | umulh $2, $2, $21 | ||
2794 | addq $22, $17, $22 | ||
2795 | addq $23, $21, $23 | ||
2796 | cmpult $22, $17, $28 | ||
2797 | cmpult $23, $21, $19 | ||
2798 | addq $23, $28, $23 | ||
2799 | addq $8, $19, $8 | ||
2800 | mulq $3, $1, $27 | ||
2801 | umulh $3, $1, $24 | ||
2802 | cmplt $27, $31, $20 | ||
2803 | cmplt $24, $31, $25 | ||
2804 | addq $27, $27, $27 | ||
2805 | addq $24, $24, $24 | ||
2806 | addq $24, $20, $24 | ||
2807 | addq $8, $25, $8 | ||
2808 | addq $22, $27, $22 | ||
2809 | addq $23, $24, $23 | ||
2810 | cmpult $22, $27, $18 | ||
2811 | cmpult $23, $24, $17 | ||
2812 | addq $23, $18, $23 | ||
2813 | addq $8, $17, $8 | ||
2814 | mulq $4, $0, $21 | ||
2815 | umulh $4, $0, $28 | ||
2816 | cmplt $21, $31, $19 | ||
2817 | cmplt $28, $31, $20 | ||
2818 | addq $21, $21, $21 | ||
2819 | addq $28, $28, $28 | ||
2820 | addq $28, $19, $28 | ||
2821 | addq $8, $20, $8 | ||
2822 | addq $22, $21, $22 | ||
2823 | addq $23, $28, $23 | ||
2824 | cmpult $22, $21, $25 | ||
2825 | cmpult $23, $28, $27 | ||
2826 | addq $23, $25, $23 | ||
2827 | addq $8, $27, $8 | ||
2828 | stq $22, 32($16) | ||
2829 | bis $31, $31, $22 | ||
2830 | mulq $3, $2, $24 | ||
2831 | umulh $3, $2, $18 | ||
2832 | cmplt $24, $31, $17 | ||
2833 | cmplt $18, $31, $19 | ||
2834 | addq $24, $24, $24 | ||
2835 | addq $18, $18, $18 | ||
2836 | addq $18, $17, $18 | ||
2837 | addq $22, $19, $22 | ||
2838 | addq $23, $24, $23 | ||
2839 | addq $8, $18, $8 | ||
2840 | cmpult $23, $24, $20 | ||
2841 | cmpult $8, $18, $21 | ||
2842 | addq $8, $20, $8 | ||
2843 | addq $22, $21, $22 | ||
2844 | mulq $4, $1, $28 | ||
2845 | umulh $4, $1, $25 | ||
2846 | cmplt $28, $31, $27 | ||
2847 | cmplt $25, $31, $17 | ||
2848 | addq $28, $28, $28 | ||
2849 | addq $25, $25, $25 | ||
2850 | addq $25, $27, $25 | ||
2851 | addq $22, $17, $22 | ||
2852 | addq $23, $28, $23 | ||
2853 | addq $8, $25, $8 | ||
2854 | cmpult $23, $28, $19 | ||
2855 | cmpult $8, $25, $24 | ||
2856 | addq $8, $19, $8 | ||
2857 | addq $22, $24, $22 | ||
2858 | mulq $5, $0, $18 | ||
2859 | umulh $5, $0, $20 | ||
2860 | cmplt $18, $31, $21 | ||
2861 | cmplt $20, $31, $27 | ||
2862 | addq $18, $18, $18 | ||
2863 | addq $20, $20, $20 | ||
2864 | addq $20, $21, $20 | ||
2865 | addq $22, $27, $22 | ||
2866 | addq $23, $18, $23 | ||
2867 | addq $8, $20, $8 | ||
2868 | cmpult $23, $18, $17 | ||
2869 | cmpult $8, $20, $28 | ||
2870 | addq $8, $17, $8 | ||
2871 | addq $22, $28, $22 | ||
2872 | stq $23, 40($16) | ||
2873 | bis $31, $31, $23 | ||
2874 | mulq $3, $3, $25 | ||
2875 | umulh $3, $3, $19 | ||
2876 | addq $8, $25, $8 | ||
2877 | addq $22, $19, $22 | ||
2878 | cmpult $8, $25, $24 | ||
2879 | cmpult $22, $19, $21 | ||
2880 | addq $22, $24, $22 | ||
2881 | addq $23, $21, $23 | ||
2882 | mulq $4, $2, $27 | ||
2883 | umulh $4, $2, $18 | ||
2884 | cmplt $27, $31, $20 | ||
2885 | cmplt $18, $31, $17 | ||
2886 | addq $27, $27, $27 | ||
2887 | addq $18, $18, $18 | ||
2888 | addq $18, $20, $18 | ||
2889 | addq $23, $17, $23 | ||
2890 | addq $8, $27, $8 | ||
2891 | addq $22, $18, $22 | ||
2892 | cmpult $8, $27, $28 | ||
2893 | cmpult $22, $18, $25 | ||
2894 | addq $22, $28, $22 | ||
2895 | addq $23, $25, $23 | ||
2896 | mulq $5, $1, $19 | ||
2897 | umulh $5, $1, $24 | ||
2898 | cmplt $19, $31, $21 | ||
2899 | cmplt $24, $31, $20 | ||
2900 | addq $19, $19, $19 | ||
2901 | addq $24, $24, $24 | ||
2902 | addq $24, $21, $24 | ||
2903 | addq $23, $20, $23 | ||
2904 | addq $8, $19, $8 | ||
2905 | addq $22, $24, $22 | ||
2906 | cmpult $8, $19, $17 | ||
2907 | cmpult $22, $24, $27 | ||
2908 | addq $22, $17, $22 | ||
2909 | addq $23, $27, $23 | ||
2910 | mulq $6, $0, $18 | ||
2911 | umulh $6, $0, $28 | ||
2912 | cmplt $18, $31, $25 | ||
2913 | cmplt $28, $31, $21 | ||
2914 | addq $18, $18, $18 | ||
2915 | addq $28, $28, $28 | ||
2916 | addq $28, $25, $28 | ||
2917 | addq $23, $21, $23 | ||
2918 | addq $8, $18, $8 | ||
2919 | addq $22, $28, $22 | ||
2920 | cmpult $8, $18, $20 | ||
2921 | cmpult $22, $28, $19 | ||
2922 | addq $22, $20, $22 | ||
2923 | addq $23, $19, $23 | ||
2924 | stq $8, 48($16) | ||
2925 | bis $31, $31, $8 | ||
2926 | mulq $4, $3, $24 | ||
2927 | umulh $4, $3, $17 | ||
2928 | cmplt $24, $31, $27 | ||
2929 | cmplt $17, $31, $25 | ||
2930 | addq $24, $24, $24 | ||
2931 | addq $17, $17, $17 | ||
2932 | addq $17, $27, $17 | ||
2933 | addq $8, $25, $8 | ||
2934 | addq $22, $24, $22 | ||
2935 | addq $23, $17, $23 | ||
2936 | cmpult $22, $24, $21 | ||
2937 | cmpult $23, $17, $18 | ||
2938 | addq $23, $21, $23 | ||
2939 | addq $8, $18, $8 | ||
2940 | mulq $5, $2, $28 | ||
2941 | umulh $5, $2, $20 | ||
2942 | cmplt $28, $31, $19 | ||
2943 | cmplt $20, $31, $27 | ||
2944 | addq $28, $28, $28 | ||
2945 | addq $20, $20, $20 | ||
2946 | addq $20, $19, $20 | ||
2947 | addq $8, $27, $8 | ||
2948 | addq $22, $28, $22 | ||
2949 | addq $23, $20, $23 | ||
2950 | cmpult $22, $28, $25 | ||
2951 | cmpult $23, $20, $24 | ||
2952 | addq $23, $25, $23 | ||
2953 | addq $8, $24, $8 | ||
2954 | mulq $6, $1, $17 | ||
2955 | umulh $6, $1, $21 | ||
2956 | cmplt $17, $31, $18 | ||
2957 | cmplt $21, $31, $19 | ||
2958 | addq $17, $17, $17 | ||
2959 | addq $21, $21, $21 | ||
2960 | addq $21, $18, $21 | ||
2961 | addq $8, $19, $8 | ||
2962 | addq $22, $17, $22 | ||
2963 | addq $23, $21, $23 | ||
2964 | cmpult $22, $17, $27 | ||
2965 | cmpult $23, $21, $28 | ||
2966 | addq $23, $27, $23 | ||
2967 | addq $8, $28, $8 | ||
2968 | mulq $7, $0, $20 | ||
2969 | umulh $7, $0, $25 | ||
2970 | cmplt $20, $31, $24 | ||
2971 | cmplt $25, $31, $18 | ||
2972 | addq $20, $20, $20 | ||
2973 | addq $25, $25, $25 | ||
2974 | addq $25, $24, $25 | ||
2975 | addq $8, $18, $8 | ||
2976 | addq $22, $20, $22 | ||
2977 | addq $23, $25, $23 | ||
2978 | cmpult $22, $20, $19 | ||
2979 | cmpult $23, $25, $17 | ||
2980 | addq $23, $19, $23 | ||
2981 | addq $8, $17, $8 | ||
2982 | stq $22, 56($16) | ||
2983 | bis $31, $31, $22 | ||
2984 | mulq $4, $4, $21 | ||
2985 | umulh $4, $4, $27 | ||
2986 | addq $23, $21, $23 | ||
2987 | addq $8, $27, $8 | ||
2988 | cmpult $23, $21, $28 | ||
2989 | cmpult $8, $27, $24 | ||
2990 | addq $8, $28, $8 | ||
2991 | addq $22, $24, $22 | ||
2992 | mulq $5, $3, $18 | ||
2993 | umulh $5, $3, $20 | ||
2994 | cmplt $18, $31, $25 | ||
2995 | cmplt $20, $31, $19 | ||
2996 | addq $18, $18, $18 | ||
2997 | addq $20, $20, $20 | ||
2998 | addq $20, $25, $20 | ||
2999 | addq $22, $19, $22 | ||
3000 | addq $23, $18, $23 | ||
3001 | addq $8, $20, $8 | ||
3002 | cmpult $23, $18, $17 | ||
3003 | cmpult $8, $20, $21 | ||
3004 | addq $8, $17, $8 | ||
3005 | addq $22, $21, $22 | ||
3006 | mulq $6, $2, $27 | ||
3007 | umulh $6, $2, $28 | ||
3008 | cmplt $27, $31, $24 | ||
3009 | cmplt $28, $31, $25 | ||
3010 | addq $27, $27, $27 | ||
3011 | addq $28, $28, $28 | ||
3012 | addq $28, $24, $28 | ||
3013 | addq $22, $25, $22 | ||
3014 | addq $23, $27, $23 | ||
3015 | addq $8, $28, $8 | ||
3016 | cmpult $23, $27, $19 | ||
3017 | cmpult $8, $28, $18 | ||
3018 | addq $8, $19, $8 | ||
3019 | addq $22, $18, $22 | ||
3020 | mulq $7, $1, $20 | ||
3021 | umulh $7, $1, $17 | ||
3022 | cmplt $20, $31, $21 | ||
3023 | cmplt $17, $31, $24 | ||
3024 | addq $20, $20, $20 | ||
3025 | addq $17, $17, $17 | ||
3026 | addq $17, $21, $17 | ||
3027 | addq $22, $24, $22 | ||
3028 | addq $23, $20, $23 | ||
3029 | addq $8, $17, $8 | ||
3030 | cmpult $23, $20, $25 | ||
3031 | cmpult $8, $17, $27 | ||
3032 | addq $8, $25, $8 | ||
3033 | addq $22, $27, $22 | ||
3034 | stq $23, 64($16) | ||
3035 | bis $31, $31, $23 | ||
3036 | mulq $5, $4, $28 | ||
3037 | umulh $5, $4, $19 | ||
3038 | cmplt $28, $31, $18 | ||
3039 | cmplt $19, $31, $21 | ||
3040 | addq $28, $28, $28 | ||
3041 | addq $19, $19, $19 | ||
3042 | addq $19, $18, $19 | ||
3043 | addq $23, $21, $23 | ||
3044 | addq $8, $28, $8 | ||
3045 | addq $22, $19, $22 | ||
3046 | cmpult $8, $28, $24 | ||
3047 | cmpult $22, $19, $20 | ||
3048 | addq $22, $24, $22 | ||
3049 | addq $23, $20, $23 | ||
3050 | mulq $6, $3, $17 | ||
3051 | umulh $6, $3, $25 | ||
3052 | cmplt $17, $31, $27 | ||
3053 | cmplt $25, $31, $18 | ||
3054 | addq $17, $17, $17 | ||
3055 | addq $25, $25, $25 | ||
3056 | addq $25, $27, $25 | ||
3057 | addq $23, $18, $23 | ||
3058 | addq $8, $17, $8 | ||
3059 | addq $22, $25, $22 | ||
3060 | cmpult $8, $17, $21 | ||
3061 | cmpult $22, $25, $28 | ||
3062 | addq $22, $21, $22 | ||
3063 | addq $23, $28, $23 | ||
3064 | mulq $7, $2, $19 | ||
3065 | umulh $7, $2, $24 | ||
3066 | cmplt $19, $31, $20 | ||
3067 | cmplt $24, $31, $27 | ||
3068 | addq $19, $19, $19 | ||
3069 | addq $24, $24, $24 | ||
3070 | addq $24, $20, $24 | ||
3071 | addq $23, $27, $23 | ||
3072 | addq $8, $19, $8 | ||
3073 | addq $22, $24, $22 | ||
3074 | cmpult $8, $19, $18 | ||
3075 | cmpult $22, $24, $17 | ||
3076 | addq $22, $18, $22 | ||
3077 | addq $23, $17, $23 | ||
3078 | stq $8, 72($16) | ||
3079 | bis $31, $31, $8 | ||
3080 | mulq $5, $5, $25 | ||
3081 | umulh $5, $5, $21 | ||
3082 | addq $22, $25, $22 | ||
3083 | addq $23, $21, $23 | ||
3084 | cmpult $22, $25, $28 | ||
3085 | cmpult $23, $21, $20 | ||
3086 | addq $23, $28, $23 | ||
3087 | addq $8, $20, $8 | ||
3088 | mulq $6, $4, $27 | ||
3089 | umulh $6, $4, $19 | ||
3090 | cmplt $27, $31, $24 | ||
3091 | cmplt $19, $31, $18 | ||
3092 | addq $27, $27, $27 | ||
3093 | addq $19, $19, $19 | ||
3094 | addq $19, $24, $19 | ||
3095 | addq $8, $18, $8 | ||
3096 | addq $22, $27, $22 | ||
3097 | addq $23, $19, $23 | ||
3098 | cmpult $22, $27, $17 | ||
3099 | cmpult $23, $19, $25 | ||
3100 | addq $23, $17, $23 | ||
3101 | addq $8, $25, $8 | ||
3102 | mulq $7, $3, $21 | ||
3103 | umulh $7, $3, $28 | ||
3104 | cmplt $21, $31, $20 | ||
3105 | cmplt $28, $31, $24 | ||
3106 | addq $21, $21, $21 | ||
3107 | addq $28, $28, $28 | ||
3108 | addq $28, $20, $28 | ||
3109 | addq $8, $24, $8 | ||
3110 | addq $22, $21, $22 | ||
3111 | addq $23, $28, $23 | ||
3112 | cmpult $22, $21, $18 | ||
3113 | cmpult $23, $28, $27 | ||
3114 | addq $23, $18, $23 | ||
3115 | addq $8, $27, $8 | ||
3116 | stq $22, 80($16) | ||
3117 | bis $31, $31, $22 | ||
3118 | mulq $6, $5, $19 | ||
3119 | umulh $6, $5, $17 | ||
3120 | cmplt $19, $31, $25 | ||
3121 | cmplt $17, $31, $20 | ||
3122 | addq $19, $19, $19 | ||
3123 | addq $17, $17, $17 | ||
3124 | addq $17, $25, $17 | ||
3125 | addq $22, $20, $22 | ||
3126 | addq $23, $19, $23 | ||
3127 | addq $8, $17, $8 | ||
3128 | cmpult $23, $19, $24 | ||
3129 | cmpult $8, $17, $21 | ||
3130 | addq $8, $24, $8 | ||
3131 | addq $22, $21, $22 | ||
3132 | mulq $7, $4, $28 | ||
3133 | umulh $7, $4, $18 | ||
3134 | cmplt $28, $31, $27 | ||
3135 | cmplt $18, $31, $25 | ||
3136 | addq $28, $28, $28 | ||
3137 | addq $18, $18, $18 | ||
3138 | addq $18, $27, $18 | ||
3139 | addq $22, $25, $22 | ||
3140 | addq $23, $28, $23 | ||
3141 | addq $8, $18, $8 | ||
3142 | cmpult $23, $28, $20 | ||
3143 | cmpult $8, $18, $19 | ||
3144 | addq $8, $20, $8 | ||
3145 | addq $22, $19, $22 | ||
3146 | stq $23, 88($16) | ||
3147 | bis $31, $31, $23 | ||
3148 | mulq $6, $6, $17 | ||
3149 | umulh $6, $6, $24 | ||
3150 | addq $8, $17, $8 | ||
3151 | addq $22, $24, $22 | ||
3152 | cmpult $8, $17, $21 | ||
3153 | cmpult $22, $24, $27 | ||
3154 | addq $22, $21, $22 | ||
3155 | addq $23, $27, $23 | ||
3156 | mulq $7, $5, $25 | ||
3157 | umulh $7, $5, $28 | ||
3158 | cmplt $25, $31, $18 | ||
3159 | cmplt $28, $31, $20 | ||
3160 | addq $25, $25, $25 | ||
3161 | addq $28, $28, $28 | ||
3162 | addq $28, $18, $28 | ||
3163 | addq $23, $20, $23 | ||
3164 | addq $8, $25, $8 | ||
3165 | addq $22, $28, $22 | ||
3166 | cmpult $8, $25, $19 | ||
3167 | cmpult $22, $28, $17 | ||
3168 | addq $22, $19, $22 | ||
3169 | addq $23, $17, $23 | ||
3170 | stq $8, 96($16) | ||
3171 | bis $31, $31, $8 | ||
3172 | mulq $7, $6, $24 | ||
3173 | umulh $7, $6, $21 | ||
3174 | cmplt $24, $31, $27 | ||
3175 | cmplt $21, $31, $18 | ||
3176 | addq $24, $24, $24 | ||
3177 | addq $21, $21, $21 | ||
3178 | addq $21, $27, $21 | ||
3179 | addq $8, $18, $8 | ||
3180 | addq $22, $24, $22 | ||
3181 | addq $23, $21, $23 | ||
3182 | cmpult $22, $24, $20 | ||
3183 | cmpult $23, $21, $25 | ||
3184 | addq $23, $20, $23 | ||
3185 | addq $8, $25, $8 | ||
3186 | stq $22, 104($16) | ||
3187 | bis $31, $31, $22 | ||
3188 | mulq $7, $7, $28 | ||
3189 | umulh $7, $7, $19 | ||
3190 | addq $23, $28, $23 | ||
3191 | addq $8, $19, $8 | ||
3192 | cmpult $23, $28, $17 | ||
3193 | cmpult $8, $19, $27 | ||
3194 | addq $8, $17, $8 | ||
3195 | addq $22, $27, $22 | ||
3196 | stq $23, 112($16) | ||
3197 | stq $8, 120($16) | ||
3198 | ret $31,($26),1 | ||
3199 | .end bn_sqr_comba8 | ||
diff --git a/src/lib/libcrypto/bn/asm/mips3.s b/src/lib/libcrypto/bn/asm/mips3.s index 191345d920..dca4105c7d 100644 --- a/src/lib/libcrypto/bn/asm/mips3.s +++ b/src/lib/libcrypto/bn/asm/mips3.s | |||
@@ -1,5 +1,5 @@ | |||
1 | .rdata | 1 | .rdata |
2 | .asciiz "mips3.s, Version 1.0" | 2 | .asciiz "mips3.s, Version 1.1" |
3 | .asciiz "MIPS III/IV ISA artwork by Andy Polyakov <appro@fy.chalmers.se>" | 3 | .asciiz "MIPS III/IV ISA artwork by Andy Polyakov <appro@fy.chalmers.se>" |
4 | 4 | ||
5 | /* | 5 | /* |
@@ -395,32 +395,32 @@ LEAF(bn_add_words) | |||
395 | 395 | ||
396 | .L_bn_add_words_loop: | 396 | .L_bn_add_words_loop: |
397 | ld ta0,0(a2) | 397 | ld ta0,0(a2) |
398 | subu a3,4 | ||
398 | ld t1,8(a1) | 399 | ld t1,8(a1) |
399 | ld ta1,8(a2) | 400 | and AT,a3,MINUS4 |
400 | ld t2,16(a1) | 401 | ld t2,16(a1) |
401 | ld ta2,16(a2) | 402 | PTR_ADD a2,32 |
402 | ld t3,24(a1) | 403 | ld t3,24(a1) |
403 | ld ta3,24(a2) | 404 | PTR_ADD a0,32 |
405 | ld ta1,-24(a2) | ||
406 | PTR_ADD a1,32 | ||
407 | ld ta2,-16(a2) | ||
408 | ld ta3,-8(a2) | ||
404 | daddu ta0,t0 | 409 | daddu ta0,t0 |
405 | subu a3,4 | ||
406 | sltu t8,ta0,t0 | 410 | sltu t8,ta0,t0 |
407 | daddu t0,ta0,v0 | 411 | daddu t0,ta0,v0 |
408 | PTR_ADD a0,32 | ||
409 | sltu v0,t0,ta0 | 412 | sltu v0,t0,ta0 |
410 | sd t0,-32(a0) | 413 | sd t0,-32(a0) |
411 | daddu v0,t8 | 414 | daddu v0,t8 |
412 | 415 | ||
413 | daddu ta1,t1 | 416 | daddu ta1,t1 |
414 | PTR_ADD a1,32 | ||
415 | sltu t9,ta1,t1 | 417 | sltu t9,ta1,t1 |
416 | daddu t1,ta1,v0 | 418 | daddu t1,ta1,v0 |
417 | PTR_ADD a2,32 | ||
418 | sltu v0,t1,ta1 | 419 | sltu v0,t1,ta1 |
419 | sd t1,-24(a0) | 420 | sd t1,-24(a0) |
420 | daddu v0,t9 | 421 | daddu v0,t9 |
421 | 422 | ||
422 | daddu ta2,t2 | 423 | daddu ta2,t2 |
423 | and AT,a3,MINUS4 | ||
424 | sltu t8,ta2,t2 | 424 | sltu t8,ta2,t2 |
425 | daddu t2,ta2,v0 | 425 | daddu t2,ta2,v0 |
426 | sltu v0,t2,ta2 | 426 | sltu v0,t2,ta2 |
@@ -495,25 +495,26 @@ LEAF(bn_sub_words) | |||
495 | 495 | ||
496 | .L_bn_sub_words_loop: | 496 | .L_bn_sub_words_loop: |
497 | ld ta0,0(a2) | 497 | ld ta0,0(a2) |
498 | subu a3,4 | ||
498 | ld t1,8(a1) | 499 | ld t1,8(a1) |
499 | ld ta1,8(a2) | 500 | and AT,a3,MINUS4 |
500 | ld t2,16(a1) | 501 | ld t2,16(a1) |
501 | ld ta2,16(a2) | 502 | PTR_ADD a2,32 |
502 | ld t3,24(a1) | 503 | ld t3,24(a1) |
503 | ld ta3,24(a2) | 504 | PTR_ADD a0,32 |
505 | ld ta1,-24(a2) | ||
506 | PTR_ADD a1,32 | ||
507 | ld ta2,-16(a2) | ||
508 | ld ta3,-8(a2) | ||
504 | sltu t8,t0,ta0 | 509 | sltu t8,t0,ta0 |
505 | dsubu t0,ta0 | 510 | dsubu t0,ta0 |
506 | subu a3,4 | ||
507 | dsubu ta0,t0,v0 | 511 | dsubu ta0,t0,v0 |
508 | and AT,a3,MINUS4 | 512 | sd ta0,-32(a0) |
509 | sd ta0,0(a0) | ||
510 | MOVNZ (t0,v0,t8) | 513 | MOVNZ (t0,v0,t8) |
511 | 514 | ||
512 | sltu t9,t1,ta1 | 515 | sltu t9,t1,ta1 |
513 | dsubu t1,ta1 | 516 | dsubu t1,ta1 |
514 | PTR_ADD a0,32 | ||
515 | dsubu ta1,t1,v0 | 517 | dsubu ta1,t1,v0 |
516 | PTR_ADD a1,32 | ||
517 | sd ta1,-24(a0) | 518 | sd ta1,-24(a0) |
518 | MOVNZ (t1,v0,t9) | 519 | MOVNZ (t1,v0,t9) |
519 | 520 | ||
@@ -521,7 +522,6 @@ LEAF(bn_sub_words) | |||
521 | sltu t8,t2,ta2 | 522 | sltu t8,t2,ta2 |
522 | dsubu t2,ta2 | 523 | dsubu t2,ta2 |
523 | dsubu ta2,t2,v0 | 524 | dsubu ta2,t2,v0 |
524 | PTR_ADD a2,32 | ||
525 | sd ta2,-16(a0) | 525 | sd ta2,-16(a0) |
526 | MOVNZ (t2,v0,t8) | 526 | MOVNZ (t2,v0,t8) |
527 | 527 | ||
@@ -574,6 +574,51 @@ END(bn_sub_words) | |||
574 | 574 | ||
575 | #undef MINUS4 | 575 | #undef MINUS4 |
576 | 576 | ||
577 | .align 5 | ||
578 | LEAF(bn_div_3_words) | ||
579 | .set reorder | ||
580 | move a3,a0 /* we know that bn_div_words doesn't | ||
581 | * touch a3, ta2, ta3 and preserves a2 | ||
582 | * so that we can save two arguments | ||
583 | * and return address in registers | ||
584 | * instead of stack:-) | ||
585 | */ | ||
586 | ld a0,(a3) | ||
587 | move ta2,a1 | ||
588 | ld a1,-8(a3) | ||
589 | bne a0,a2,.L_bn_div_3_words_proceed | ||
590 | li v0,-1 | ||
591 | jr ra | ||
592 | .L_bn_div_3_words_proceed: | ||
593 | move ta3,ra | ||
594 | bal bn_div_words | ||
595 | move ra,ta3 | ||
596 | dmultu ta2,v0 | ||
597 | ld t2,-16(a3) | ||
598 | move ta0,zero | ||
599 | mfhi t1 | ||
600 | mflo t0 | ||
601 | sltu t8,t1,v1 | ||
602 | .L_bn_div_3_words_inner_loop: | ||
603 | bnez t8,.L_bn_div_3_words_inner_loop_done | ||
604 | sgeu AT,t2,t0 | ||
605 | seq t9,t1,v1 | ||
606 | and AT,t9 | ||
607 | sltu t3,t0,ta2 | ||
608 | daddu v1,a2 | ||
609 | dsubu t1,t3 | ||
610 | dsubu t0,ta2 | ||
611 | sltu t8,t1,v1 | ||
612 | sltu ta0,v1,a2 | ||
613 | or t8,ta0 | ||
614 | .set noreorder | ||
615 | beqzl AT,.L_bn_div_3_words_inner_loop | ||
616 | dsubu v0,1 | ||
617 | .set reorder | ||
618 | .L_bn_div_3_words_inner_loop_done: | ||
619 | jr ra | ||
620 | END(bn_div_3_words) | ||
621 | |||
577 | .align 5 | 622 | .align 5 |
578 | LEAF(bn_div_words) | 623 | LEAF(bn_div_words) |
579 | .set noreorder | 624 | .set noreorder |
@@ -633,16 +678,16 @@ LEAF(bn_div_words) | |||
633 | seq t8,HH,t1 | 678 | seq t8,HH,t1 |
634 | sltu AT,HH,t1 | 679 | sltu AT,HH,t1 |
635 | and t2,t8 | 680 | and t2,t8 |
681 | sltu v0,t0,a2 | ||
636 | or AT,t2 | 682 | or AT,t2 |
637 | .set noreorder | 683 | .set noreorder |
638 | beqz AT,.L_bn_div_words_inner_loop1_done | 684 | beqz AT,.L_bn_div_words_inner_loop1_done |
639 | sltu t2,t0,a2 | 685 | dsubu t1,v0 |
640 | .set reorder | ||
641 | dsubu QT,1 | ||
642 | dsubu t0,a2 | 686 | dsubu t0,a2 |
643 | dsubu t1,t2 | ||
644 | b .L_bn_div_words_inner_loop1 | 687 | b .L_bn_div_words_inner_loop1 |
645 | .L_bn_div_words_inner_loop1_done: | 688 | dsubu QT,1 |
689 | .set reorder | ||
690 | .L_bn_div_words_inner_loop1_done: | ||
646 | 691 | ||
647 | dsll a1,32 | 692 | dsll a1,32 |
648 | dsubu a0,t3,t0 | 693 | dsubu a0,t3,t0 |
@@ -655,6 +700,7 @@ LEAF(bn_div_words) | |||
655 | ddivu zero,a0,DH | 700 | ddivu zero,a0,DH |
656 | mflo QT | 701 | mflo QT |
657 | .L_bn_div_words_skip_div2: | 702 | .L_bn_div_words_skip_div2: |
703 | #undef DH | ||
658 | dmultu a2,QT | 704 | dmultu a2,QT |
659 | dsll t3,a0,32 | 705 | dsll t3,a0,32 |
660 | dsrl AT,a1,32 | 706 | dsrl AT,a1,32 |
@@ -666,69 +712,26 @@ LEAF(bn_div_words) | |||
666 | seq t8,HH,t1 | 712 | seq t8,HH,t1 |
667 | sltu AT,HH,t1 | 713 | sltu AT,HH,t1 |
668 | and t2,t8 | 714 | and t2,t8 |
715 | sltu v1,t0,a2 | ||
669 | or AT,t2 | 716 | or AT,t2 |
670 | .set noreorder | 717 | .set noreorder |
671 | beqz AT,.L_bn_div_words_inner_loop2_done | 718 | beqz AT,.L_bn_div_words_inner_loop2_done |
672 | sltu t2,t0,a2 | 719 | dsubu t1,v1 |
673 | .set reorder | ||
674 | dsubu QT,1 | ||
675 | dsubu t0,a2 | 720 | dsubu t0,a2 |
676 | dsubu t1,t2 | ||
677 | b .L_bn_div_words_inner_loop2 | 721 | b .L_bn_div_words_inner_loop2 |
722 | dsubu QT,1 | ||
723 | .set reorder | ||
678 | .L_bn_div_words_inner_loop2_done: | 724 | .L_bn_div_words_inner_loop2_done: |
725 | #undef HH | ||
679 | 726 | ||
680 | dsubu a0,t3,t0 | 727 | dsubu a0,t3,t0 |
681 | or v0,QT | 728 | or v0,QT |
682 | dsrl v1,a0,t9 /* v1 contains remainder if anybody wants it */ | 729 | dsrl v1,a0,t9 /* v1 contains remainder if anybody wants it */ |
683 | dsrl a2,t9 /* restore a2 */ | 730 | dsrl a2,t9 /* restore a2 */ |
684 | jr ra | 731 | jr ra |
685 | #undef HH | ||
686 | #undef DH | ||
687 | #undef QT | 732 | #undef QT |
688 | END(bn_div_words) | 733 | END(bn_div_words) |
689 | 734 | ||
690 | .align 5 | ||
691 | LEAF(bn_div_3_words) | ||
692 | .set reorder | ||
693 | move a3,a0 /* we know that bn_div_words doesn't | ||
694 | * touch a3, ta2, ta3 and preserves a2 | ||
695 | * so that we can save two arguments | ||
696 | * and return address in registers | ||
697 | * instead of stack:-) | ||
698 | */ | ||
699 | ld a0,(a3) | ||
700 | move ta2,a2 | ||
701 | move a2,a1 | ||
702 | ld a1,-8(a3) | ||
703 | move ta3,ra | ||
704 | move v1,zero | ||
705 | li v0,-1 | ||
706 | beq a0,a2,.L_bn_div_3_words_skip_div | ||
707 | jal bn_div_words | ||
708 | move ra,ta3 | ||
709 | .L_bn_div_3_words_skip_div: | ||
710 | dmultu ta2,v0 | ||
711 | ld t2,-16(a3) | ||
712 | mflo t0 | ||
713 | mfhi t1 | ||
714 | .L_bn_div_3_words_inner_loop: | ||
715 | sgeu AT,t2,t0 | ||
716 | seq t9,t1,v1 | ||
717 | sltu t8,t1,v1 | ||
718 | and AT,t9 | ||
719 | or AT,t8 | ||
720 | bnez AT,.L_bn_div_3_words_inner_loop_done | ||
721 | daddu v1,a2 | ||
722 | sltu t3,t0,ta2 | ||
723 | sltu AT,v1,a2 | ||
724 | dsubu v0,1 | ||
725 | dsubu t0,ta2 | ||
726 | dsubu t1,t3 | ||
727 | beqz AT,.L_bn_div_3_words_inner_loop | ||
728 | .L_bn_div_3_words_inner_loop_done: | ||
729 | jr ra | ||
730 | END(bn_div_3_words) | ||
731 | |||
732 | #define a_0 t0 | 735 | #define a_0 t0 |
733 | #define a_1 t1 | 736 | #define a_1 t1 |
734 | #define a_2 t2 | 737 | #define a_2 t2 |
@@ -846,6 +849,7 @@ LEAF(bn_mul_comba8) | |||
846 | sltu AT,c_1,t_1 | 849 | sltu AT,c_1,t_1 |
847 | daddu t_2,AT | 850 | daddu t_2,AT |
848 | daddu c_2,t_2 | 851 | daddu c_2,t_2 |
852 | sltu c_3,c_2,t_2 | ||
849 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ | 853 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ |
850 | mflo t_1 | 854 | mflo t_1 |
851 | mfhi t_2 | 855 | mfhi t_2 |
@@ -853,7 +857,8 @@ LEAF(bn_mul_comba8) | |||
853 | sltu AT,c_1,t_1 | 857 | sltu AT,c_1,t_1 |
854 | daddu t_2,AT | 858 | daddu t_2,AT |
855 | daddu c_2,t_2 | 859 | daddu c_2,t_2 |
856 | sltu c_3,c_2,t_2 | 860 | sltu AT,c_2,t_2 |
861 | daddu c_3,AT | ||
857 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ | 862 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ |
858 | mflo t_1 | 863 | mflo t_1 |
859 | mfhi t_2 | 864 | mfhi t_2 |
@@ -881,6 +886,7 @@ LEAF(bn_mul_comba8) | |||
881 | sltu AT,c_2,t_1 | 886 | sltu AT,c_2,t_1 |
882 | daddu t_2,AT | 887 | daddu t_2,AT |
883 | daddu c_3,t_2 | 888 | daddu c_3,t_2 |
889 | sltu c_1,c_3,t_2 | ||
884 | dmultu a_3,b_1 /* mul_add_c(a[3],b[1],c2,c3,c1); */ | 890 | dmultu a_3,b_1 /* mul_add_c(a[3],b[1],c2,c3,c1); */ |
885 | mflo t_1 | 891 | mflo t_1 |
886 | mfhi t_2 | 892 | mfhi t_2 |
@@ -888,7 +894,8 @@ LEAF(bn_mul_comba8) | |||
888 | sltu AT,c_2,t_1 | 894 | sltu AT,c_2,t_1 |
889 | daddu t_2,AT | 895 | daddu t_2,AT |
890 | daddu c_3,t_2 | 896 | daddu c_3,t_2 |
891 | sltu c_1,c_3,t_2 | 897 | sltu AT,c_3,t_2 |
898 | daddu c_1,AT | ||
892 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | 899 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ |
893 | mflo t_1 | 900 | mflo t_1 |
894 | mfhi t_2 | 901 | mfhi t_2 |
@@ -925,6 +932,7 @@ LEAF(bn_mul_comba8) | |||
925 | sltu AT,c_3,t_1 | 932 | sltu AT,c_3,t_1 |
926 | daddu t_2,AT | 933 | daddu t_2,AT |
927 | daddu c_1,t_2 | 934 | daddu c_1,t_2 |
935 | sltu c_2,c_1,t_2 | ||
928 | dmultu a_1,b_4 /* mul_add_c(a[1],b[4],c3,c1,c2); */ | 936 | dmultu a_1,b_4 /* mul_add_c(a[1],b[4],c3,c1,c2); */ |
929 | mflo t_1 | 937 | mflo t_1 |
930 | mfhi t_2 | 938 | mfhi t_2 |
@@ -932,7 +940,8 @@ LEAF(bn_mul_comba8) | |||
932 | sltu AT,c_3,t_1 | 940 | sltu AT,c_3,t_1 |
933 | daddu t_2,AT | 941 | daddu t_2,AT |
934 | daddu c_1,t_2 | 942 | daddu c_1,t_2 |
935 | sltu c_2,c_1,t_2 | 943 | sltu AT,c_1,t_2 |
944 | daddu c_2,AT | ||
936 | dmultu a_2,b_3 /* mul_add_c(a[2],b[3],c3,c1,c2); */ | 945 | dmultu a_2,b_3 /* mul_add_c(a[2],b[3],c3,c1,c2); */ |
937 | mflo t_1 | 946 | mflo t_1 |
938 | mfhi t_2 | 947 | mfhi t_2 |
@@ -978,6 +987,7 @@ LEAF(bn_mul_comba8) | |||
978 | sltu AT,c_1,t_1 | 987 | sltu AT,c_1,t_1 |
979 | daddu t_2,AT | 988 | daddu t_2,AT |
980 | daddu c_2,t_2 | 989 | daddu c_2,t_2 |
990 | sltu c_3,c_2,t_2 | ||
981 | dmultu a_5,b_1 /* mul_add_c(a[5],b[1],c1,c2,c3); */ | 991 | dmultu a_5,b_1 /* mul_add_c(a[5],b[1],c1,c2,c3); */ |
982 | mflo t_1 | 992 | mflo t_1 |
983 | mfhi t_2 | 993 | mfhi t_2 |
@@ -985,7 +995,8 @@ LEAF(bn_mul_comba8) | |||
985 | sltu AT,c_1,t_1 | 995 | sltu AT,c_1,t_1 |
986 | daddu t_2,AT | 996 | daddu t_2,AT |
987 | daddu c_2,t_2 | 997 | daddu c_2,t_2 |
988 | sltu c_3,c_2,t_2 | 998 | sltu AT,c_2,t_2 |
999 | daddu c_3,AT | ||
989 | dmultu a_4,b_2 /* mul_add_c(a[4],b[2],c1,c2,c3); */ | 1000 | dmultu a_4,b_2 /* mul_add_c(a[4],b[2],c1,c2,c3); */ |
990 | mflo t_1 | 1001 | mflo t_1 |
991 | mfhi t_2 | 1002 | mfhi t_2 |
@@ -1040,6 +1051,7 @@ LEAF(bn_mul_comba8) | |||
1040 | sltu AT,c_2,t_1 | 1051 | sltu AT,c_2,t_1 |
1041 | daddu t_2,AT | 1052 | daddu t_2,AT |
1042 | daddu c_3,t_2 | 1053 | daddu c_3,t_2 |
1054 | sltu c_1,c_3,t_2 | ||
1043 | dmultu a_1,b_6 /* mul_add_c(a[1],b[6],c2,c3,c1); */ | 1055 | dmultu a_1,b_6 /* mul_add_c(a[1],b[6],c2,c3,c1); */ |
1044 | mflo t_1 | 1056 | mflo t_1 |
1045 | mfhi t_2 | 1057 | mfhi t_2 |
@@ -1047,7 +1059,8 @@ LEAF(bn_mul_comba8) | |||
1047 | sltu AT,c_2,t_1 | 1059 | sltu AT,c_2,t_1 |
1048 | daddu t_2,AT | 1060 | daddu t_2,AT |
1049 | daddu c_3,t_2 | 1061 | daddu c_3,t_2 |
1050 | sltu c_1,c_3,t_2 | 1062 | sltu AT,c_3,t_2 |
1063 | daddu c_1,AT | ||
1051 | dmultu a_2,b_5 /* mul_add_c(a[2],b[5],c2,c3,c1); */ | 1064 | dmultu a_2,b_5 /* mul_add_c(a[2],b[5],c2,c3,c1); */ |
1052 | mflo t_1 | 1065 | mflo t_1 |
1053 | mfhi t_2 | 1066 | mfhi t_2 |
@@ -1111,6 +1124,7 @@ LEAF(bn_mul_comba8) | |||
1111 | sltu AT,c_3,t_1 | 1124 | sltu AT,c_3,t_1 |
1112 | daddu t_2,AT | 1125 | daddu t_2,AT |
1113 | daddu c_1,t_2 | 1126 | daddu c_1,t_2 |
1127 | sltu c_2,c_1,t_2 | ||
1114 | dmultu a_6,b_2 /* mul_add_c(a[6],b[2],c3,c1,c2); */ | 1128 | dmultu a_6,b_2 /* mul_add_c(a[6],b[2],c3,c1,c2); */ |
1115 | mflo t_1 | 1129 | mflo t_1 |
1116 | mfhi t_2 | 1130 | mfhi t_2 |
@@ -1118,7 +1132,8 @@ LEAF(bn_mul_comba8) | |||
1118 | sltu AT,c_3,t_1 | 1132 | sltu AT,c_3,t_1 |
1119 | daddu t_2,AT | 1133 | daddu t_2,AT |
1120 | daddu c_1,t_2 | 1134 | daddu c_1,t_2 |
1121 | sltu c_2,c_1,t_2 | 1135 | sltu AT,c_1,t_2 |
1136 | daddu c_2,AT | ||
1122 | dmultu a_5,b_3 /* mul_add_c(a[5],b[3],c3,c1,c2); */ | 1137 | dmultu a_5,b_3 /* mul_add_c(a[5],b[3],c3,c1,c2); */ |
1123 | mflo t_1 | 1138 | mflo t_1 |
1124 | mfhi t_2 | 1139 | mfhi t_2 |
@@ -1173,6 +1188,7 @@ LEAF(bn_mul_comba8) | |||
1173 | sltu AT,c_1,t_1 | 1188 | sltu AT,c_1,t_1 |
1174 | daddu t_2,AT | 1189 | daddu t_2,AT |
1175 | daddu c_2,t_2 | 1190 | daddu c_2,t_2 |
1191 | sltu c_3,c_2,t_2 | ||
1176 | dmultu a_3,b_6 /* mul_add_c(a[3],b[6],c1,c2,c3); */ | 1192 | dmultu a_3,b_6 /* mul_add_c(a[3],b[6],c1,c2,c3); */ |
1177 | mflo t_1 | 1193 | mflo t_1 |
1178 | mfhi t_2 | 1194 | mfhi t_2 |
@@ -1180,7 +1196,8 @@ LEAF(bn_mul_comba8) | |||
1180 | sltu AT,c_1,t_1 | 1196 | sltu AT,c_1,t_1 |
1181 | daddu t_2,AT | 1197 | daddu t_2,AT |
1182 | daddu c_2,t_2 | 1198 | daddu c_2,t_2 |
1183 | sltu c_3,c_2,t_2 | 1199 | sltu AT,c_2,t_2 |
1200 | daddu c_3,AT | ||
1184 | dmultu a_4,b_5 /* mul_add_c(a[4],b[5],c1,c2,c3); */ | 1201 | dmultu a_4,b_5 /* mul_add_c(a[4],b[5],c1,c2,c3); */ |
1185 | mflo t_1 | 1202 | mflo t_1 |
1186 | mfhi t_2 | 1203 | mfhi t_2 |
@@ -1226,6 +1243,7 @@ LEAF(bn_mul_comba8) | |||
1226 | sltu AT,c_2,t_1 | 1243 | sltu AT,c_2,t_1 |
1227 | daddu t_2,AT | 1244 | daddu t_2,AT |
1228 | daddu c_3,t_2 | 1245 | daddu c_3,t_2 |
1246 | sltu c_1,c_3,t_2 | ||
1229 | dmultu a_6,b_4 /* mul_add_c(a[6],b[4],c2,c3,c1); */ | 1247 | dmultu a_6,b_4 /* mul_add_c(a[6],b[4],c2,c3,c1); */ |
1230 | mflo t_1 | 1248 | mflo t_1 |
1231 | mfhi t_2 | 1249 | mfhi t_2 |
@@ -1233,7 +1251,8 @@ LEAF(bn_mul_comba8) | |||
1233 | sltu AT,c_2,t_1 | 1251 | sltu AT,c_2,t_1 |
1234 | daddu t_2,AT | 1252 | daddu t_2,AT |
1235 | daddu c_3,t_2 | 1253 | daddu c_3,t_2 |
1236 | sltu c_1,c_3,t_2 | 1254 | sltu AT,c_3,t_2 |
1255 | daddu c_1,AT | ||
1237 | dmultu a_5,b_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */ | 1256 | dmultu a_5,b_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */ |
1238 | mflo t_1 | 1257 | mflo t_1 |
1239 | mfhi t_2 | 1258 | mfhi t_2 |
@@ -1270,6 +1289,7 @@ LEAF(bn_mul_comba8) | |||
1270 | sltu AT,c_3,t_1 | 1289 | sltu AT,c_3,t_1 |
1271 | daddu t_2,AT | 1290 | daddu t_2,AT |
1272 | daddu c_1,t_2 | 1291 | daddu c_1,t_2 |
1292 | sltu c_2,c_1,t_2 | ||
1273 | dmultu a_5,b_6 /* mul_add_c(a[5],b[6],c3,c1,c2); */ | 1293 | dmultu a_5,b_6 /* mul_add_c(a[5],b[6],c3,c1,c2); */ |
1274 | mflo t_1 | 1294 | mflo t_1 |
1275 | mfhi t_2 | 1295 | mfhi t_2 |
@@ -1277,7 +1297,8 @@ LEAF(bn_mul_comba8) | |||
1277 | sltu AT,c_3,t_1 | 1297 | sltu AT,c_3,t_1 |
1278 | daddu t_2,AT | 1298 | daddu t_2,AT |
1279 | daddu c_1,t_2 | 1299 | daddu c_1,t_2 |
1280 | sltu c_2,c_1,t_2 | 1300 | sltu AT,c_1,t_2 |
1301 | daddu c_2,AT | ||
1281 | dmultu a_6,b_5 /* mul_add_c(a[6],b[5],c3,c1,c2); */ | 1302 | dmultu a_6,b_5 /* mul_add_c(a[6],b[5],c3,c1,c2); */ |
1282 | mflo t_1 | 1303 | mflo t_1 |
1283 | mfhi t_2 | 1304 | mfhi t_2 |
@@ -1305,6 +1326,7 @@ LEAF(bn_mul_comba8) | |||
1305 | sltu AT,c_1,t_1 | 1326 | sltu AT,c_1,t_1 |
1306 | daddu t_2,AT | 1327 | daddu t_2,AT |
1307 | daddu c_2,t_2 | 1328 | daddu c_2,t_2 |
1329 | sltu c_3,c_2,t_2 | ||
1308 | dmultu a_6,b_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ | 1330 | dmultu a_6,b_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ |
1309 | mflo t_1 | 1331 | mflo t_1 |
1310 | mfhi t_2 | 1332 | mfhi t_2 |
@@ -1312,7 +1334,8 @@ LEAF(bn_mul_comba8) | |||
1312 | sltu AT,c_1,t_1 | 1334 | sltu AT,c_1,t_1 |
1313 | daddu t_2,AT | 1335 | daddu t_2,AT |
1314 | daddu c_2,t_2 | 1336 | daddu c_2,t_2 |
1315 | sltu c_3,c_2,t_2 | 1337 | sltu AT,c_2,t_2 |
1338 | daddu c_3,AT | ||
1316 | dmultu a_5,b_7 /* mul_add_c(a[5],b[7],c1,c2,c3); */ | 1339 | dmultu a_5,b_7 /* mul_add_c(a[5],b[7],c1,c2,c3); */ |
1317 | mflo t_1 | 1340 | mflo t_1 |
1318 | mfhi t_2 | 1341 | mfhi t_2 |
@@ -1331,6 +1354,7 @@ LEAF(bn_mul_comba8) | |||
1331 | sltu AT,c_2,t_1 | 1354 | sltu AT,c_2,t_1 |
1332 | daddu t_2,AT | 1355 | daddu t_2,AT |
1333 | daddu c_3,t_2 | 1356 | daddu c_3,t_2 |
1357 | sltu c_1,c_3,t_2 | ||
1334 | dmultu a_7,b_6 /* mul_add_c(a[7],b[6],c2,c3,c1); */ | 1358 | dmultu a_7,b_6 /* mul_add_c(a[7],b[6],c2,c3,c1); */ |
1335 | mflo t_1 | 1359 | mflo t_1 |
1336 | mfhi t_2 | 1360 | mfhi t_2 |
@@ -1338,7 +1362,8 @@ LEAF(bn_mul_comba8) | |||
1338 | sltu AT,c_2,t_1 | 1362 | sltu AT,c_2,t_1 |
1339 | daddu t_2,AT | 1363 | daddu t_2,AT |
1340 | daddu c_3,t_2 | 1364 | daddu c_3,t_2 |
1341 | sltu c_1,c_3,t_2 | 1365 | sltu AT,c_3,t_2 |
1366 | daddu c_1,AT | ||
1342 | sd c_2,104(a0) /* r[13]=c2; */ | 1367 | sd c_2,104(a0) /* r[13]=c2; */ |
1343 | 1368 | ||
1344 | dmultu a_7,b_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ | 1369 | dmultu a_7,b_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ |
@@ -1427,6 +1452,7 @@ LEAF(bn_mul_comba4) | |||
1427 | sltu AT,c_1,t_1 | 1452 | sltu AT,c_1,t_1 |
1428 | daddu t_2,AT | 1453 | daddu t_2,AT |
1429 | daddu c_2,t_2 | 1454 | daddu c_2,t_2 |
1455 | sltu c_3,c_2,t_2 | ||
1430 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ | 1456 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ |
1431 | mflo t_1 | 1457 | mflo t_1 |
1432 | mfhi t_2 | 1458 | mfhi t_2 |
@@ -1434,7 +1460,8 @@ LEAF(bn_mul_comba4) | |||
1434 | sltu AT,c_1,t_1 | 1460 | sltu AT,c_1,t_1 |
1435 | daddu t_2,AT | 1461 | daddu t_2,AT |
1436 | daddu c_2,t_2 | 1462 | daddu c_2,t_2 |
1437 | sltu c_3,c_2,t_2 | 1463 | sltu AT,c_2,t_2 |
1464 | daddu c_3,AT | ||
1438 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ | 1465 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ |
1439 | mflo t_1 | 1466 | mflo t_1 |
1440 | mfhi t_2 | 1467 | mfhi t_2 |
@@ -1462,6 +1489,7 @@ LEAF(bn_mul_comba4) | |||
1462 | sltu AT,c_2,t_1 | 1489 | sltu AT,c_2,t_1 |
1463 | daddu t_2,AT | 1490 | daddu t_2,AT |
1464 | daddu c_3,t_2 | 1491 | daddu c_3,t_2 |
1492 | sltu c_1,c_3,t_2 | ||
1465 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | 1493 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ |
1466 | mflo t_1 | 1494 | mflo t_1 |
1467 | mfhi t_2 | 1495 | mfhi t_2 |
@@ -1469,7 +1497,8 @@ LEAF(bn_mul_comba4) | |||
1469 | sltu AT,c_2,t_1 | 1497 | sltu AT,c_2,t_1 |
1470 | daddu t_2,AT | 1498 | daddu t_2,AT |
1471 | daddu c_3,t_2 | 1499 | daddu c_3,t_2 |
1472 | sltu c_1,c_3,t_2 | 1500 | sltu AT,c_3,t_2 |
1501 | daddu c_1,AT | ||
1473 | dmultu a_1,b_3 /* mul_add_c(a[1],b[3],c2,c3,c1); */ | 1502 | dmultu a_1,b_3 /* mul_add_c(a[1],b[3],c2,c3,c1); */ |
1474 | mflo t_1 | 1503 | mflo t_1 |
1475 | mfhi t_2 | 1504 | mfhi t_2 |
@@ -1488,6 +1517,7 @@ LEAF(bn_mul_comba4) | |||
1488 | sltu AT,c_3,t_1 | 1517 | sltu AT,c_3,t_1 |
1489 | daddu t_2,AT | 1518 | daddu t_2,AT |
1490 | daddu c_1,t_2 | 1519 | daddu c_1,t_2 |
1520 | sltu c_2,c_1,t_2 | ||
1491 | dmultu a_3,b_2 /* mul_add_c(a[3],b[2],c3,c1,c2); */ | 1521 | dmultu a_3,b_2 /* mul_add_c(a[3],b[2],c3,c1,c2); */ |
1492 | mflo t_1 | 1522 | mflo t_1 |
1493 | mfhi t_2 | 1523 | mfhi t_2 |
@@ -1495,7 +1525,8 @@ LEAF(bn_mul_comba4) | |||
1495 | sltu AT,c_3,t_1 | 1525 | sltu AT,c_3,t_1 |
1496 | daddu t_2,AT | 1526 | daddu t_2,AT |
1497 | daddu c_1,t_2 | 1527 | daddu c_1,t_2 |
1498 | sltu c_2,c_1,t_2 | 1528 | sltu AT,c_1,t_2 |
1529 | daddu c_2,AT | ||
1499 | sd c_3,40(a0) | 1530 | sd c_3,40(a0) |
1500 | 1531 | ||
1501 | dmultu a_3,b_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | 1532 | dmultu a_3,b_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ |
@@ -1540,28 +1571,30 @@ LEAF(bn_sqr_comba8) | |||
1540 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ | 1571 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ |
1541 | mflo t_1 | 1572 | mflo t_1 |
1542 | mfhi t_2 | 1573 | mfhi t_2 |
1574 | slt c_1,t_2,zero | ||
1575 | dsll t_2,1 | ||
1576 | slt a2,t_1,zero | ||
1577 | daddu t_2,a2 | ||
1578 | dsll t_1,1 | ||
1543 | daddu c_2,t_1 | 1579 | daddu c_2,t_1 |
1544 | sltu AT,c_2,t_1 | 1580 | sltu AT,c_2,t_1 |
1545 | daddu c_3,t_2,AT | 1581 | daddu c_3,t_2,AT |
1546 | daddu c_2,t_1 | ||
1547 | sltu AT,c_2,t_1 | ||
1548 | daddu t_2,AT | ||
1549 | daddu c_3,t_2 | ||
1550 | sltu c_1,c_3,t_2 | ||
1551 | sd c_2,8(a0) | 1582 | sd c_2,8(a0) |
1552 | 1583 | ||
1553 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ | 1584 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ |
1554 | mflo t_1 | 1585 | mflo t_1 |
1555 | mfhi t_2 | 1586 | mfhi t_2 |
1556 | daddu c_3,t_1 | 1587 | slt c_2,t_2,zero |
1557 | sltu AT,c_3,t_1 | 1588 | dsll t_2,1 |
1558 | daddu a2,t_2,AT | 1589 | slt a2,t_1,zero |
1559 | daddu c_1,a2 | 1590 | daddu t_2,a2 |
1591 | dsll t_1,1 | ||
1560 | daddu c_3,t_1 | 1592 | daddu c_3,t_1 |
1561 | sltu AT,c_3,t_1 | 1593 | sltu AT,c_3,t_1 |
1562 | daddu t_2,AT | 1594 | daddu t_2,AT |
1563 | daddu c_1,t_2 | 1595 | daddu c_1,t_2 |
1564 | sltu c_2,c_1,t_2 | 1596 | sltu AT,c_1,t_2 |
1597 | daddu c_2,AT | ||
1565 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | 1598 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ |
1566 | mflo t_1 | 1599 | mflo t_1 |
1567 | mfhi t_2 | 1600 | mfhi t_2 |
@@ -1576,24 +1609,26 @@ LEAF(bn_sqr_comba8) | |||
1576 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ | 1609 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ |
1577 | mflo t_1 | 1610 | mflo t_1 |
1578 | mfhi t_2 | 1611 | mfhi t_2 |
1579 | daddu c_1,t_1 | 1612 | slt c_3,t_2,zero |
1580 | sltu AT,c_1,t_1 | 1613 | dsll t_2,1 |
1581 | daddu a2,t_2,AT | 1614 | slt a2,t_1,zero |
1582 | daddu c_2,a2 | 1615 | daddu t_2,a2 |
1616 | dsll t_1,1 | ||
1583 | daddu c_1,t_1 | 1617 | daddu c_1,t_1 |
1584 | sltu AT,c_1,t_1 | 1618 | sltu AT,c_1,t_1 |
1585 | daddu t_2,AT | 1619 | daddu t_2,AT |
1586 | daddu c_2,t_2 | 1620 | daddu c_2,t_2 |
1587 | sltu c_3,c_2,t_2 | 1621 | sltu AT,c_2,t_2 |
1622 | daddu c_3,AT | ||
1588 | dmultu a_1,a_2 /* mul_add_c2(a[1],b[2],c1,c2,c3); */ | 1623 | dmultu a_1,a_2 /* mul_add_c2(a[1],b[2],c1,c2,c3); */ |
1589 | mflo t_1 | 1624 | mflo t_1 |
1590 | mfhi t_2 | 1625 | mfhi t_2 |
1591 | daddu c_1,t_1 | 1626 | slt AT,t_2,zero |
1592 | sltu AT,c_1,t_1 | ||
1593 | daddu a2,t_2,AT | ||
1594 | daddu c_2,a2 | ||
1595 | sltu AT,c_2,a2 | ||
1596 | daddu c_3,AT | 1627 | daddu c_3,AT |
1628 | dsll t_2,1 | ||
1629 | slt a2,t_1,zero | ||
1630 | daddu t_2,a2 | ||
1631 | dsll t_1,1 | ||
1597 | daddu c_1,t_1 | 1632 | daddu c_1,t_1 |
1598 | sltu AT,c_1,t_1 | 1633 | sltu AT,c_1,t_1 |
1599 | daddu t_2,AT | 1634 | daddu t_2,AT |
@@ -1605,24 +1640,26 @@ LEAF(bn_sqr_comba8) | |||
1605 | dmultu a_4,a_0 /* mul_add_c2(a[4],b[0],c2,c3,c1); */ | 1640 | dmultu a_4,a_0 /* mul_add_c2(a[4],b[0],c2,c3,c1); */ |
1606 | mflo t_1 | 1641 | mflo t_1 |
1607 | mfhi t_2 | 1642 | mfhi t_2 |
1608 | daddu c_2,t_1 | 1643 | slt c_1,t_2,zero |
1609 | sltu AT,c_2,t_1 | 1644 | dsll t_2,1 |
1610 | daddu a2,t_2,AT | 1645 | slt a2,t_1,zero |
1611 | daddu c_3,a2 | 1646 | daddu t_2,a2 |
1647 | dsll t_1,1 | ||
1612 | daddu c_2,t_1 | 1648 | daddu c_2,t_1 |
1613 | sltu AT,c_2,t_1 | 1649 | sltu AT,c_2,t_1 |
1614 | daddu t_2,AT | 1650 | daddu t_2,AT |
1615 | daddu c_3,t_2 | 1651 | daddu c_3,t_2 |
1616 | sltu c_1,c_3,t_2 | 1652 | sltu AT,c_3,t_2 |
1653 | daddu c_1,AT | ||
1617 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ | 1654 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ |
1618 | mflo t_1 | 1655 | mflo t_1 |
1619 | mfhi t_2 | 1656 | mfhi t_2 |
1620 | daddu c_2,t_1 | 1657 | slt AT,t_2,zero |
1621 | sltu AT,c_2,t_1 | ||
1622 | daddu a2,t_2,AT | ||
1623 | daddu c_3,a2 | ||
1624 | sltu AT,c_3,a2 | ||
1625 | daddu c_1,AT | 1658 | daddu c_1,AT |
1659 | dsll t_2,1 | ||
1660 | slt a2,t_1,zero | ||
1661 | daddu t_2,a2 | ||
1662 | dsll t_1,1 | ||
1626 | daddu c_2,t_1 | 1663 | daddu c_2,t_1 |
1627 | sltu AT,c_2,t_1 | 1664 | sltu AT,c_2,t_1 |
1628 | daddu t_2,AT | 1665 | daddu t_2,AT |
@@ -1643,24 +1680,26 @@ LEAF(bn_sqr_comba8) | |||
1643 | dmultu a_0,a_5 /* mul_add_c2(a[0],b[5],c3,c1,c2); */ | 1680 | dmultu a_0,a_5 /* mul_add_c2(a[0],b[5],c3,c1,c2); */ |
1644 | mflo t_1 | 1681 | mflo t_1 |
1645 | mfhi t_2 | 1682 | mfhi t_2 |
1646 | daddu c_3,t_1 | 1683 | slt c_2,t_2,zero |
1647 | sltu AT,c_3,t_1 | 1684 | dsll t_2,1 |
1648 | daddu a2,t_2,AT | 1685 | slt a2,t_1,zero |
1649 | daddu c_1,a2 | 1686 | daddu t_2,a2 |
1687 | dsll t_1,1 | ||
1650 | daddu c_3,t_1 | 1688 | daddu c_3,t_1 |
1651 | sltu AT,c_3,t_1 | 1689 | sltu AT,c_3,t_1 |
1652 | daddu t_2,AT | 1690 | daddu t_2,AT |
1653 | daddu c_1,t_2 | 1691 | daddu c_1,t_2 |
1654 | sltu c_2,c_1,t_2 | 1692 | sltu AT,c_1,t_2 |
1693 | daddu c_2,AT | ||
1655 | dmultu a_1,a_4 /* mul_add_c2(a[1],b[4],c3,c1,c2); */ | 1694 | dmultu a_1,a_4 /* mul_add_c2(a[1],b[4],c3,c1,c2); */ |
1656 | mflo t_1 | 1695 | mflo t_1 |
1657 | mfhi t_2 | 1696 | mfhi t_2 |
1658 | daddu c_3,t_1 | 1697 | slt AT,t_2,zero |
1659 | sltu AT,c_3,t_1 | ||
1660 | daddu a2,t_2,AT | ||
1661 | daddu c_1,a2 | ||
1662 | sltu AT,c_1,a2 | ||
1663 | daddu c_2,AT | 1698 | daddu c_2,AT |
1699 | dsll t_2,1 | ||
1700 | slt a2,t_1,zero | ||
1701 | daddu t_2,a2 | ||
1702 | dsll t_1,1 | ||
1664 | daddu c_3,t_1 | 1703 | daddu c_3,t_1 |
1665 | sltu AT,c_3,t_1 | 1704 | sltu AT,c_3,t_1 |
1666 | daddu t_2,AT | 1705 | daddu t_2,AT |
@@ -1670,12 +1709,12 @@ LEAF(bn_sqr_comba8) | |||
1670 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ | 1709 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ |
1671 | mflo t_1 | 1710 | mflo t_1 |
1672 | mfhi t_2 | 1711 | mfhi t_2 |
1673 | daddu c_3,t_1 | 1712 | slt AT,t_2,zero |
1674 | sltu AT,c_3,t_1 | ||
1675 | daddu a2,t_2,AT | ||
1676 | daddu c_1,a2 | ||
1677 | sltu AT,c_1,a2 | ||
1678 | daddu c_2,AT | 1713 | daddu c_2,AT |
1714 | dsll t_2,1 | ||
1715 | slt a2,t_1,zero | ||
1716 | daddu t_2,a2 | ||
1717 | dsll t_1,1 | ||
1679 | daddu c_3,t_1 | 1718 | daddu c_3,t_1 |
1680 | sltu AT,c_3,t_1 | 1719 | sltu AT,c_3,t_1 |
1681 | daddu t_2,AT | 1720 | daddu t_2,AT |
@@ -1687,24 +1726,26 @@ LEAF(bn_sqr_comba8) | |||
1687 | dmultu a_6,a_0 /* mul_add_c2(a[6],b[0],c1,c2,c3); */ | 1726 | dmultu a_6,a_0 /* mul_add_c2(a[6],b[0],c1,c2,c3); */ |
1688 | mflo t_1 | 1727 | mflo t_1 |
1689 | mfhi t_2 | 1728 | mfhi t_2 |
1690 | daddu c_1,t_1 | 1729 | slt c_3,t_2,zero |
1691 | sltu AT,c_1,t_1 | 1730 | dsll t_2,1 |
1692 | daddu a2,t_2,AT | 1731 | slt a2,t_1,zero |
1693 | daddu c_2,a2 | 1732 | daddu t_2,a2 |
1733 | dsll t_1,1 | ||
1694 | daddu c_1,t_1 | 1734 | daddu c_1,t_1 |
1695 | sltu AT,c_1,t_1 | 1735 | sltu AT,c_1,t_1 |
1696 | daddu t_2,AT | 1736 | daddu t_2,AT |
1697 | daddu c_2,t_2 | 1737 | daddu c_2,t_2 |
1698 | sltu c_3,c_2,t_2 | 1738 | sltu AT,c_2,t_2 |
1739 | daddu c_3,AT | ||
1699 | dmultu a_5,a_1 /* mul_add_c2(a[5],b[1],c1,c2,c3); */ | 1740 | dmultu a_5,a_1 /* mul_add_c2(a[5],b[1],c1,c2,c3); */ |
1700 | mflo t_1 | 1741 | mflo t_1 |
1701 | mfhi t_2 | 1742 | mfhi t_2 |
1702 | daddu c_1,t_1 | 1743 | slt AT,t_2,zero |
1703 | sltu AT,c_1,t_1 | ||
1704 | daddu a2,t_2,AT | ||
1705 | daddu c_2,a2 | ||
1706 | sltu AT,c_2,a2 | ||
1707 | daddu c_3,AT | 1744 | daddu c_3,AT |
1745 | dsll t_2,1 | ||
1746 | slt a2,t_1,zero | ||
1747 | daddu t_2,a2 | ||
1748 | dsll t_1,1 | ||
1708 | daddu c_1,t_1 | 1749 | daddu c_1,t_1 |
1709 | sltu AT,c_1,t_1 | 1750 | sltu AT,c_1,t_1 |
1710 | daddu t_2,AT | 1751 | daddu t_2,AT |
@@ -1714,12 +1755,12 @@ LEAF(bn_sqr_comba8) | |||
1714 | dmultu a_4,a_2 /* mul_add_c2(a[4],b[2],c1,c2,c3); */ | 1755 | dmultu a_4,a_2 /* mul_add_c2(a[4],b[2],c1,c2,c3); */ |
1715 | mflo t_1 | 1756 | mflo t_1 |
1716 | mfhi t_2 | 1757 | mfhi t_2 |
1717 | daddu c_1,t_1 | 1758 | slt AT,t_2,zero |
1718 | sltu AT,c_1,t_1 | ||
1719 | daddu a2,t_2,AT | ||
1720 | daddu c_2,a2 | ||
1721 | sltu AT,c_2,a2 | ||
1722 | daddu c_3,AT | 1759 | daddu c_3,AT |
1760 | dsll t_2,1 | ||
1761 | slt a2,t_1,zero | ||
1762 | daddu t_2,a2 | ||
1763 | dsll t_1,1 | ||
1723 | daddu c_1,t_1 | 1764 | daddu c_1,t_1 |
1724 | sltu AT,c_1,t_1 | 1765 | sltu AT,c_1,t_1 |
1725 | daddu t_2,AT | 1766 | daddu t_2,AT |
@@ -1740,24 +1781,26 @@ LEAF(bn_sqr_comba8) | |||
1740 | dmultu a_0,a_7 /* mul_add_c2(a[0],b[7],c2,c3,c1); */ | 1781 | dmultu a_0,a_7 /* mul_add_c2(a[0],b[7],c2,c3,c1); */ |
1741 | mflo t_1 | 1782 | mflo t_1 |
1742 | mfhi t_2 | 1783 | mfhi t_2 |
1743 | daddu c_2,t_1 | 1784 | slt c_1,t_2,zero |
1744 | sltu AT,c_2,t_1 | 1785 | dsll t_2,1 |
1745 | daddu a2,t_2,AT | 1786 | slt a2,t_1,zero |
1746 | daddu c_3,a2 | 1787 | daddu t_2,a2 |
1788 | dsll t_1,1 | ||
1747 | daddu c_2,t_1 | 1789 | daddu c_2,t_1 |
1748 | sltu AT,c_2,t_1 | 1790 | sltu AT,c_2,t_1 |
1749 | daddu t_2,AT | 1791 | daddu t_2,AT |
1750 | daddu c_3,t_2 | 1792 | daddu c_3,t_2 |
1751 | sltu c_1,c_3,t_2 | 1793 | sltu AT,c_3,t_2 |
1794 | daddu c_1,AT | ||
1752 | dmultu a_1,a_6 /* mul_add_c2(a[1],b[6],c2,c3,c1); */ | 1795 | dmultu a_1,a_6 /* mul_add_c2(a[1],b[6],c2,c3,c1); */ |
1753 | mflo t_1 | 1796 | mflo t_1 |
1754 | mfhi t_2 | 1797 | mfhi t_2 |
1755 | daddu c_2,t_1 | 1798 | slt AT,t_2,zero |
1756 | sltu AT,c_2,t_1 | ||
1757 | daddu a2,t_2,AT | ||
1758 | daddu c_3,a2 | ||
1759 | sltu AT,c_3,a2 | ||
1760 | daddu c_1,AT | 1799 | daddu c_1,AT |
1800 | dsll t_2,1 | ||
1801 | slt a2,t_1,zero | ||
1802 | daddu t_2,a2 | ||
1803 | dsll t_1,1 | ||
1761 | daddu c_2,t_1 | 1804 | daddu c_2,t_1 |
1762 | sltu AT,c_2,t_1 | 1805 | sltu AT,c_2,t_1 |
1763 | daddu t_2,AT | 1806 | daddu t_2,AT |
@@ -1767,12 +1810,12 @@ LEAF(bn_sqr_comba8) | |||
1767 | dmultu a_2,a_5 /* mul_add_c2(a[2],b[5],c2,c3,c1); */ | 1810 | dmultu a_2,a_5 /* mul_add_c2(a[2],b[5],c2,c3,c1); */ |
1768 | mflo t_1 | 1811 | mflo t_1 |
1769 | mfhi t_2 | 1812 | mfhi t_2 |
1770 | daddu c_2,t_1 | 1813 | slt AT,t_2,zero |
1771 | sltu AT,c_2,t_1 | ||
1772 | daddu a2,t_2,AT | ||
1773 | daddu c_3,a2 | ||
1774 | sltu AT,c_3,a2 | ||
1775 | daddu c_1,AT | 1814 | daddu c_1,AT |
1815 | dsll t_2,1 | ||
1816 | slt a2,t_1,zero | ||
1817 | daddu t_2,a2 | ||
1818 | dsll t_1,1 | ||
1776 | daddu c_2,t_1 | 1819 | daddu c_2,t_1 |
1777 | sltu AT,c_2,t_1 | 1820 | sltu AT,c_2,t_1 |
1778 | daddu t_2,AT | 1821 | daddu t_2,AT |
@@ -1782,12 +1825,12 @@ LEAF(bn_sqr_comba8) | |||
1782 | dmultu a_3,a_4 /* mul_add_c2(a[3],b[4],c2,c3,c1); */ | 1825 | dmultu a_3,a_4 /* mul_add_c2(a[3],b[4],c2,c3,c1); */ |
1783 | mflo t_1 | 1826 | mflo t_1 |
1784 | mfhi t_2 | 1827 | mfhi t_2 |
1785 | daddu c_2,t_1 | 1828 | slt AT,t_2,zero |
1786 | sltu AT,c_2,t_1 | ||
1787 | daddu a2,t_2,AT | ||
1788 | daddu c_3,a2 | ||
1789 | sltu AT,c_3,a2 | ||
1790 | daddu c_1,AT | 1829 | daddu c_1,AT |
1830 | dsll t_2,1 | ||
1831 | slt a2,t_1,zero | ||
1832 | daddu t_2,a2 | ||
1833 | dsll t_1,1 | ||
1791 | daddu c_2,t_1 | 1834 | daddu c_2,t_1 |
1792 | sltu AT,c_2,t_1 | 1835 | sltu AT,c_2,t_1 |
1793 | daddu t_2,AT | 1836 | daddu t_2,AT |
@@ -1799,24 +1842,26 @@ LEAF(bn_sqr_comba8) | |||
1799 | dmultu a_7,a_1 /* mul_add_c2(a[7],b[1],c3,c1,c2); */ | 1842 | dmultu a_7,a_1 /* mul_add_c2(a[7],b[1],c3,c1,c2); */ |
1800 | mflo t_1 | 1843 | mflo t_1 |
1801 | mfhi t_2 | 1844 | mfhi t_2 |
1802 | daddu c_3,t_1 | 1845 | slt c_2,t_2,zero |
1803 | sltu AT,c_3,t_1 | 1846 | dsll t_2,1 |
1804 | daddu a2,t_2,AT | 1847 | slt a2,t_1,zero |
1805 | daddu c_1,a2 | 1848 | daddu t_2,a2 |
1849 | dsll t_1,1 | ||
1806 | daddu c_3,t_1 | 1850 | daddu c_3,t_1 |
1807 | sltu AT,c_3,t_1 | 1851 | sltu AT,c_3,t_1 |
1808 | daddu t_2,AT | 1852 | daddu t_2,AT |
1809 | daddu c_1,t_2 | 1853 | daddu c_1,t_2 |
1810 | sltu c_2,c_1,t_2 | 1854 | sltu AT,c_1,t_2 |
1855 | daddu c_2,AT | ||
1811 | dmultu a_6,a_2 /* mul_add_c2(a[6],b[2],c3,c1,c2); */ | 1856 | dmultu a_6,a_2 /* mul_add_c2(a[6],b[2],c3,c1,c2); */ |
1812 | mflo t_1 | 1857 | mflo t_1 |
1813 | mfhi t_2 | 1858 | mfhi t_2 |
1814 | daddu c_3,t_1 | 1859 | slt AT,t_2,zero |
1815 | sltu AT,c_3,t_1 | ||
1816 | daddu a2,t_2,AT | ||
1817 | daddu c_1,a2 | ||
1818 | sltu AT,c_1,a2 | ||
1819 | daddu c_2,AT | 1860 | daddu c_2,AT |
1861 | dsll t_2,1 | ||
1862 | slt a2,t_1,zero | ||
1863 | daddu t_2,a2 | ||
1864 | dsll t_1,1 | ||
1820 | daddu c_3,t_1 | 1865 | daddu c_3,t_1 |
1821 | sltu AT,c_3,t_1 | 1866 | sltu AT,c_3,t_1 |
1822 | daddu t_2,AT | 1867 | daddu t_2,AT |
@@ -1826,12 +1871,12 @@ LEAF(bn_sqr_comba8) | |||
1826 | dmultu a_5,a_3 /* mul_add_c2(a[5],b[3],c3,c1,c2); */ | 1871 | dmultu a_5,a_3 /* mul_add_c2(a[5],b[3],c3,c1,c2); */ |
1827 | mflo t_1 | 1872 | mflo t_1 |
1828 | mfhi t_2 | 1873 | mfhi t_2 |
1829 | daddu c_3,t_1 | 1874 | slt AT,t_2,zero |
1830 | sltu AT,c_3,t_1 | ||
1831 | daddu a2,t_2,AT | ||
1832 | daddu c_1,a2 | ||
1833 | sltu AT,c_1,a2 | ||
1834 | daddu c_2,AT | 1875 | daddu c_2,AT |
1876 | dsll t_2,1 | ||
1877 | slt a2,t_1,zero | ||
1878 | daddu t_2,a2 | ||
1879 | dsll t_1,1 | ||
1835 | daddu c_3,t_1 | 1880 | daddu c_3,t_1 |
1836 | sltu AT,c_3,t_1 | 1881 | sltu AT,c_3,t_1 |
1837 | daddu t_2,AT | 1882 | daddu t_2,AT |
@@ -1852,24 +1897,26 @@ LEAF(bn_sqr_comba8) | |||
1852 | dmultu a_2,a_7 /* mul_add_c2(a[2],b[7],c1,c2,c3); */ | 1897 | dmultu a_2,a_7 /* mul_add_c2(a[2],b[7],c1,c2,c3); */ |
1853 | mflo t_1 | 1898 | mflo t_1 |
1854 | mfhi t_2 | 1899 | mfhi t_2 |
1855 | daddu c_1,t_1 | 1900 | slt c_3,t_2,zero |
1856 | sltu AT,c_1,t_1 | 1901 | dsll t_2,1 |
1857 | daddu a2,t_2,AT | 1902 | slt a2,t_1,zero |
1858 | daddu c_2,a2 | 1903 | daddu t_2,a2 |
1904 | dsll t_1,1 | ||
1859 | daddu c_1,t_1 | 1905 | daddu c_1,t_1 |
1860 | sltu AT,c_1,t_1 | 1906 | sltu AT,c_1,t_1 |
1861 | daddu t_2,AT | 1907 | daddu t_2,AT |
1862 | daddu c_2,t_2 | 1908 | daddu c_2,t_2 |
1863 | sltu c_3,c_2,t_2 | 1909 | sltu AT,c_2,t_2 |
1910 | daddu c_3,AT | ||
1864 | dmultu a_3,a_6 /* mul_add_c2(a[3],b[6],c1,c2,c3); */ | 1911 | dmultu a_3,a_6 /* mul_add_c2(a[3],b[6],c1,c2,c3); */ |
1865 | mflo t_1 | 1912 | mflo t_1 |
1866 | mfhi t_2 | 1913 | mfhi t_2 |
1867 | daddu c_1,t_1 | 1914 | slt AT,t_2,zero |
1868 | sltu AT,c_1,t_1 | ||
1869 | daddu a2,t_2,AT | ||
1870 | daddu c_2,a2 | ||
1871 | sltu AT,c_2,a2 | ||
1872 | daddu c_3,AT | 1915 | daddu c_3,AT |
1916 | dsll t_2,1 | ||
1917 | slt a2,t_1,zero | ||
1918 | daddu t_2,a2 | ||
1919 | dsll t_1,1 | ||
1873 | daddu c_1,t_1 | 1920 | daddu c_1,t_1 |
1874 | sltu AT,c_1,t_1 | 1921 | sltu AT,c_1,t_1 |
1875 | daddu t_2,AT | 1922 | daddu t_2,AT |
@@ -1879,12 +1926,12 @@ LEAF(bn_sqr_comba8) | |||
1879 | dmultu a_4,a_5 /* mul_add_c2(a[4],b[5],c1,c2,c3); */ | 1926 | dmultu a_4,a_5 /* mul_add_c2(a[4],b[5],c1,c2,c3); */ |
1880 | mflo t_1 | 1927 | mflo t_1 |
1881 | mfhi t_2 | 1928 | mfhi t_2 |
1882 | daddu c_1,t_1 | 1929 | slt AT,t_2,zero |
1883 | sltu AT,c_1,t_1 | ||
1884 | daddu a2,t_2,AT | ||
1885 | daddu c_2,a2 | ||
1886 | sltu AT,c_2,a2 | ||
1887 | daddu c_3,AT | 1930 | daddu c_3,AT |
1931 | dsll t_2,1 | ||
1932 | slt a2,t_1,zero | ||
1933 | daddu t_2,a2 | ||
1934 | dsll t_1,1 | ||
1888 | daddu c_1,t_1 | 1935 | daddu c_1,t_1 |
1889 | sltu AT,c_1,t_1 | 1936 | sltu AT,c_1,t_1 |
1890 | daddu t_2,AT | 1937 | daddu t_2,AT |
@@ -1896,24 +1943,26 @@ LEAF(bn_sqr_comba8) | |||
1896 | dmultu a_7,a_3 /* mul_add_c2(a[7],b[3],c2,c3,c1); */ | 1943 | dmultu a_7,a_3 /* mul_add_c2(a[7],b[3],c2,c3,c1); */ |
1897 | mflo t_1 | 1944 | mflo t_1 |
1898 | mfhi t_2 | 1945 | mfhi t_2 |
1899 | daddu c_2,t_1 | 1946 | slt c_1,t_2,zero |
1900 | sltu AT,c_2,t_1 | 1947 | dsll t_2,1 |
1901 | daddu a2,t_2,AT | 1948 | slt a2,t_1,zero |
1902 | daddu c_3,a2 | 1949 | daddu t_2,a2 |
1950 | dsll t_1,1 | ||
1903 | daddu c_2,t_1 | 1951 | daddu c_2,t_1 |
1904 | sltu AT,c_2,t_1 | 1952 | sltu AT,c_2,t_1 |
1905 | daddu t_2,AT | 1953 | daddu t_2,AT |
1906 | daddu c_3,t_2 | 1954 | daddu c_3,t_2 |
1907 | sltu c_1,c_3,t_2 | 1955 | sltu AT,c_3,t_2 |
1956 | daddu c_1,AT | ||
1908 | dmultu a_6,a_4 /* mul_add_c2(a[6],b[4],c2,c3,c1); */ | 1957 | dmultu a_6,a_4 /* mul_add_c2(a[6],b[4],c2,c3,c1); */ |
1909 | mflo t_1 | 1958 | mflo t_1 |
1910 | mfhi t_2 | 1959 | mfhi t_2 |
1911 | daddu c_2,t_1 | 1960 | slt AT,t_2,zero |
1912 | sltu AT,c_2,t_1 | ||
1913 | daddu a2,t_2,AT | ||
1914 | daddu c_3,a2 | ||
1915 | sltu AT,c_3,a2 | ||
1916 | daddu c_1,AT | 1961 | daddu c_1,AT |
1962 | dsll t_2,1 | ||
1963 | slt a2,t_1,zero | ||
1964 | daddu t_2,a2 | ||
1965 | dsll t_1,1 | ||
1917 | daddu c_2,t_1 | 1966 | daddu c_2,t_1 |
1918 | sltu AT,c_2,t_1 | 1967 | sltu AT,c_2,t_1 |
1919 | daddu t_2,AT | 1968 | daddu t_2,AT |
@@ -1934,24 +1983,26 @@ LEAF(bn_sqr_comba8) | |||
1934 | dmultu a_4,a_7 /* mul_add_c2(a[4],b[7],c3,c1,c2); */ | 1983 | dmultu a_4,a_7 /* mul_add_c2(a[4],b[7],c3,c1,c2); */ |
1935 | mflo t_1 | 1984 | mflo t_1 |
1936 | mfhi t_2 | 1985 | mfhi t_2 |
1937 | daddu c_3,t_1 | 1986 | slt c_2,t_2,zero |
1938 | sltu AT,c_3,t_1 | 1987 | dsll t_2,1 |
1939 | daddu a2,t_2,AT | 1988 | slt a2,t_1,zero |
1940 | daddu c_1,a2 | 1989 | daddu t_2,a2 |
1990 | dsll t_1,1 | ||
1941 | daddu c_3,t_1 | 1991 | daddu c_3,t_1 |
1942 | sltu AT,c_3,t_1 | 1992 | sltu AT,c_3,t_1 |
1943 | daddu t_2,AT | 1993 | daddu t_2,AT |
1944 | daddu c_1,t_2 | 1994 | daddu c_1,t_2 |
1945 | sltu c_2,c_1,t_2 | 1995 | sltu AT,c_1,t_2 |
1996 | daddu c_2,AT | ||
1946 | dmultu a_5,a_6 /* mul_add_c2(a[5],b[6],c3,c1,c2); */ | 1997 | dmultu a_5,a_6 /* mul_add_c2(a[5],b[6],c3,c1,c2); */ |
1947 | mflo t_1 | 1998 | mflo t_1 |
1948 | mfhi t_2 | 1999 | mfhi t_2 |
1949 | daddu c_3,t_1 | 2000 | slt AT,t_2,zero |
1950 | sltu AT,c_3,t_1 | ||
1951 | daddu a2,t_2,AT | ||
1952 | daddu c_1,a2 | ||
1953 | sltu AT,c_1,a2 | ||
1954 | daddu c_2,AT | 2001 | daddu c_2,AT |
2002 | dsll t_2,1 | ||
2003 | slt a2,t_1,zero | ||
2004 | daddu t_2,a2 | ||
2005 | dsll t_1,1 | ||
1955 | daddu c_3,t_1 | 2006 | daddu c_3,t_1 |
1956 | sltu AT,c_3,t_1 | 2007 | sltu AT,c_3,t_1 |
1957 | daddu t_2,AT | 2008 | daddu t_2,AT |
@@ -1963,15 +2014,17 @@ LEAF(bn_sqr_comba8) | |||
1963 | dmultu a_7,a_5 /* mul_add_c2(a[7],b[5],c1,c2,c3); */ | 2014 | dmultu a_7,a_5 /* mul_add_c2(a[7],b[5],c1,c2,c3); */ |
1964 | mflo t_1 | 2015 | mflo t_1 |
1965 | mfhi t_2 | 2016 | mfhi t_2 |
1966 | daddu c_1,t_1 | 2017 | slt c_3,t_2,zero |
1967 | sltu AT,c_1,t_1 | 2018 | dsll t_2,1 |
1968 | daddu a2,t_2,AT | 2019 | slt a2,t_1,zero |
1969 | daddu c_2,a2 | 2020 | daddu t_2,a2 |
2021 | dsll t_1,1 | ||
1970 | daddu c_1,t_1 | 2022 | daddu c_1,t_1 |
1971 | sltu AT,c_1,t_1 | 2023 | sltu AT,c_1,t_1 |
1972 | daddu t_2,AT | 2024 | daddu t_2,AT |
1973 | daddu c_2,t_2 | 2025 | daddu c_2,t_2 |
1974 | sltu c_3,c_2,t_2 | 2026 | sltu AT,c_2,t_2 |
2027 | daddu c_3,AT | ||
1975 | dmultu a_6,a_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ | 2028 | dmultu a_6,a_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ |
1976 | mflo t_1 | 2029 | mflo t_1 |
1977 | mfhi t_2 | 2030 | mfhi t_2 |
@@ -1986,15 +2039,17 @@ LEAF(bn_sqr_comba8) | |||
1986 | dmultu a_6,a_7 /* mul_add_c2(a[6],b[7],c2,c3,c1); */ | 2039 | dmultu a_6,a_7 /* mul_add_c2(a[6],b[7],c2,c3,c1); */ |
1987 | mflo t_1 | 2040 | mflo t_1 |
1988 | mfhi t_2 | 2041 | mfhi t_2 |
1989 | daddu c_2,t_1 | 2042 | slt c_1,t_2,zero |
1990 | sltu AT,c_2,t_1 | 2043 | dsll t_2,1 |
1991 | daddu a2,t_2,AT | 2044 | slt a2,t_1,zero |
1992 | daddu c_3,a2 | 2045 | daddu t_2,a2 |
2046 | dsll t_1,1 | ||
1993 | daddu c_2,t_1 | 2047 | daddu c_2,t_1 |
1994 | sltu AT,c_2,t_1 | 2048 | sltu AT,c_2,t_1 |
1995 | daddu t_2,AT | 2049 | daddu t_2,AT |
1996 | daddu c_3,t_2 | 2050 | daddu c_3,t_2 |
1997 | sltu c_1,c_3,t_2 | 2051 | sltu AT,c_3,t_2 |
2052 | daddu c_1,AT | ||
1998 | sd c_2,104(a0) | 2053 | sd c_2,104(a0) |
1999 | 2054 | ||
2000 | dmultu a_7,a_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ | 2055 | dmultu a_7,a_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ |
@@ -2025,28 +2080,30 @@ LEAF(bn_sqr_comba4) | |||
2025 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ | 2080 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ |
2026 | mflo t_1 | 2081 | mflo t_1 |
2027 | mfhi t_2 | 2082 | mfhi t_2 |
2083 | slt c_1,t_2,zero | ||
2084 | dsll t_2,1 | ||
2085 | slt a2,t_1,zero | ||
2086 | daddu t_2,a2 | ||
2087 | dsll t_1,1 | ||
2028 | daddu c_2,t_1 | 2088 | daddu c_2,t_1 |
2029 | sltu AT,c_2,t_1 | 2089 | sltu AT,c_2,t_1 |
2030 | daddu c_3,t_2,AT | 2090 | daddu c_3,t_2,AT |
2031 | daddu c_2,t_1 | ||
2032 | sltu AT,c_2,t_1 | ||
2033 | daddu t_2,AT | ||
2034 | daddu c_3,t_2 | ||
2035 | sltu c_1,c_3,t_2 | ||
2036 | sd c_2,8(a0) | 2091 | sd c_2,8(a0) |
2037 | 2092 | ||
2038 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ | 2093 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ |
2039 | mflo t_1 | 2094 | mflo t_1 |
2040 | mfhi t_2 | 2095 | mfhi t_2 |
2041 | daddu c_3,t_1 | 2096 | slt c_2,t_2,zero |
2042 | sltu AT,c_3,t_1 | 2097 | dsll t_2,1 |
2043 | daddu a2,t_2,AT | 2098 | slt a2,t_1,zero |
2044 | daddu c_1,a2 | 2099 | daddu t_2,a2 |
2100 | dsll t_1,1 | ||
2045 | daddu c_3,t_1 | 2101 | daddu c_3,t_1 |
2046 | sltu AT,c_3,t_1 | 2102 | sltu AT,c_3,t_1 |
2047 | daddu t_2,AT | 2103 | daddu t_2,AT |
2048 | daddu c_1,t_2 | 2104 | daddu c_1,t_2 |
2049 | sltu c_2,c_1,t_2 | 2105 | sltu AT,c_1,t_2 |
2106 | daddu c_2,AT | ||
2050 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | 2107 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ |
2051 | mflo t_1 | 2108 | mflo t_1 |
2052 | mfhi t_2 | 2109 | mfhi t_2 |
@@ -2061,24 +2118,26 @@ LEAF(bn_sqr_comba4) | |||
2061 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ | 2118 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ |
2062 | mflo t_1 | 2119 | mflo t_1 |
2063 | mfhi t_2 | 2120 | mfhi t_2 |
2064 | daddu c_1,t_1 | 2121 | slt c_3,t_2,zero |
2065 | sltu AT,c_1,t_1 | 2122 | dsll t_2,1 |
2066 | daddu a2,t_2,AT | 2123 | slt a2,t_1,zero |
2067 | daddu c_2,a2 | 2124 | daddu t_2,a2 |
2125 | dsll t_1,1 | ||
2068 | daddu c_1,t_1 | 2126 | daddu c_1,t_1 |
2069 | sltu AT,c_1,t_1 | 2127 | sltu AT,c_1,t_1 |
2070 | daddu t_2,AT | 2128 | daddu t_2,AT |
2071 | daddu c_2,t_2 | 2129 | daddu c_2,t_2 |
2072 | sltu c_3,c_2,t_2 | 2130 | sltu AT,c_2,t_2 |
2131 | daddu c_3,AT | ||
2073 | dmultu a_1,a_2 /* mul_add_c(a2[1],b[2],c1,c2,c3); */ | 2132 | dmultu a_1,a_2 /* mul_add_c(a2[1],b[2],c1,c2,c3); */ |
2074 | mflo t_1 | 2133 | mflo t_1 |
2075 | mfhi t_2 | 2134 | mfhi t_2 |
2076 | daddu c_1,t_1 | 2135 | slt AT,t_2,zero |
2077 | sltu AT,c_1,t_1 | ||
2078 | daddu a2,t_2,AT | ||
2079 | daddu c_2,a2 | ||
2080 | sltu AT,c_2,a2 | ||
2081 | daddu c_3,AT | 2136 | daddu c_3,AT |
2137 | dsll t_2,1 | ||
2138 | slt a2,t_1,zero | ||
2139 | daddu t_2,a2 | ||
2140 | dsll t_1,1 | ||
2082 | daddu c_1,t_1 | 2141 | daddu c_1,t_1 |
2083 | sltu AT,c_1,t_1 | 2142 | sltu AT,c_1,t_1 |
2084 | daddu t_2,AT | 2143 | daddu t_2,AT |
@@ -2090,15 +2149,17 @@ LEAF(bn_sqr_comba4) | |||
2090 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ | 2149 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ |
2091 | mflo t_1 | 2150 | mflo t_1 |
2092 | mfhi t_2 | 2151 | mfhi t_2 |
2093 | daddu c_2,t_1 | 2152 | slt c_1,t_2,zero |
2094 | sltu AT,c_2,t_1 | 2153 | dsll t_2,1 |
2095 | daddu a2,t_2,AT | 2154 | slt a2,t_1,zero |
2096 | daddu c_3,a2 | 2155 | daddu t_2,a2 |
2156 | dsll t_1,1 | ||
2097 | daddu c_2,t_1 | 2157 | daddu c_2,t_1 |
2098 | sltu AT,c_2,t_1 | 2158 | sltu AT,c_2,t_1 |
2099 | daddu t_2,AT | 2159 | daddu t_2,AT |
2100 | daddu c_3,t_2 | 2160 | daddu c_3,t_2 |
2101 | sltu c_1,c_3,t_2 | 2161 | sltu AT,c_3,t_2 |
2162 | daddu c_1,AT | ||
2102 | dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | 2163 | dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ |
2103 | mflo t_1 | 2164 | mflo t_1 |
2104 | mfhi t_2 | 2165 | mfhi t_2 |
@@ -2113,15 +2174,17 @@ LEAF(bn_sqr_comba4) | |||
2113 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ | 2174 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ |
2114 | mflo t_1 | 2175 | mflo t_1 |
2115 | mfhi t_2 | 2176 | mfhi t_2 |
2116 | daddu c_3,t_1 | 2177 | slt c_2,t_2,zero |
2117 | sltu AT,c_3,t_1 | 2178 | dsll t_2,1 |
2118 | daddu a2,t_2,AT | 2179 | slt a2,t_1,zero |
2119 | daddu c_1,a2 | 2180 | daddu t_2,a2 |
2181 | dsll t_1,1 | ||
2120 | daddu c_3,t_1 | 2182 | daddu c_3,t_1 |
2121 | sltu AT,c_3,t_1 | 2183 | sltu AT,c_3,t_1 |
2122 | daddu t_2,AT | 2184 | daddu t_2,AT |
2123 | daddu c_1,t_2 | 2185 | daddu c_1,t_2 |
2124 | sltu c_2,c_1,t_2 | 2186 | sltu AT,c_1,t_2 |
2187 | daddu c_2,AT | ||
2125 | sd c_3,40(a0) | 2188 | sd c_3,40(a0) |
2126 | 2189 | ||
2127 | dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | 2190 | dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ |
diff --git a/src/lib/libcrypto/bn/asm/vms.mar b/src/lib/libcrypto/bn/asm/vms.mar index ac9d57d7b0..465f2774b6 100644 --- a/src/lib/libcrypto/bn/asm/vms.mar +++ b/src/lib/libcrypto/bn/asm/vms.mar | |||
@@ -162,442 +162,237 @@ n=12 ;(AP) n by value (input) | |||
162 | movl #1,r0 ; return SS$_NORMAL | 162 | movl #1,r0 ; return SS$_NORMAL |
163 | ret | 163 | ret |
164 | 164 | ||
165 | .title (generated) | 165 | .title vax_bn_div_words unsigned divide |
166 | 166 | ; | |
167 | .psect code,nowrt | 167 | ; Richard Levitte 20-Nov-2000 |
168 | 168 | ; | |
169 | .entry BN_DIV_WORDS,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10> | 169 | ; ULONG bn_div_words(ULONG h, ULONG l, ULONG d) |
170 | subl2 #4,sp | 170 | ; { |
171 | 171 | ; return ((ULONG)((((ULLONG)h)<<32)|l) / (ULLONG)d); | |
172 | clrl r9 | 172 | ; } |
173 | movl #2,r8 | 173 | ; |
174 | 174 | ; Using EDIV would be very easy, if it didn't do signed calculations. | |
175 | tstl 12(ap) | 175 | ; Therefore, som extra things have to happen around it. The way to |
176 | bneq noname.2 | 176 | ; handle that is to shift all operands right one step (basically dividing |
177 | mnegl #1,r10 | 177 | ; them by 2) and handle the different cases depending on what the lowest |
178 | brw noname.3 | 178 | ; bit of each operand was. |
179 | tstl r0 | 179 | ; |
180 | nop | 180 | ; To start with, let's define the following: |
181 | noname.2: | 181 | ; |
182 | 182 | ; a' = l & 1 | |
183 | pushl 12(ap) | 183 | ; a2 = <h,l> >> 1 # UNSIGNED shift! |
184 | calls #1,BN_NUM_BITS_WORD | 184 | ; b' = d & 1 |
185 | movl r0,r7 | 185 | ; b2 = d >> 1 # UNSIGNED shift! |
186 | 186 | ; | |
187 | cmpl r7,#32 | 187 | ; Now, use EDIV to calculate a quotient and a remainder: |
188 | beql noname.4 | 188 | ; |
189 | ashl r7,#1,r2 | 189 | ; q'' = a2/b2 |
190 | cmpl 4(ap),r2 | 190 | ; r'' = a2 - q''*b2 |
191 | blequ noname.4 | 191 | ; |
192 | 192 | ; If b' is 0, the quotient is already correct, we just need to adjust the | |
193 | pushl r7 | 193 | ; remainder: |
194 | calls #1,BN_DIV_WORDS_ABORT | 194 | ; |
195 | noname.4: | 195 | ; if (b' == 0) |
196 | 196 | ; { | |
197 | subl3 r7,#32,r7 | 197 | ; r = 2*r'' + a' |
198 | 198 | ; q = q'' | |
199 | movl 12(ap),r2 | 199 | ; } |
200 | cmpl 4(ap),r2 | 200 | ; |
201 | blssu noname.5 | 201 | ; If b' is 1, we need to do other adjustements. The first thought is the |
202 | subl2 r2,4(ap) | 202 | ; following (note that r' will not always have the right value, but an |
203 | noname.5: | 203 | ; adjustement follows further down): |
204 | 204 | ; | |
205 | tstl r7 | 205 | ; if (b' == 1) |
206 | beql noname.6 | 206 | ; { |
207 | 207 | ; q' = q'' | |
208 | ashl r7,r2,12(ap) | 208 | ; r' = a - q'*b |
209 | 209 | ; | |
210 | ashl r7,4(ap),r4 | 210 | ; However, one can note the folowing relationship: |
211 | subl3 r7,#32,r3 | 211 | ; |
212 | subl3 r3,#32,r2 | 212 | ; r'' = a2 - q''*b2 |
213 | extzv r3,r2,8(ap),r2 | 213 | ; => 2*r'' = 2*a2 - 2*q''*b2 |
214 | bisl3 r4,r2,4(ap) | 214 | ; = { a = 2*a2 + a', b = 2*b2 + b' = 2*b2 + 1, |
215 | 215 | ; q' = q'' } | |
216 | ashl r7,8(ap),8(ap) | 216 | ; = a - a' - q'*(b - 1) |
217 | noname.6: | 217 | ; = a - q'*b - a' + q' |
218 | 218 | ; = r' - a' + q' | |
219 | bicl3 #65535,12(ap),r2 | 219 | ; => r' = 2*r'' - q' + a' |
220 | extzv #16,#16,r2,r5 | 220 | ; |
221 | 221 | ; This enables us to use r'' instead of discarding and calculating another | |
222 | bicl3 #-65536,12(ap),r6 | 222 | ; modulo: |
223 | 223 | ; | |
224 | noname.7: | 224 | ; if (b' == 1) |
225 | 225 | ; { | |
226 | moval 4(ap),r2 | 226 | ; q' = q'' |
227 | movzwl 2(r2),r0 | 227 | ; r' = (r'' << 1) - q' + a' |
228 | cmpl r0,r5 | 228 | ; |
229 | bneq noname.8 | 229 | ; Now, all we have to do is adjust r', because it might be < 0: |
230 | 230 | ; | |
231 | movzwl #65535,r4 | 231 | ; while (r' < 0) |
232 | brb noname.9 | 232 | ; { |
233 | noname.8: | 233 | ; r' = r' + b |
234 | 234 | ; q' = q' - 1 | |
235 | clrl r1 | 235 | ; } |
236 | movl (r2),r0 | 236 | ; } |
237 | movl r5,r2 | 237 | ; |
238 | bgeq vcg.1 | 238 | ; return q' |
239 | cmpl r2,r0 | ||
240 | bgtru vcg.2 | ||
241 | incl r1 | ||
242 | brb vcg.2 | ||
243 | nop | ||
244 | vcg.1: | ||
245 | ediv r2,r0,r1,r0 | ||
246 | vcg.2: | ||
247 | movl r1,r4 | ||
248 | noname.9: | ||
249 | |||
250 | noname.10: | ||
251 | |||
252 | mull3 r5,r4,r0 | ||
253 | subl3 r0,4(ap),r3 | ||
254 | |||
255 | bicl3 #65535,r3,r0 | ||
256 | bneq noname.13 | ||
257 | mull3 r6,r4,r2 | ||
258 | ashl #16,r3,r1 | ||
259 | bicl3 #65535,8(ap),r0 | ||
260 | extzv #16,#16,r0,r0 | ||
261 | addl2 r0,r1 | ||
262 | cmpl r2,r1 | ||
263 | bgtru noname.12 | ||
264 | noname.11: | ||
265 | |||
266 | brb noname.13 | ||
267 | nop | ||
268 | noname.12: | ||
269 | |||
270 | decl r4 | ||
271 | brb noname.10 | ||
272 | noname.13: | ||
273 | |||
274 | mull3 r5,r4,r1 | ||
275 | |||
276 | mull3 r6,r4,r0 | ||
277 | |||
278 | extzv #16,#16,r0,r3 | ||
279 | |||
280 | ashl #16,r0,r2 | ||
281 | bicl3 #65535,r2,r0 | ||
282 | |||
283 | addl2 r3,r1 | ||
284 | |||
285 | moval 8(ap),r3 | ||
286 | cmpl (r3),r0 | ||
287 | bgequ noname.15 | ||
288 | incl r1 | ||
289 | noname.15: | ||
290 | |||
291 | subl2 r0,(r3) | ||
292 | |||
293 | cmpl 4(ap),r1 | ||
294 | bgequ noname.16 | ||
295 | |||
296 | addl2 12(ap),4(ap) | ||
297 | |||
298 | decl r4 | ||
299 | noname.16: | ||
300 | |||
301 | subl2 r1,4(ap) | ||
302 | |||
303 | decl r8 | ||
304 | beql noname.18 | ||
305 | noname.17: | ||
306 | |||
307 | ashl #16,r4,r9 | ||
308 | 239 | ||
309 | ashl #16,4(ap),r2 | 240 | h=4 ;(AP) h by value (input) |
310 | movzwl 2(r3),r0 | 241 | l=8 ;(AP) l by value (input) |
311 | bisl2 r0,r2 | 242 | d=12 ;(AP) d by value (input) |
312 | bicl3 #0,r2,4(ap) | ||
313 | 243 | ||
314 | bicl3 #-65536,(r3),r0 | 244 | ;aprim=r5 |
315 | ashl #16,r0,(r3) | 245 | ;a2=r6 |
316 | brw noname.7 | 246 | ;a20=r6 |
317 | nop | 247 | ;a21=r7 |
318 | noname.18: | 248 | ;bprim=r8 |
249 | ;b2=r9 | ||
250 | ;qprim=r10 ; initially used as q'' | ||
251 | ;rprim=r11 ; initially used as r'' | ||
319 | 252 | ||
320 | bisl2 r4,r9 | ||
321 | 253 | ||
322 | movl r9,r10 | 254 | .psect code,nowrt |
323 | 255 | ||
324 | noname.3: | 256 | .entry bn_div_words,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11> |
257 | movl l(ap),r2 | ||
258 | movl h(ap),r3 | ||
259 | movl d(ap),r4 | ||
260 | |||
261 | movl #0,r5 | ||
262 | movl #0,r8 | ||
263 | movl #0,r0 | ||
264 | ; movl #0,r1 | ||
265 | |||
266 | rotl #-1,r2,r6 ; a20 = l >> 1 (almost) | ||
267 | rotl #-1,r3,r7 ; a21 = h >> 1 (almost) | ||
268 | rotl #-1,r4,r9 ; b2 = d >> 1 (almost) | ||
269 | |||
270 | tstl r6 | ||
271 | bgeq 1$ | ||
272 | xorl2 #^X80000000,r6 ; fixup a20 so highest bit is 0 | ||
273 | incl r5 ; a' = 1 | ||
274 | 1$: | ||
275 | tstl r7 | ||
276 | bgeq 2$ | ||
277 | xorl2 #^X80000000,r6 ; fixup a20 so highest bit is 1, | ||
278 | ; since that's what was lowest in a21 | ||
279 | xorl2 #^X80000000,r7 ; fixup a21 so highest bit is 1 | ||
280 | 2$: | ||
281 | tstl r9 | ||
282 | beql 666$ ; Uh-oh, the divisor is 0... | ||
283 | bgtr 3$ | ||
284 | xorl2 #^X80000000,r9 ; fixup b2 so highest bit is 0 | ||
285 | incl r8 ; b' = 1 | ||
286 | 3$: | ||
287 | tstl r9 | ||
288 | bneq 4$ ; if b2 is 0, we know that b' is 1 | ||
289 | tstl r3 | ||
290 | bneq 666$ ; if higher half isn't 0, we overflow | ||
291 | movl r2,r10 ; otherwise, we have our result | ||
292 | brb 42$ ; This is a success, really. | ||
293 | 4$: | ||
294 | ediv r9,r6,r10,r11 | ||
295 | |||
296 | tstl r8 | ||
297 | bneq 5$ ; If b' != 0, go to the other part | ||
298 | ; addl3 r11,r11,r1 | ||
299 | ; addl2 r5,r1 | ||
300 | brb 42$ | ||
301 | 5$: | ||
302 | ashl #1,r11,r11 | ||
303 | subl2 r10,r11 | ||
304 | addl2 r5,r11 | ||
305 | bgeq 7$ | ||
306 | 6$: | ||
307 | decl r10 | ||
308 | addl2 r4,r11 | ||
309 | blss 6$ | ||
310 | 7$: | ||
311 | ; movl r11,r1 | ||
312 | 42$: | ||
325 | movl r10,r0 | 313 | movl r10,r0 |
326 | ret | 314 | 666$: |
327 | tstl r0 | 315 | ret |
328 | |||
329 | 316 | ||
330 | .psect code,nowrt | 317 | .title vax_bn_add_words unsigned add of two arrays |
331 | 318 | ; | |
332 | .entry BN_ADD_WORDS,^m<r2,r3,r4,r5,r6,r7> | 319 | ; Richard Levitte 20-Nov-2000 |
333 | 320 | ; | |
334 | tstl 16(ap) | 321 | ; ULONG bn_add_words(ULONG r[], ULONG a[], ULONG b[], int n) { |
335 | bgtr noname.21 | 322 | ; ULONG c = 0; |
336 | clrl r7 | 323 | ; int i; |
337 | brw noname.22 | 324 | ; for (i = 0; i < n; i++) <c,r[i]> = a[i] + b[i] + c; |
338 | noname.21: | 325 | ; return(c); |
339 | 326 | ; } | |
340 | clrl r4 | ||
341 | |||
342 | tstl r0 | ||
343 | noname.23: | ||
344 | |||
345 | movl 8(ap),r6 | ||
346 | addl3 r4,(r6),r2 | ||
347 | |||
348 | bicl2 #0,r2 | ||
349 | |||
350 | clrl r0 | ||
351 | cmpl r2,r4 | ||
352 | bgequ vcg.3 | ||
353 | incl r0 | ||
354 | vcg.3: | ||
355 | movl r0,r4 | ||
356 | |||
357 | movl 12(ap),r5 | ||
358 | addl3 (r5),r2,r1 | ||
359 | bicl2 #0,r1 | ||
360 | |||
361 | clrl r0 | ||
362 | cmpl r1,r2 | ||
363 | bgequ vcg.4 | ||
364 | incl r0 | ||
365 | vcg.4: | ||
366 | addl2 r0,r4 | ||
367 | |||
368 | movl 4(ap),r3 | ||
369 | movl r1,(r3) | ||
370 | |||
371 | decl 16(ap) | ||
372 | bgtr gen.1 | ||
373 | brw noname.25 | ||
374 | gen.1: | ||
375 | noname.24: | ||
376 | |||
377 | addl3 r4,4(r6),r2 | ||
378 | |||
379 | bicl2 #0,r2 | ||
380 | |||
381 | clrl r0 | ||
382 | cmpl r2,r4 | ||
383 | bgequ vcg.5 | ||
384 | incl r0 | ||
385 | vcg.5: | ||
386 | movl r0,r4 | ||
387 | |||
388 | addl3 4(r5),r2,r1 | ||
389 | bicl2 #0,r1 | ||
390 | |||
391 | clrl r0 | ||
392 | cmpl r1,r2 | ||
393 | bgequ vcg.6 | ||
394 | incl r0 | ||
395 | vcg.6: | ||
396 | addl2 r0,r4 | ||
397 | |||
398 | movl r1,4(r3) | ||
399 | |||
400 | decl 16(ap) | ||
401 | bleq noname.25 | ||
402 | noname.26: | ||
403 | |||
404 | addl3 r4,8(r6),r2 | ||
405 | |||
406 | bicl2 #0,r2 | ||
407 | |||
408 | clrl r0 | ||
409 | cmpl r2,r4 | ||
410 | bgequ vcg.7 | ||
411 | incl r0 | ||
412 | vcg.7: | ||
413 | movl r0,r4 | ||
414 | |||
415 | addl3 8(r5),r2,r1 | ||
416 | bicl2 #0,r1 | ||
417 | |||
418 | clrl r0 | ||
419 | cmpl r1,r2 | ||
420 | bgequ vcg.8 | ||
421 | incl r0 | ||
422 | vcg.8: | ||
423 | addl2 r0,r4 | ||
424 | |||
425 | movl r1,8(r3) | ||
426 | |||
427 | decl 16(ap) | ||
428 | bleq noname.25 | ||
429 | noname.27: | ||
430 | |||
431 | addl3 r4,12(r6),r2 | ||
432 | |||
433 | bicl2 #0,r2 | ||
434 | |||
435 | clrl r0 | ||
436 | cmpl r2,r4 | ||
437 | bgequ vcg.9 | ||
438 | incl r0 | ||
439 | vcg.9: | ||
440 | movl r0,r4 | ||
441 | |||
442 | addl3 12(r5),r2,r1 | ||
443 | bicl2 #0,r1 | ||
444 | |||
445 | clrl r0 | ||
446 | cmpl r1,r2 | ||
447 | bgequ vcg.10 | ||
448 | incl r0 | ||
449 | vcg.10: | ||
450 | addl2 r0,r4 | ||
451 | 327 | ||
452 | movl r1,12(r3) | 328 | r=4 ;(AP) r by reference (output) |
329 | a=8 ;(AP) a by reference (input) | ||
330 | b=12 ;(AP) b by reference (input) | ||
331 | n=16 ;(AP) n by value (input) | ||
453 | 332 | ||
454 | decl 16(ap) | ||
455 | bleq noname.25 | ||
456 | noname.28: | ||
457 | 333 | ||
458 | addl3 #16,r6,8(ap) | 334 | .psect code,nowrt |
459 | 335 | ||
460 | addl3 #16,r5,12(ap) | 336 | .entry bn_add_words,^m<r2,r3,r4,r5,r6> |
461 | 337 | ||
462 | addl3 #16,r3,4(ap) | 338 | moval @r(ap),r2 |
463 | brw noname.23 | 339 | moval @a(ap),r3 |
464 | tstl r0 | 340 | moval @b(ap),r4 |
465 | noname.25: | 341 | movl n(ap),r5 ; assumed >0 by C code |
342 | clrl r0 ; c | ||
466 | 343 | ||
467 | movl r4,r7 | 344 | tstl r5 ; carry = 0 |
345 | bleq 666$ | ||
468 | 346 | ||
469 | noname.22: | 347 | 0$: |
470 | movl r7,r0 | 348 | movl (r3)+,r6 ; carry untouched |
471 | ret | 349 | adwc (r4)+,r6 ; carry used and touched |
472 | nop | 350 | movl r6,(r2)+ ; carry untouched |
351 | sobgtr r5,0$ ; carry untouched | ||
473 | 352 | ||
353 | adwc #0,r0 | ||
354 | 666$: | ||
355 | ret | ||
474 | 356 | ||
357 | .title vax_bn_sub_words unsigned add of two arrays | ||
358 | ; | ||
359 | ; Richard Levitte 20-Nov-2000 | ||
360 | ; | ||
361 | ; ULONG bn_sub_words(ULONG r[], ULONG a[], ULONG b[], int n) { | ||
362 | ; ULONG c = 0; | ||
363 | ; int i; | ||
364 | ; for (i = 0; i < n; i++) <c,r[i]> = a[i] - b[i] - c; | ||
365 | ; return(c); | ||
366 | ; } | ||
475 | 367 | ||
476 | ;r=4 ;(AP) | 368 | r=4 ;(AP) r by reference (output) |
477 | ;a=8 ;(AP) | 369 | a=8 ;(AP) a by reference (input) |
478 | ;b=12 ;(AP) | 370 | b=12 ;(AP) b by reference (input) |
479 | ;n=16 ;(AP) n by value (input) | 371 | n=16 ;(AP) n by value (input) |
480 | 372 | ||
481 | .psect code,nowrt | ||
482 | 373 | ||
483 | .entry BN_SUB_WORDS,^m<r2,r3,r4,r5,r6,r7> | 374 | .psect code,nowrt |
484 | 375 | ||
485 | clrl r6 | 376 | .entry bn_sub_words,^m<r2,r3,r4,r5,r6> |
486 | 377 | ||
487 | tstl 16(ap) | 378 | moval @r(ap),r2 |
488 | bgtr noname.31 | 379 | moval @a(ap),r3 |
489 | clrl r7 | 380 | moval @b(ap),r4 |
490 | brw noname.32 | 381 | movl n(ap),r5 ; assumed >0 by C code |
491 | tstl r0 | 382 | clrl r0 ; c |
492 | noname.31: | ||
493 | 383 | ||
494 | noname.33: | 384 | tstl r5 ; carry = 0 |
385 | bleq 666$ | ||
495 | 386 | ||
496 | movl 8(ap),r5 | 387 | 0$: |
497 | movl (r5),r1 | 388 | movl (r3)+,r6 ; carry untouched |
498 | movl 12(ap),r4 | 389 | sbwc (r4)+,r6 ; carry used and touched |
499 | movl (r4),r2 | 390 | movl r6,(r2)+ ; carry untouched |
500 | 391 | sobgtr r5,0$ ; carry untouched | |
501 | movl 4(ap),r3 | ||
502 | subl3 r2,r1,r0 | ||
503 | subl2 r6,r0 | ||
504 | bicl3 #0,r0,(r3) | ||
505 | |||
506 | cmpl r1,r2 | ||
507 | beql noname.34 | ||
508 | clrl r0 | ||
509 | cmpl r1,r2 | ||
510 | bgequ vcg.11 | ||
511 | incl r0 | ||
512 | vcg.11: | ||
513 | movl r0,r6 | ||
514 | noname.34: | ||
515 | |||
516 | decl 16(ap) | ||
517 | bgtr gen.2 | ||
518 | brw noname.36 | ||
519 | gen.2: | ||
520 | noname.35: | ||
521 | |||
522 | movl 4(r5),r2 | ||
523 | movl 4(r4),r1 | ||
524 | |||
525 | subl3 r1,r2,r0 | ||
526 | subl2 r6,r0 | ||
527 | bicl3 #0,r0,4(r3) | ||
528 | |||
529 | cmpl r2,r1 | ||
530 | beql noname.37 | ||
531 | clrl r0 | ||
532 | cmpl r2,r1 | ||
533 | bgequ vcg.12 | ||
534 | incl r0 | ||
535 | vcg.12: | ||
536 | movl r0,r6 | ||
537 | noname.37: | ||
538 | |||
539 | decl 16(ap) | ||
540 | bleq noname.36 | ||
541 | noname.38: | ||
542 | |||
543 | movl 8(r5),r1 | ||
544 | movl 8(r4),r2 | ||
545 | |||
546 | subl3 r2,r1,r0 | ||
547 | subl2 r6,r0 | ||
548 | bicl3 #0,r0,8(r3) | ||
549 | |||
550 | cmpl r1,r2 | ||
551 | beql noname.39 | ||
552 | clrl r0 | ||
553 | cmpl r1,r2 | ||
554 | bgequ vcg.13 | ||
555 | incl r0 | ||
556 | vcg.13: | ||
557 | movl r0,r6 | ||
558 | noname.39: | ||
559 | |||
560 | decl 16(ap) | ||
561 | bleq noname.36 | ||
562 | noname.40: | ||
563 | |||
564 | movl 12(r5),r1 | ||
565 | movl 12(r4),r2 | ||
566 | |||
567 | subl3 r2,r1,r0 | ||
568 | subl2 r6,r0 | ||
569 | bicl3 #0,r0,12(r3) | ||
570 | |||
571 | cmpl r1,r2 | ||
572 | beql noname.41 | ||
573 | clrl r0 | ||
574 | cmpl r1,r2 | ||
575 | bgequ vcg.14 | ||
576 | incl r0 | ||
577 | vcg.14: | ||
578 | movl r0,r6 | ||
579 | noname.41: | ||
580 | |||
581 | decl 16(ap) | ||
582 | bleq noname.36 | ||
583 | noname.42: | ||
584 | |||
585 | addl3 #16,r5,8(ap) | ||
586 | |||
587 | addl3 #16,r4,12(ap) | ||
588 | |||
589 | addl3 #16,r3,4(ap) | ||
590 | brw noname.33 | ||
591 | tstl r0 | ||
592 | noname.36: | ||
593 | |||
594 | movl r6,r7 | ||
595 | |||
596 | noname.32: | ||
597 | movl r7,r0 | ||
598 | ret | ||
599 | nop | ||
600 | 392 | ||
393 | adwc #0,r0 | ||
394 | 666$: | ||
395 | ret | ||
601 | 396 | ||
602 | 397 | ||
603 | ;r=4 ;(AP) | 398 | ;r=4 ;(AP) |
@@ -6615,81 +6410,3 @@ noname.610: | |||
6615 | 6410 | ||
6616 | ; For now, the code below doesn't work, so I end this prematurely. | 6411 | ; For now, the code below doesn't work, so I end this prematurely. |
6617 | .end | 6412 | .end |
6618 | |||
6619 | .title vax_bn_div64 division 64/32=>32 | ||
6620 | ; | ||
6621 | ; r.l. 16-jan-1998 | ||
6622 | ; | ||
6623 | ; unsigned int bn_div64(unsigned long h, unsigned long l, unsigned long d) | ||
6624 | ; return <h,l>/d; | ||
6625 | ; | ||
6626 | |||
6627 | .psect code,nowrt | ||
6628 | |||
6629 | h=4 ;(AP) by value (input) | ||
6630 | l=8 ;(AP) by value (input) | ||
6631 | d=12 ;(AP) by value (input) | ||
6632 | |||
6633 | .entry bn_div64,^m<r2,r3,r4,r5,r6,r7,r8,r9> | ||
6634 | |||
6635 | movl l(ap),r2 ; l | ||
6636 | movl h(ap),r3 ; h | ||
6637 | movl d(ap),r4 ; d | ||
6638 | clrl r5 ; q | ||
6639 | clrl r6 ; r | ||
6640 | |||
6641 | ; Treat "negative" specially | ||
6642 | tstl r3 | ||
6643 | blss 30$ | ||
6644 | |||
6645 | tstl r4 | ||
6646 | beql 90$ | ||
6647 | |||
6648 | ediv r4,r2,r5,r6 | ||
6649 | bvs 666$ | ||
6650 | |||
6651 | movl r5,r0 | ||
6652 | ret | ||
6653 | |||
6654 | 30$: | ||
6655 | ; The theory here is to do some harmless shifting and a little | ||
6656 | ; bit of rounding (brackets are to designate when decimals are | ||
6657 | ; cut off): | ||
6658 | ; | ||
6659 | ; result = 2 * [ ([<h,0>/2] + [d/2]) / d ] + [ l / d ] | ||
6660 | |||
6661 | movl #0,r7 | ||
6662 | movl r3,r8 ; copy h | ||
6663 | ashq #-1,r7,r7 ; [<h,0>/2] => <r8,r7> | ||
6664 | bicl2 #^X80000000,r8 ; Remove "sign" | ||
6665 | |||
6666 | movl r4,r9 ; copy d | ||
6667 | ashl #-1,r9,r9 ; [d/2] => r9 | ||
6668 | bicl2 #^X80000000,r9 ; Remove "sign" | ||
6669 | |||
6670 | addl2 r9,r7 | ||
6671 | adwc #0,r8 ; [<h,0>/2] + [d/2] => <r8,r7> | ||
6672 | |||
6673 | ediv r4,r7,r5,r6 ; [ ([<h,0>/2] + [d/2]) / d ] => <r5,r6> | ||
6674 | bvs 666$ | ||
6675 | |||
6676 | movl #0,r6 | ||
6677 | ashq #1,r5,r5 ; 2 * [ ([<h,0>/2] + [d/2]) / d ] => r5 | ||
6678 | |||
6679 | movl #0,r3 | ||
6680 | ediv r4,r2,r8,r9 ; [ l / d ] => <r8,r9> | ||
6681 | |||
6682 | addl2 r8,r5 ; | ||
6683 | bcs 666$ | ||
6684 | |||
6685 | movl r5,r0 | ||
6686 | ret | ||
6687 | |||
6688 | 90$: | ||
6689 | movl #-1,r0 | ||
6690 | ret | ||
6691 | |||
6692 | 666$: | ||
6693 | |||
6694 | |||
6695 | .end | ||
diff --git a/src/lib/libcrypto/bn/bnspeed.c b/src/lib/libcrypto/bn/bnspeed.c index f7c2790fff..b554ac8cf8 100644 --- a/src/lib/libcrypto/bn/bnspeed.c +++ b/src/lib/libcrypto/bn/bnspeed.c | |||
@@ -1,3 +1,5 @@ | |||
1 | /* unused */ | ||
2 | |||
1 | /* crypto/bn/bnspeed.c */ | 3 | /* crypto/bn/bnspeed.c */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 4 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 5 | * All rights reserved. |
@@ -66,14 +68,13 @@ | |||
66 | #include <stdlib.h> | 68 | #include <stdlib.h> |
67 | #include <signal.h> | 69 | #include <signal.h> |
68 | #include <string.h> | 70 | #include <string.h> |
69 | #include "crypto.h" | 71 | #include <openssl/crypto.h> |
70 | #include "err.h" | 72 | #include <openssl/err.h> |
71 | 73 | ||
72 | #ifndef MSDOS | 74 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
73 | #define TIMES | 75 | #define TIMES |
74 | #endif | 76 | #endif |
75 | 77 | ||
76 | #ifndef VMS | ||
77 | #ifndef _IRIX | 78 | #ifndef _IRIX |
78 | #include <time.h> | 79 | #include <time.h> |
79 | #endif | 80 | #endif |
@@ -81,36 +82,33 @@ | |||
81 | #include <sys/types.h> | 82 | #include <sys/types.h> |
82 | #include <sys/times.h> | 83 | #include <sys/times.h> |
83 | #endif | 84 | #endif |
84 | #else /* VMS */ | 85 | |
85 | #include <types.h> | 86 | /* Depending on the VMS version, the tms structure is perhaps defined. |
86 | struct tms { | 87 | The __TMS macro will show if it was. If it wasn't defined, we should |
87 | time_t tms_utime; | 88 | undefine TIMES, since that tells the rest of the program how things |
88 | time_t tms_stime; | 89 | should be handled. -- Richard Levitte */ |
89 | time_t tms_uchild; /* I dunno... */ | 90 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
90 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 91 | #undef TIMES |
91 | } | ||
92 | #endif | 92 | #endif |
93 | |||
93 | #ifndef TIMES | 94 | #ifndef TIMES |
94 | #include <sys/timeb.h> | 95 | #include <sys/timeb.h> |
95 | #endif | 96 | #endif |
96 | 97 | ||
97 | #ifdef sun | 98 | #if defined(sun) || defined(__ultrix) |
99 | #define _POSIX_SOURCE | ||
98 | #include <limits.h> | 100 | #include <limits.h> |
99 | #include <sys/param.h> | 101 | #include <sys/param.h> |
100 | #endif | 102 | #endif |
101 | 103 | ||
102 | #include "bn.h" | 104 | #include <openssl/bn.h> |
103 | #include "x509.h" | 105 | #include <openssl/x509.h> |
104 | 106 | ||
105 | /* The following if from times(3) man page. It may need to be changed */ | 107 | /* The following if from times(3) man page. It may need to be changed */ |
106 | #ifndef HZ | 108 | #ifndef HZ |
107 | # ifndef CLK_TCK | 109 | # ifndef CLK_TCK |
108 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ | 110 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ |
109 | # ifndef VMS | 111 | # define HZ 100.0 |
110 | # define HZ 100.0 | ||
111 | # else /* VMS */ | ||
112 | # define HZ 100.0 | ||
113 | # endif | ||
114 | # else /* _BSD_CLK_TCK_ */ | 112 | # else /* _BSD_CLK_TCK_ */ |
115 | # define HZ ((double)_BSD_CLK_TCK_) | 113 | # define HZ ((double)_BSD_CLK_TCK_) |
116 | # endif | 114 | # endif |
@@ -123,17 +121,11 @@ struct tms { | |||
123 | #define BUFSIZE ((long)1024*8) | 121 | #define BUFSIZE ((long)1024*8) |
124 | int run=0; | 122 | int run=0; |
125 | 123 | ||
126 | #ifndef NOPROTO | ||
127 | static double Time_F(int s); | 124 | static double Time_F(int s); |
128 | #else | ||
129 | static double Time_F(); | ||
130 | #endif | ||
131 | |||
132 | #define START 0 | 125 | #define START 0 |
133 | #define STOP 1 | 126 | #define STOP 1 |
134 | 127 | ||
135 | static double Time_F(s) | 128 | static double Time_F(int s) |
136 | int s; | ||
137 | { | 129 | { |
138 | double ret; | 130 | double ret; |
139 | #ifdef TIMES | 131 | #ifdef TIMES |
@@ -175,27 +167,20 @@ static int sizes[NUM_SIZES]={128,256,512,1024,2048}; | |||
175 | 167 | ||
176 | void do_mul(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_CTX *ctx); | 168 | void do_mul(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_CTX *ctx); |
177 | 169 | ||
178 | int main(argc,argv) | 170 | int main(int argc, char **argv) |
179 | int argc; | ||
180 | char **argv; | ||
181 | { | 171 | { |
182 | BN_CTX *ctx; | 172 | BN_CTX *ctx; |
183 | BIGNUM *a,*b,*c,*r; | 173 | BIGNUM a,b,c; |
184 | 174 | ||
185 | ctx=BN_CTX_new(); | 175 | ctx=BN_CTX_new(); |
186 | a=BN_new(); | 176 | BN_init(&a); |
187 | b=BN_new(); | 177 | BN_init(&b); |
188 | c=BN_new(); | 178 | BN_init(&c); |
189 | r=BN_new(); | ||
190 | 179 | ||
191 | do_mul(a,b,c,ctx); | 180 | do_mul(&a,&b,&c,ctx); |
192 | } | 181 | } |
193 | 182 | ||
194 | void do_mul(r,a,b,ctx) | 183 | void do_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) |
195 | BIGNUM *r; | ||
196 | BIGNUM *a; | ||
197 | BIGNUM *b; | ||
198 | BN_CTX *ctx; | ||
199 | { | 184 | { |
200 | int i,j,k; | 185 | int i,j,k; |
201 | double tm; | 186 | double tm; |
@@ -211,7 +196,7 @@ BN_CTX *ctx; | |||
211 | BN_rand(b,sizes[j],1,0); | 196 | BN_rand(b,sizes[j],1,0); |
212 | Time_F(START); | 197 | Time_F(START); |
213 | for (k=0; k<num; k++) | 198 | for (k=0; k<num; k++) |
214 | BN_mul(r,b,a); | 199 | BN_mul(r,b,a,ctx); |
215 | tm=Time_F(STOP); | 200 | tm=Time_F(STOP); |
216 | printf("mul %4d x %4d -> %8.3fms\n",sizes[i],sizes[j],tm*1000.0/num); | 201 | printf("mul %4d x %4d -> %8.3fms\n",sizes[i],sizes[j],tm*1000.0/num); |
217 | } | 202 | } |
diff --git a/src/lib/libcrypto/bn/bntest.c b/src/lib/libcrypto/bn/bntest.c index 9ebd68b429..443cf420e5 100644 --- a/src/lib/libcrypto/bn/bntest.c +++ b/src/lib/libcrypto/bn/bntest.c | |||
@@ -59,65 +59,70 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | |||
62 | #include "e_os.h" | 63 | #include "e_os.h" |
63 | #include "bio.h" | ||
64 | #include "bn.h" | ||
65 | #include "rand.h" | ||
66 | #include "x509.h" | ||
67 | #include "err.h" | ||
68 | 64 | ||
69 | #ifdef WINDOWS | 65 | #include <openssl/bio.h> |
66 | #include <openssl/bn.h> | ||
67 | #include <openssl/rand.h> | ||
68 | #include <openssl/x509.h> | ||
69 | #include <openssl/err.h> | ||
70 | |||
71 | #ifdef OPENSSL_SYS_WINDOWS | ||
70 | #include "../bio/bss_file.c" | 72 | #include "../bio/bss_file.c" |
71 | #endif | 73 | #endif |
72 | 74 | ||
73 | #ifndef NOPROTO | 75 | const int num0 = 100; /* number of tests */ |
74 | int test_add (BIO *bp); | 76 | const int num1 = 50; /* additional tests for some functions */ |
75 | int test_sub (BIO *bp); | 77 | const int num2 = 5; /* number of tests for slow functions */ |
76 | int test_lshift1 (BIO *bp); | 78 | |
77 | int test_lshift (BIO *bp); | 79 | int test_add(BIO *bp); |
78 | int test_rshift1 (BIO *bp); | 80 | int test_sub(BIO *bp); |
79 | int test_rshift (BIO *bp); | 81 | int test_lshift1(BIO *bp); |
80 | int test_div (BIO *bp,BN_CTX *ctx); | 82 | int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_); |
81 | int test_mul (BIO *bp); | 83 | int test_rshift1(BIO *bp); |
82 | int test_sqr (BIO *bp,BN_CTX *ctx); | 84 | int test_rshift(BIO *bp,BN_CTX *ctx); |
83 | int test_mont (BIO *bp,BN_CTX *ctx); | 85 | int test_div(BIO *bp,BN_CTX *ctx); |
84 | int test_mod (BIO *bp,BN_CTX *ctx); | 86 | int test_div_recp(BIO *bp,BN_CTX *ctx); |
85 | int test_mod_mul (BIO *bp,BN_CTX *ctx); | 87 | int test_mul(BIO *bp); |
86 | int test_mod_exp (BIO *bp,BN_CTX *ctx); | 88 | int test_sqr(BIO *bp,BN_CTX *ctx); |
89 | int test_mont(BIO *bp,BN_CTX *ctx); | ||
90 | int test_mod(BIO *bp,BN_CTX *ctx); | ||
91 | int test_mod_mul(BIO *bp,BN_CTX *ctx); | ||
92 | int test_mod_exp(BIO *bp,BN_CTX *ctx); | ||
93 | int test_exp(BIO *bp,BN_CTX *ctx); | ||
94 | int test_kron(BIO *bp,BN_CTX *ctx); | ||
95 | int test_sqrt(BIO *bp,BN_CTX *ctx); | ||
87 | int rand_neg(void); | 96 | int rand_neg(void); |
88 | #else | ||
89 | int test_add (); | ||
90 | int test_sub (); | ||
91 | int test_lshift1 (); | ||
92 | int test_lshift (); | ||
93 | int test_rshift1 (); | ||
94 | int test_rshift (); | ||
95 | int test_div (); | ||
96 | int test_mul (); | ||
97 | int test_sqr (); | ||
98 | int test_mont (); | ||
99 | int test_mod (); | ||
100 | int test_mod_mul (); | ||
101 | int test_mod_exp (); | ||
102 | int rand_neg(); | ||
103 | #endif | ||
104 | |||
105 | static int results=0; | 97 | static int results=0; |
106 | 98 | ||
107 | #ifdef NO_STDIO | 99 | #ifdef OPENSSL_NO_STDIO |
108 | #define APPS_WIN16 | 100 | #define APPS_WIN16 |
109 | #include "bss_file.c" | 101 | #include "bss_file.c" |
110 | #endif | 102 | #endif |
111 | 103 | ||
112 | int main(argc,argv) | 104 | static unsigned char lst[]="\xC6\x4F\x43\x04\x2A\xEA\xCA\x6E\x58\x36\x80\x5B\xE8\xC9" |
113 | int argc; | 105 | "\x9B\x04\x5D\x48\x36\xC2\xFD\x16\xC9\x64\xF0"; |
114 | char *argv[]; | 106 | |
107 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; | ||
108 | |||
109 | static void message(BIO *out, char *m) | ||
110 | { | ||
111 | fprintf(stderr, "test %s\n", m); | ||
112 | BIO_puts(out, "print \"test "); | ||
113 | BIO_puts(out, m); | ||
114 | BIO_puts(out, "\\n\"\n"); | ||
115 | } | ||
116 | |||
117 | int main(int argc, char *argv[]) | ||
115 | { | 118 | { |
116 | BN_CTX *ctx; | 119 | BN_CTX *ctx; |
117 | BIO *out; | 120 | BIO *out; |
118 | char *outfile=NULL; | 121 | char *outfile=NULL; |
119 | 122 | ||
120 | srand((unsigned int)time(NULL)); | 123 | results = 0; |
124 | |||
125 | RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ | ||
121 | 126 | ||
122 | argc--; | 127 | argc--; |
123 | argv++; | 128 | argv++; |
@@ -156,361 +161,516 @@ char *argv[]; | |||
156 | if (!results) | 161 | if (!results) |
157 | BIO_puts(out,"obase=16\nibase=16\n"); | 162 | BIO_puts(out,"obase=16\nibase=16\n"); |
158 | 163 | ||
159 | fprintf(stderr,"test BN_add\n"); | 164 | message(out,"BN_add"); |
160 | if (!test_add(out)) goto err; | 165 | if (!test_add(out)) goto err; |
161 | fflush(stdout); | 166 | BIO_flush(out); |
162 | 167 | ||
163 | fprintf(stderr,"test BN_sub\n"); | 168 | message(out,"BN_sub"); |
164 | if (!test_sub(out)) goto err; | 169 | if (!test_sub(out)) goto err; |
165 | fflush(stdout); | 170 | BIO_flush(out); |
166 | 171 | ||
167 | fprintf(stderr,"test BN_lshift1\n"); | 172 | message(out,"BN_lshift1"); |
168 | if (!test_lshift1(out)) goto err; | 173 | if (!test_lshift1(out)) goto err; |
169 | fflush(stdout); | 174 | BIO_flush(out); |
175 | |||
176 | message(out,"BN_lshift (fixed)"); | ||
177 | if (!test_lshift(out,ctx,BN_bin2bn(lst,sizeof(lst)-1,NULL))) | ||
178 | goto err; | ||
179 | BIO_flush(out); | ||
170 | 180 | ||
171 | fprintf(stderr,"test BN_lshift\n"); | 181 | message(out,"BN_lshift"); |
172 | if (!test_lshift(out)) goto err; | 182 | if (!test_lshift(out,ctx,NULL)) goto err; |
173 | fflush(stdout); | 183 | BIO_flush(out); |
174 | 184 | ||
175 | fprintf(stderr,"test BN_rshift1\n"); | 185 | message(out,"BN_rshift1"); |
176 | if (!test_rshift1(out)) goto err; | 186 | if (!test_rshift1(out)) goto err; |
177 | fflush(stdout); | 187 | BIO_flush(out); |
178 | 188 | ||
179 | fprintf(stderr,"test BN_rshift\n"); | 189 | message(out,"BN_rshift"); |
180 | if (!test_rshift(out)) goto err; | 190 | if (!test_rshift(out,ctx)) goto err; |
181 | fflush(stdout); | 191 | BIO_flush(out); |
182 | 192 | ||
183 | fprintf(stderr,"test BN_sqr\n"); | 193 | message(out,"BN_sqr"); |
184 | if (!test_sqr(out,ctx)) goto err; | 194 | if (!test_sqr(out,ctx)) goto err; |
185 | fflush(stdout); | 195 | BIO_flush(out); |
186 | 196 | ||
187 | fprintf(stderr,"test BN_mul\n"); | 197 | message(out,"BN_mul"); |
188 | if (!test_mul(out)) goto err; | 198 | if (!test_mul(out)) goto err; |
189 | fflush(stdout); | 199 | BIO_flush(out); |
190 | 200 | ||
191 | fprintf(stderr,"test BN_div\n"); | 201 | message(out,"BN_div"); |
192 | if (!test_div(out,ctx)) goto err; | 202 | if (!test_div(out,ctx)) goto err; |
193 | fflush(stdout); | 203 | BIO_flush(out); |
194 | 204 | ||
195 | fprintf(stderr,"test BN_mod\n"); | 205 | message(out,"BN_div_recp"); |
206 | if (!test_div_recp(out,ctx)) goto err; | ||
207 | BIO_flush(out); | ||
208 | |||
209 | message(out,"BN_mod"); | ||
196 | if (!test_mod(out,ctx)) goto err; | 210 | if (!test_mod(out,ctx)) goto err; |
197 | fflush(stdout); | 211 | BIO_flush(out); |
198 | 212 | ||
199 | fprintf(stderr,"test BN_mod_mul\n"); | 213 | message(out,"BN_mod_mul"); |
200 | if (!test_mod_mul(out,ctx)) goto err; | 214 | if (!test_mod_mul(out,ctx)) goto err; |
201 | fflush(stdout); | 215 | BIO_flush(out); |
202 | 216 | ||
203 | /* | 217 | message(out,"BN_mont"); |
204 | fprintf(stderr,"test BN_mont\n"); | ||
205 | if (!test_mont(out,ctx)) goto err; | 218 | if (!test_mont(out,ctx)) goto err; |
206 | fflush(stdout); | 219 | BIO_flush(out); |
207 | */ | 220 | |
208 | fprintf(stderr,"test BN_mod_exp\n"); | 221 | message(out,"BN_mod_exp"); |
209 | if (!test_mod_exp(out,ctx)) goto err; | 222 | if (!test_mod_exp(out,ctx)) goto err; |
210 | fflush(stdout); | 223 | BIO_flush(out); |
224 | |||
225 | message(out,"BN_exp"); | ||
226 | if (!test_exp(out,ctx)) goto err; | ||
227 | BIO_flush(out); | ||
228 | |||
229 | message(out,"BN_kronecker"); | ||
230 | if (!test_kron(out,ctx)) goto err; | ||
231 | BIO_flush(out); | ||
232 | |||
233 | message(out,"BN_mod_sqrt"); | ||
234 | if (!test_sqrt(out,ctx)) goto err; | ||
235 | BIO_flush(out); | ||
236 | |||
237 | BN_CTX_free(ctx); | ||
238 | BIO_free(out); | ||
211 | 239 | ||
212 | /**/ | 240 | /**/ |
213 | exit(0); | 241 | exit(0); |
214 | err: | 242 | err: |
243 | BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices | ||
244 | * the failure, see test_bn in test/Makefile.ssl*/ | ||
245 | BIO_flush(out); | ||
215 | ERR_load_crypto_strings(); | 246 | ERR_load_crypto_strings(); |
216 | ERR_print_errors(out); | 247 | ERR_print_errors_fp(stderr); |
217 | exit(1); | 248 | exit(1); |
218 | return(1); | 249 | return(1); |
219 | } | 250 | } |
220 | 251 | ||
221 | int test_add(bp) | 252 | int test_add(BIO *bp) |
222 | BIO *bp; | ||
223 | { | 253 | { |
224 | BIGNUM *a,*b,*c; | 254 | BIGNUM a,b,c; |
225 | int i; | 255 | int i; |
226 | int j; | ||
227 | 256 | ||
228 | a=BN_new(); | 257 | BN_init(&a); |
229 | b=BN_new(); | 258 | BN_init(&b); |
230 | c=BN_new(); | 259 | BN_init(&c); |
231 | 260 | ||
232 | BN_rand(a,512,0,0); | 261 | BN_bntest_rand(&a,512,0,0); |
233 | for (i=0; i<100; i++) | 262 | for (i=0; i<num0; i++) |
234 | { | 263 | { |
235 | BN_rand(b,450+i,0,0); | 264 | BN_bntest_rand(&b,450+i,0,0); |
236 | a->neg=rand_neg(); | 265 | a.neg=rand_neg(); |
237 | b->neg=rand_neg(); | 266 | b.neg=rand_neg(); |
238 | if (bp == NULL) | 267 | BN_add(&c,&a,&b); |
239 | for (j=0; j<10000; j++) | ||
240 | BN_add(c,a,b); | ||
241 | BN_add(c,a,b); | ||
242 | if (bp != NULL) | 268 | if (bp != NULL) |
243 | { | 269 | { |
244 | if (!results) | 270 | if (!results) |
245 | { | 271 | { |
246 | BN_print(bp,a); | 272 | BN_print(bp,&a); |
247 | BIO_puts(bp," + "); | 273 | BIO_puts(bp," + "); |
248 | BN_print(bp,b); | 274 | BN_print(bp,&b); |
249 | BIO_puts(bp," - "); | 275 | BIO_puts(bp," - "); |
250 | } | 276 | } |
251 | BN_print(bp,c); | 277 | BN_print(bp,&c); |
252 | BIO_puts(bp,"\n"); | 278 | BIO_puts(bp,"\n"); |
253 | } | 279 | } |
280 | a.neg=!a.neg; | ||
281 | b.neg=!b.neg; | ||
282 | BN_add(&c,&c,&b); | ||
283 | BN_add(&c,&c,&a); | ||
284 | if(!BN_is_zero(&c)) | ||
285 | { | ||
286 | fprintf(stderr,"Add test failed!\n"); | ||
287 | return 0; | ||
288 | } | ||
254 | } | 289 | } |
255 | BN_free(a); | 290 | BN_free(&a); |
256 | BN_free(b); | 291 | BN_free(&b); |
257 | BN_free(c); | 292 | BN_free(&c); |
258 | return(1); | 293 | return(1); |
259 | } | 294 | } |
260 | 295 | ||
261 | int test_sub(bp) | 296 | int test_sub(BIO *bp) |
262 | BIO *bp; | ||
263 | { | 297 | { |
264 | BIGNUM *a,*b,*c; | 298 | BIGNUM a,b,c; |
265 | int i; | 299 | int i; |
266 | int j; | ||
267 | 300 | ||
268 | a=BN_new(); | 301 | BN_init(&a); |
269 | b=BN_new(); | 302 | BN_init(&b); |
270 | c=BN_new(); | 303 | BN_init(&c); |
271 | 304 | ||
272 | BN_rand(a,512,0,0); | 305 | for (i=0; i<num0+num1; i++) |
273 | for (i=0; i<100; i++) | ||
274 | { | 306 | { |
275 | BN_rand(b,400+i,0,0); | 307 | if (i < num1) |
276 | a->neg=rand_neg(); | 308 | { |
277 | b->neg=rand_neg(); | 309 | BN_bntest_rand(&a,512,0,0); |
278 | if (bp == NULL) | 310 | BN_copy(&b,&a); |
279 | for (j=0; j<10000; j++) | 311 | if (BN_set_bit(&a,i)==0) return(0); |
280 | BN_sub(c,a,b); | 312 | BN_add_word(&b,i); |
281 | BN_sub(c,a,b); | 313 | } |
314 | else | ||
315 | { | ||
316 | BN_bntest_rand(&b,400+i-num1,0,0); | ||
317 | a.neg=rand_neg(); | ||
318 | b.neg=rand_neg(); | ||
319 | } | ||
320 | BN_sub(&c,&a,&b); | ||
282 | if (bp != NULL) | 321 | if (bp != NULL) |
283 | { | 322 | { |
284 | if (!results) | 323 | if (!results) |
285 | { | 324 | { |
286 | BN_print(bp,a); | 325 | BN_print(bp,&a); |
287 | BIO_puts(bp," - "); | 326 | BIO_puts(bp," - "); |
288 | BN_print(bp,b); | 327 | BN_print(bp,&b); |
289 | BIO_puts(bp," - "); | 328 | BIO_puts(bp," - "); |
290 | } | 329 | } |
291 | BN_print(bp,c); | 330 | BN_print(bp,&c); |
292 | BIO_puts(bp,"\n"); | 331 | BIO_puts(bp,"\n"); |
293 | } | 332 | } |
333 | BN_add(&c,&c,&b); | ||
334 | BN_sub(&c,&c,&a); | ||
335 | if(!BN_is_zero(&c)) | ||
336 | { | ||
337 | fprintf(stderr,"Subtract test failed!\n"); | ||
338 | return 0; | ||
339 | } | ||
294 | } | 340 | } |
295 | BN_free(a); | 341 | BN_free(&a); |
296 | BN_free(b); | 342 | BN_free(&b); |
297 | BN_free(c); | 343 | BN_free(&c); |
298 | return(1); | 344 | return(1); |
299 | } | 345 | } |
300 | 346 | ||
301 | int test_div(bp,ctx) | 347 | int test_div(BIO *bp, BN_CTX *ctx) |
302 | BIO *bp; | ||
303 | BN_CTX *ctx; | ||
304 | { | 348 | { |
305 | BIGNUM *a,*b,*c,*d; | 349 | BIGNUM a,b,c,d,e; |
306 | int i; | 350 | int i; |
307 | int j; | ||
308 | 351 | ||
309 | a=BN_new(); | 352 | BN_init(&a); |
310 | b=BN_new(); | 353 | BN_init(&b); |
311 | c=BN_new(); | 354 | BN_init(&c); |
312 | d=BN_new(); | 355 | BN_init(&d); |
356 | BN_init(&e); | ||
313 | 357 | ||
314 | BN_rand(a,400,0,0); | 358 | for (i=0; i<num0+num1; i++) |
315 | for (i=0; i<100; i++) | ||
316 | { | 359 | { |
317 | BN_rand(b,50+i,0,0); | 360 | if (i < num1) |
318 | a->neg=rand_neg(); | 361 | { |
319 | b->neg=rand_neg(); | 362 | BN_bntest_rand(&a,400,0,0); |
320 | if (bp == NULL) | 363 | BN_copy(&b,&a); |
321 | for (j=0; j<100; j++) | 364 | BN_lshift(&a,&a,i); |
322 | BN_div(d,c,a,b,ctx); | 365 | BN_add_word(&a,i); |
323 | BN_div(d,c,a,b,ctx); | 366 | } |
367 | else | ||
368 | BN_bntest_rand(&b,50+3*(i-num1),0,0); | ||
369 | a.neg=rand_neg(); | ||
370 | b.neg=rand_neg(); | ||
371 | BN_div(&d,&c,&a,&b,ctx); | ||
324 | if (bp != NULL) | 372 | if (bp != NULL) |
325 | { | 373 | { |
326 | if (!results) | 374 | if (!results) |
327 | { | 375 | { |
328 | BN_print(bp,a); | 376 | BN_print(bp,&a); |
329 | BIO_puts(bp," / "); | 377 | BIO_puts(bp," / "); |
330 | BN_print(bp,b); | 378 | BN_print(bp,&b); |
331 | BIO_puts(bp," - "); | 379 | BIO_puts(bp," - "); |
332 | } | 380 | } |
333 | BN_print(bp,d); | 381 | BN_print(bp,&d); |
334 | BIO_puts(bp,"\n"); | 382 | BIO_puts(bp,"\n"); |
335 | 383 | ||
336 | if (!results) | 384 | if (!results) |
337 | { | 385 | { |
338 | BN_print(bp,a); | 386 | BN_print(bp,&a); |
339 | BIO_puts(bp," % "); | 387 | BIO_puts(bp," % "); |
340 | BN_print(bp,b); | 388 | BN_print(bp,&b); |
341 | BIO_puts(bp," - "); | 389 | BIO_puts(bp," - "); |
342 | } | 390 | } |
343 | BN_print(bp,c); | 391 | BN_print(bp,&c); |
344 | BIO_puts(bp,"\n"); | 392 | BIO_puts(bp,"\n"); |
345 | } | 393 | } |
394 | BN_mul(&e,&d,&b,ctx); | ||
395 | BN_add(&d,&e,&c); | ||
396 | BN_sub(&d,&d,&a); | ||
397 | if(!BN_is_zero(&d)) | ||
398 | { | ||
399 | fprintf(stderr,"Division test failed!\n"); | ||
400 | return 0; | ||
401 | } | ||
346 | } | 402 | } |
347 | BN_free(a); | 403 | BN_free(&a); |
348 | BN_free(b); | 404 | BN_free(&b); |
349 | BN_free(c); | 405 | BN_free(&c); |
350 | BN_free(d); | 406 | BN_free(&d); |
407 | BN_free(&e); | ||
351 | return(1); | 408 | return(1); |
352 | } | 409 | } |
353 | 410 | ||
354 | int test_mul(bp) | 411 | int test_div_recp(BIO *bp, BN_CTX *ctx) |
355 | BIO *bp; | ||
356 | { | 412 | { |
357 | BIGNUM *a,*b,*c; | 413 | BIGNUM a,b,c,d,e; |
414 | BN_RECP_CTX recp; | ||
358 | int i; | 415 | int i; |
359 | int j; | ||
360 | 416 | ||
361 | a=BN_new(); | 417 | BN_RECP_CTX_init(&recp); |
362 | b=BN_new(); | 418 | BN_init(&a); |
363 | c=BN_new(); | 419 | BN_init(&b); |
420 | BN_init(&c); | ||
421 | BN_init(&d); | ||
422 | BN_init(&e); | ||
364 | 423 | ||
365 | BN_rand(a,200,0,0); | 424 | for (i=0; i<num0+num1; i++) |
366 | for (i=0; i<100; i++) | ||
367 | { | 425 | { |
368 | BN_rand(b,250+i,0,0); | 426 | if (i < num1) |
369 | a->neg=rand_neg(); | 427 | { |
370 | b->neg=rand_neg(); | 428 | BN_bntest_rand(&a,400,0,0); |
371 | if (bp == NULL) | 429 | BN_copy(&b,&a); |
372 | for (j=0; j<100; j++) | 430 | BN_lshift(&a,&a,i); |
373 | BN_mul(c,a,b); | 431 | BN_add_word(&a,i); |
374 | BN_mul(c,a,b); | 432 | } |
433 | else | ||
434 | BN_bntest_rand(&b,50+3*(i-num1),0,0); | ||
435 | a.neg=rand_neg(); | ||
436 | b.neg=rand_neg(); | ||
437 | BN_RECP_CTX_set(&recp,&b,ctx); | ||
438 | BN_div_recp(&d,&c,&a,&recp,ctx); | ||
375 | if (bp != NULL) | 439 | if (bp != NULL) |
376 | { | 440 | { |
377 | if (!results) | 441 | if (!results) |
378 | { | 442 | { |
379 | BN_print(bp,a); | 443 | BN_print(bp,&a); |
444 | BIO_puts(bp," / "); | ||
445 | BN_print(bp,&b); | ||
446 | BIO_puts(bp," - "); | ||
447 | } | ||
448 | BN_print(bp,&d); | ||
449 | BIO_puts(bp,"\n"); | ||
450 | |||
451 | if (!results) | ||
452 | { | ||
453 | BN_print(bp,&a); | ||
454 | BIO_puts(bp," % "); | ||
455 | BN_print(bp,&b); | ||
456 | BIO_puts(bp," - "); | ||
457 | } | ||
458 | BN_print(bp,&c); | ||
459 | BIO_puts(bp,"\n"); | ||
460 | } | ||
461 | BN_mul(&e,&d,&b,ctx); | ||
462 | BN_add(&d,&e,&c); | ||
463 | BN_sub(&d,&d,&a); | ||
464 | if(!BN_is_zero(&d)) | ||
465 | { | ||
466 | fprintf(stderr,"Reciprocal division test failed!\n"); | ||
467 | fprintf(stderr,"a="); | ||
468 | BN_print_fp(stderr,&a); | ||
469 | fprintf(stderr,"\nb="); | ||
470 | BN_print_fp(stderr,&b); | ||
471 | fprintf(stderr,"\n"); | ||
472 | return 0; | ||
473 | } | ||
474 | } | ||
475 | BN_free(&a); | ||
476 | BN_free(&b); | ||
477 | BN_free(&c); | ||
478 | BN_free(&d); | ||
479 | BN_free(&e); | ||
480 | BN_RECP_CTX_free(&recp); | ||
481 | return(1); | ||
482 | } | ||
483 | |||
484 | int test_mul(BIO *bp) | ||
485 | { | ||
486 | BIGNUM a,b,c,d,e; | ||
487 | int i; | ||
488 | BN_CTX *ctx; | ||
489 | |||
490 | ctx = BN_CTX_new(); | ||
491 | if (ctx == NULL) exit(1); | ||
492 | |||
493 | BN_init(&a); | ||
494 | BN_init(&b); | ||
495 | BN_init(&c); | ||
496 | BN_init(&d); | ||
497 | BN_init(&e); | ||
498 | |||
499 | for (i=0; i<num0+num1; i++) | ||
500 | { | ||
501 | if (i <= num1) | ||
502 | { | ||
503 | BN_bntest_rand(&a,100,0,0); | ||
504 | BN_bntest_rand(&b,100,0,0); | ||
505 | } | ||
506 | else | ||
507 | BN_bntest_rand(&b,i-num1,0,0); | ||
508 | a.neg=rand_neg(); | ||
509 | b.neg=rand_neg(); | ||
510 | BN_mul(&c,&a,&b,ctx); | ||
511 | if (bp != NULL) | ||
512 | { | ||
513 | if (!results) | ||
514 | { | ||
515 | BN_print(bp,&a); | ||
380 | BIO_puts(bp," * "); | 516 | BIO_puts(bp," * "); |
381 | BN_print(bp,b); | 517 | BN_print(bp,&b); |
382 | BIO_puts(bp," - "); | 518 | BIO_puts(bp," - "); |
383 | } | 519 | } |
384 | BN_print(bp,c); | 520 | BN_print(bp,&c); |
385 | BIO_puts(bp,"\n"); | 521 | BIO_puts(bp,"\n"); |
386 | } | 522 | } |
523 | BN_div(&d,&e,&c,&a,ctx); | ||
524 | BN_sub(&d,&d,&b); | ||
525 | if(!BN_is_zero(&d) || !BN_is_zero(&e)) | ||
526 | { | ||
527 | fprintf(stderr,"Multiplication test failed!\n"); | ||
528 | return 0; | ||
529 | } | ||
387 | } | 530 | } |
388 | BN_free(a); | 531 | BN_free(&a); |
389 | BN_free(b); | 532 | BN_free(&b); |
390 | BN_free(c); | 533 | BN_free(&c); |
534 | BN_free(&d); | ||
535 | BN_free(&e); | ||
536 | BN_CTX_free(ctx); | ||
391 | return(1); | 537 | return(1); |
392 | } | 538 | } |
393 | 539 | ||
394 | int test_sqr(bp,ctx) | 540 | int test_sqr(BIO *bp, BN_CTX *ctx) |
395 | BIO *bp; | ||
396 | BN_CTX *ctx; | ||
397 | { | 541 | { |
398 | BIGNUM *a,*c; | 542 | BIGNUM a,c,d,e; |
399 | int i; | 543 | int i; |
400 | int j; | ||
401 | 544 | ||
402 | a=BN_new(); | 545 | BN_init(&a); |
403 | c=BN_new(); | 546 | BN_init(&c); |
547 | BN_init(&d); | ||
548 | BN_init(&e); | ||
404 | 549 | ||
405 | for (i=0; i<40; i++) | 550 | for (i=0; i<num0; i++) |
406 | { | 551 | { |
407 | BN_rand(a,40+i*10,0,0); | 552 | BN_bntest_rand(&a,40+i*10,0,0); |
408 | a->neg=rand_neg(); | 553 | a.neg=rand_neg(); |
409 | if (bp == NULL) | 554 | BN_sqr(&c,&a,ctx); |
410 | for (j=0; j<100; j++) | ||
411 | BN_sqr(c,a,ctx); | ||
412 | BN_sqr(c,a,ctx); | ||
413 | if (bp != NULL) | 555 | if (bp != NULL) |
414 | { | 556 | { |
415 | if (!results) | 557 | if (!results) |
416 | { | 558 | { |
417 | BN_print(bp,a); | 559 | BN_print(bp,&a); |
418 | BIO_puts(bp," * "); | 560 | BIO_puts(bp," * "); |
419 | BN_print(bp,a); | 561 | BN_print(bp,&a); |
420 | BIO_puts(bp," - "); | 562 | BIO_puts(bp," - "); |
421 | } | 563 | } |
422 | BN_print(bp,c); | 564 | BN_print(bp,&c); |
423 | BIO_puts(bp,"\n"); | 565 | BIO_puts(bp,"\n"); |
424 | } | 566 | } |
567 | BN_div(&d,&e,&c,&a,ctx); | ||
568 | BN_sub(&d,&d,&a); | ||
569 | if(!BN_is_zero(&d) || !BN_is_zero(&e)) | ||
570 | { | ||
571 | fprintf(stderr,"Square test failed!\n"); | ||
572 | return 0; | ||
573 | } | ||
425 | } | 574 | } |
426 | BN_free(a); | 575 | BN_free(&a); |
427 | BN_free(c); | 576 | BN_free(&c); |
577 | BN_free(&d); | ||
578 | BN_free(&e); | ||
428 | return(1); | 579 | return(1); |
429 | } | 580 | } |
430 | 581 | ||
431 | int test_mont(bp,ctx) | 582 | int test_mont(BIO *bp, BN_CTX *ctx) |
432 | BIO *bp; | ||
433 | BN_CTX *ctx; | ||
434 | { | 583 | { |
435 | BIGNUM *a,*b,*c,*A,*B; | 584 | BIGNUM a,b,c,d,A,B; |
436 | BIGNUM *n; | 585 | BIGNUM n; |
437 | int i; | 586 | int i; |
438 | int j; | ||
439 | BN_MONT_CTX *mont; | 587 | BN_MONT_CTX *mont; |
440 | 588 | ||
441 | a=BN_new(); | 589 | BN_init(&a); |
442 | b=BN_new(); | 590 | BN_init(&b); |
443 | c=BN_new(); | 591 | BN_init(&c); |
444 | A=BN_new(); | 592 | BN_init(&d); |
445 | B=BN_new(); | 593 | BN_init(&A); |
446 | n=BN_new(); | 594 | BN_init(&B); |
595 | BN_init(&n); | ||
447 | 596 | ||
448 | mont=BN_MONT_CTX_new(); | 597 | mont=BN_MONT_CTX_new(); |
449 | 598 | ||
450 | BN_rand(a,100,0,0); /**/ | 599 | BN_bntest_rand(&a,100,0,0); /**/ |
451 | BN_rand(b,100,0,0); /**/ | 600 | BN_bntest_rand(&b,100,0,0); /**/ |
452 | for (i=0; i<10; i++) | 601 | for (i=0; i<num2; i++) |
453 | { | 602 | { |
454 | BN_rand(n,(100%BN_BITS2+1)*BN_BITS2*i*BN_BITS2,0,1); /**/ | 603 | int bits = (200*(i+1))/num2; |
455 | BN_MONT_CTX_set(mont,n,ctx); | 604 | |
605 | if (bits == 0) | ||
606 | continue; | ||
607 | BN_bntest_rand(&n,bits,0,1); | ||
608 | BN_MONT_CTX_set(mont,&n,ctx); | ||
456 | 609 | ||
457 | BN_to_montgomery(A,a,mont,ctx); | 610 | BN_nnmod(&a,&a,&n,ctx); |
458 | BN_to_montgomery(B,b,mont,ctx); | 611 | BN_nnmod(&b,&b,&n,ctx); |
459 | 612 | ||
460 | if (bp == NULL) | 613 | BN_to_montgomery(&A,&a,mont,ctx); |
461 | for (j=0; j<100; j++) | 614 | BN_to_montgomery(&B,&b,mont,ctx); |
462 | BN_mod_mul_montgomery(c,A,B,mont,ctx);/**/ | 615 | |
463 | BN_mod_mul_montgomery(c,A,B,mont,ctx);/**/ | 616 | BN_mod_mul_montgomery(&c,&A,&B,mont,ctx);/**/ |
464 | BN_from_montgomery(A,c,mont,ctx);/**/ | 617 | BN_from_montgomery(&A,&c,mont,ctx);/**/ |
465 | if (bp != NULL) | 618 | if (bp != NULL) |
466 | { | 619 | { |
467 | if (!results) | 620 | if (!results) |
468 | { | 621 | { |
469 | #ifdef undef | 622 | #ifdef undef |
470 | fprintf(stderr,"%d * %d %% %d\n", | 623 | fprintf(stderr,"%d * %d %% %d\n", |
471 | BN_num_bits(a), | 624 | BN_num_bits(&a), |
472 | BN_num_bits(b), | 625 | BN_num_bits(&b), |
473 | BN_num_bits(mont->N)); | 626 | BN_num_bits(mont->N)); |
474 | #endif | 627 | #endif |
475 | BN_print(bp,a); | 628 | BN_print(bp,&a); |
476 | BIO_puts(bp," * "); | 629 | BIO_puts(bp," * "); |
477 | BN_print(bp,b); | 630 | BN_print(bp,&b); |
478 | BIO_puts(bp," % "); | 631 | BIO_puts(bp," % "); |
479 | BN_print(bp,mont->N); | 632 | BN_print(bp,&(mont->N)); |
480 | BIO_puts(bp," - "); | 633 | BIO_puts(bp," - "); |
481 | } | 634 | } |
482 | BN_print(bp,A); | 635 | BN_print(bp,&A); |
483 | BIO_puts(bp,"\n"); | 636 | BIO_puts(bp,"\n"); |
484 | } | 637 | } |
638 | BN_mod_mul(&d,&a,&b,&n,ctx); | ||
639 | BN_sub(&d,&d,&A); | ||
640 | if(!BN_is_zero(&d)) | ||
641 | { | ||
642 | fprintf(stderr,"Montgomery multiplication test failed!\n"); | ||
643 | return 0; | ||
644 | } | ||
485 | } | 645 | } |
486 | BN_MONT_CTX_free(mont); | 646 | BN_MONT_CTX_free(mont); |
487 | BN_free(a); | 647 | BN_free(&a); |
488 | BN_free(b); | 648 | BN_free(&b); |
489 | BN_free(c); | 649 | BN_free(&c); |
650 | BN_free(&d); | ||
651 | BN_free(&A); | ||
652 | BN_free(&B); | ||
653 | BN_free(&n); | ||
490 | return(1); | 654 | return(1); |
491 | } | 655 | } |
492 | 656 | ||
493 | int test_mod(bp,ctx) | 657 | int test_mod(BIO *bp, BN_CTX *ctx) |
494 | BIO *bp; | ||
495 | BN_CTX *ctx; | ||
496 | { | 658 | { |
497 | BIGNUM *a,*b,*c; | 659 | BIGNUM *a,*b,*c,*d,*e; |
498 | int i; | 660 | int i; |
499 | int j; | ||
500 | 661 | ||
501 | a=BN_new(); | 662 | a=BN_new(); |
502 | b=BN_new(); | 663 | b=BN_new(); |
503 | c=BN_new(); | 664 | c=BN_new(); |
665 | d=BN_new(); | ||
666 | e=BN_new(); | ||
504 | 667 | ||
505 | BN_rand(a,1024,0,0); /**/ | 668 | BN_bntest_rand(a,1024,0,0); /**/ |
506 | for (i=0; i<20; i++) | 669 | for (i=0; i<num0; i++) |
507 | { | 670 | { |
508 | BN_rand(b,450+i*10,0,0); /**/ | 671 | BN_bntest_rand(b,450+i*10,0,0); /**/ |
509 | a->neg=rand_neg(); | 672 | a->neg=rand_neg(); |
510 | b->neg=rand_neg(); | 673 | b->neg=rand_neg(); |
511 | if (bp == NULL) | ||
512 | for (j=0; j<100; j++) | ||
513 | BN_mod(c,a,b,ctx);/**/ | ||
514 | BN_mod(c,a,b,ctx);/**/ | 674 | BN_mod(c,a,b,ctx);/**/ |
515 | if (bp != NULL) | 675 | if (bp != NULL) |
516 | { | 676 | { |
@@ -524,19 +684,26 @@ BN_CTX *ctx; | |||
524 | BN_print(bp,c); | 684 | BN_print(bp,c); |
525 | BIO_puts(bp,"\n"); | 685 | BIO_puts(bp,"\n"); |
526 | } | 686 | } |
687 | BN_div(d,e,a,b,ctx); | ||
688 | BN_sub(e,e,c); | ||
689 | if(!BN_is_zero(e)) | ||
690 | { | ||
691 | fprintf(stderr,"Modulo test failed!\n"); | ||
692 | return 0; | ||
693 | } | ||
527 | } | 694 | } |
528 | BN_free(a); | 695 | BN_free(a); |
529 | BN_free(b); | 696 | BN_free(b); |
530 | BN_free(c); | 697 | BN_free(c); |
698 | BN_free(d); | ||
699 | BN_free(e); | ||
531 | return(1); | 700 | return(1); |
532 | } | 701 | } |
533 | 702 | ||
534 | int test_mod_mul(bp,ctx) | 703 | int test_mod_mul(BIO *bp, BN_CTX *ctx) |
535 | BIO *bp; | ||
536 | BN_CTX *ctx; | ||
537 | { | 704 | { |
538 | BIGNUM *a,*b,*c,*d,*e; | 705 | BIGNUM *a,*b,*c,*d,*e; |
539 | int i; | 706 | int i,j; |
540 | 707 | ||
541 | a=BN_new(); | 708 | a=BN_new(); |
542 | b=BN_new(); | 709 | b=BN_new(); |
@@ -544,17 +711,14 @@ BN_CTX *ctx; | |||
544 | d=BN_new(); | 711 | d=BN_new(); |
545 | e=BN_new(); | 712 | e=BN_new(); |
546 | 713 | ||
547 | BN_rand(c,1024,0,0); /**/ | 714 | for (j=0; j<3; j++) { |
548 | for (i=0; i<10; i++) | 715 | BN_bntest_rand(c,1024,0,0); /**/ |
716 | for (i=0; i<num0; i++) | ||
549 | { | 717 | { |
550 | BN_rand(a,475+i*10,0,0); /**/ | 718 | BN_bntest_rand(a,475+i*10,0,0); /**/ |
551 | BN_rand(b,425+i*10,0,0); /**/ | 719 | BN_bntest_rand(b,425+i*11,0,0); /**/ |
552 | a->neg=rand_neg(); | 720 | a->neg=rand_neg(); |
553 | b->neg=rand_neg(); | 721 | b->neg=rand_neg(); |
554 | /* if (bp == NULL) | ||
555 | for (j=0; j<100; j++) | ||
556 | BN_mod_mul(d,a,b,c,ctx);*/ /**/ | ||
557 | |||
558 | if (!BN_mod_mul(e,a,b,c,ctx)) | 722 | if (!BN_mod_mul(e,a,b,c,ctx)) |
559 | { | 723 | { |
560 | unsigned long l; | 724 | unsigned long l; |
@@ -573,12 +737,32 @@ BN_CTX *ctx; | |||
573 | BN_print(bp,b); | 737 | BN_print(bp,b); |
574 | BIO_puts(bp," % "); | 738 | BIO_puts(bp," % "); |
575 | BN_print(bp,c); | 739 | BN_print(bp,c); |
740 | if ((a->neg ^ b->neg) && !BN_is_zero(e)) | ||
741 | { | ||
742 | /* If (a*b) % c is negative, c must be added | ||
743 | * in order to obtain the normalized remainder | ||
744 | * (new with OpenSSL 0.9.7, previous versions of | ||
745 | * BN_mod_mul could generate negative results) | ||
746 | */ | ||
747 | BIO_puts(bp," + "); | ||
748 | BN_print(bp,c); | ||
749 | } | ||
576 | BIO_puts(bp," - "); | 750 | BIO_puts(bp," - "); |
577 | } | 751 | } |
578 | BN_print(bp,e); | 752 | BN_print(bp,e); |
579 | BIO_puts(bp,"\n"); | 753 | BIO_puts(bp,"\n"); |
580 | } | 754 | } |
755 | BN_mul(d,a,b,ctx); | ||
756 | BN_sub(d,d,e); | ||
757 | BN_div(a,b,d,c,ctx); | ||
758 | if(!BN_is_zero(b)) | ||
759 | { | ||
760 | fprintf(stderr,"Modulo multiply test failed!\n"); | ||
761 | ERR_print_errors_fp(stderr); | ||
762 | return 0; | ||
763 | } | ||
581 | } | 764 | } |
765 | } | ||
582 | BN_free(a); | 766 | BN_free(a); |
583 | BN_free(b); | 767 | BN_free(b); |
584 | BN_free(c); | 768 | BN_free(c); |
@@ -587,9 +771,7 @@ BN_CTX *ctx; | |||
587 | return(1); | 771 | return(1); |
588 | } | 772 | } |
589 | 773 | ||
590 | int test_mod_exp(bp,ctx) | 774 | int test_mod_exp(BIO *bp, BN_CTX *ctx) |
591 | BIO *bp; | ||
592 | BN_CTX *ctx; | ||
593 | { | 775 | { |
594 | BIGNUM *a,*b,*c,*d,*e; | 776 | BIGNUM *a,*b,*c,*d,*e; |
595 | int i; | 777 | int i; |
@@ -600,11 +782,11 @@ BN_CTX *ctx; | |||
600 | d=BN_new(); | 782 | d=BN_new(); |
601 | e=BN_new(); | 783 | e=BN_new(); |
602 | 784 | ||
603 | BN_rand(c,30,0,1); /* must be odd for montgomery */ | 785 | BN_bntest_rand(c,30,0,1); /* must be odd for montgomery */ |
604 | for (i=0; i<6; i++) | 786 | for (i=0; i<num2; i++) |
605 | { | 787 | { |
606 | BN_rand(a,20+i*5,0,0); /**/ | 788 | BN_bntest_rand(a,20+i*5,0,0); /**/ |
607 | BN_rand(b,2+i,0,0); /**/ | 789 | BN_bntest_rand(b,2+i,0,0); /**/ |
608 | 790 | ||
609 | if (!BN_mod_exp(d,a,b,c,ctx)) | 791 | if (!BN_mod_exp(d,a,b,c,ctx)) |
610 | return(00); | 792 | return(00); |
@@ -623,6 +805,14 @@ BN_CTX *ctx; | |||
623 | BN_print(bp,d); | 805 | BN_print(bp,d); |
624 | BIO_puts(bp,"\n"); | 806 | BIO_puts(bp,"\n"); |
625 | } | 807 | } |
808 | BN_exp(e,a,b,ctx); | ||
809 | BN_sub(e,e,d); | ||
810 | BN_div(a,b,e,c,ctx); | ||
811 | if(!BN_is_zero(b)) | ||
812 | { | ||
813 | fprintf(stderr,"Modulo exponentiation test failed!\n"); | ||
814 | return 0; | ||
815 | } | ||
626 | } | 816 | } |
627 | BN_free(a); | 817 | BN_free(a); |
628 | BN_free(b); | 818 | BN_free(b); |
@@ -632,20 +822,252 @@ BN_CTX *ctx; | |||
632 | return(1); | 822 | return(1); |
633 | } | 823 | } |
634 | 824 | ||
635 | int test_lshift(bp) | 825 | int test_exp(BIO *bp, BN_CTX *ctx) |
636 | BIO *bp; | ||
637 | { | 826 | { |
638 | BIGNUM *a,*b,*c; | 827 | BIGNUM *a,*b,*d,*e,*one; |
639 | int i; | 828 | int i; |
640 | 829 | ||
641 | a=BN_new(); | 830 | a=BN_new(); |
642 | b=BN_new(); | 831 | b=BN_new(); |
832 | d=BN_new(); | ||
833 | e=BN_new(); | ||
834 | one=BN_new(); | ||
835 | BN_one(one); | ||
836 | |||
837 | for (i=0; i<num2; i++) | ||
838 | { | ||
839 | BN_bntest_rand(a,20+i*5,0,0); /**/ | ||
840 | BN_bntest_rand(b,2+i,0,0); /**/ | ||
841 | |||
842 | if (!BN_exp(d,a,b,ctx)) | ||
843 | return(00); | ||
844 | |||
845 | if (bp != NULL) | ||
846 | { | ||
847 | if (!results) | ||
848 | { | ||
849 | BN_print(bp,a); | ||
850 | BIO_puts(bp," ^ "); | ||
851 | BN_print(bp,b); | ||
852 | BIO_puts(bp," - "); | ||
853 | } | ||
854 | BN_print(bp,d); | ||
855 | BIO_puts(bp,"\n"); | ||
856 | } | ||
857 | BN_one(e); | ||
858 | for( ; !BN_is_zero(b) ; BN_sub(b,b,one)) | ||
859 | BN_mul(e,e,a,ctx); | ||
860 | BN_sub(e,e,d); | ||
861 | if(!BN_is_zero(e)) | ||
862 | { | ||
863 | fprintf(stderr,"Exponentiation test failed!\n"); | ||
864 | return 0; | ||
865 | } | ||
866 | } | ||
867 | BN_free(a); | ||
868 | BN_free(b); | ||
869 | BN_free(d); | ||
870 | BN_free(e); | ||
871 | BN_free(one); | ||
872 | return(1); | ||
873 | } | ||
874 | |||
875 | static void genprime_cb(int p, int n, void *arg) | ||
876 | { | ||
877 | char c='*'; | ||
878 | |||
879 | if (p == 0) c='.'; | ||
880 | if (p == 1) c='+'; | ||
881 | if (p == 2) c='*'; | ||
882 | if (p == 3) c='\n'; | ||
883 | putc(c, stderr); | ||
884 | fflush(stderr); | ||
885 | (void)n; | ||
886 | (void)arg; | ||
887 | } | ||
888 | |||
889 | int test_kron(BIO *bp, BN_CTX *ctx) | ||
890 | { | ||
891 | BIGNUM *a,*b,*r,*t; | ||
892 | int i; | ||
893 | int legendre, kronecker; | ||
894 | int ret = 0; | ||
895 | |||
896 | a = BN_new(); | ||
897 | b = BN_new(); | ||
898 | r = BN_new(); | ||
899 | t = BN_new(); | ||
900 | if (a == NULL || b == NULL || r == NULL || t == NULL) goto err; | ||
901 | |||
902 | /* We test BN_kronecker(a, b, ctx) just for b odd (Jacobi symbol). | ||
903 | * In this case we know that if b is prime, then BN_kronecker(a, b, ctx) | ||
904 | * is congruent to $a^{(b-1)/2}$, modulo $b$ (Legendre symbol). | ||
905 | * So we generate a random prime b and compare these values | ||
906 | * for a number of random a's. (That is, we run the Solovay-Strassen | ||
907 | * primality test to confirm that b is prime, except that we | ||
908 | * don't want to test whether b is prime but whether BN_kronecker | ||
909 | * works.) */ | ||
910 | |||
911 | if (!BN_generate_prime(b, 512, 0, NULL, NULL, genprime_cb, NULL)) goto err; | ||
912 | b->neg = rand_neg(); | ||
913 | putc('\n', stderr); | ||
914 | |||
915 | for (i = 0; i < num0; i++) | ||
916 | { | ||
917 | if (!BN_bntest_rand(a, 512, 0, 0)) goto err; | ||
918 | a->neg = rand_neg(); | ||
919 | |||
920 | /* t := (|b|-1)/2 (note that b is odd) */ | ||
921 | if (!BN_copy(t, b)) goto err; | ||
922 | t->neg = 0; | ||
923 | if (!BN_sub_word(t, 1)) goto err; | ||
924 | if (!BN_rshift1(t, t)) goto err; | ||
925 | /* r := a^t mod b */ | ||
926 | b->neg=0; | ||
927 | |||
928 | if (!BN_mod_exp_recp(r, a, t, b, ctx)) goto err; /* XXX should be BN_mod_exp_recp, but ..._recp triggers a bug that must be fixed */ | ||
929 | b->neg=1; | ||
930 | |||
931 | if (BN_is_word(r, 1)) | ||
932 | legendre = 1; | ||
933 | else if (BN_is_zero(r)) | ||
934 | legendre = 0; | ||
935 | else | ||
936 | { | ||
937 | if (!BN_add_word(r, 1)) goto err; | ||
938 | if (0 != BN_ucmp(r, b)) | ||
939 | { | ||
940 | fprintf(stderr, "Legendre symbol computation failed\n"); | ||
941 | goto err; | ||
942 | } | ||
943 | legendre = -1; | ||
944 | } | ||
945 | |||
946 | kronecker = BN_kronecker(a, b, ctx); | ||
947 | if (kronecker < -1) goto err; | ||
948 | /* we actually need BN_kronecker(a, |b|) */ | ||
949 | if (a->neg && b->neg) | ||
950 | kronecker = -kronecker; | ||
951 | |||
952 | if (legendre != kronecker) | ||
953 | { | ||
954 | fprintf(stderr, "legendre != kronecker; a = "); | ||
955 | BN_print_fp(stderr, a); | ||
956 | fprintf(stderr, ", b = "); | ||
957 | BN_print_fp(stderr, b); | ||
958 | fprintf(stderr, "\n"); | ||
959 | goto err; | ||
960 | } | ||
961 | |||
962 | putc('.', stderr); | ||
963 | fflush(stderr); | ||
964 | } | ||
965 | |||
966 | putc('\n', stderr); | ||
967 | fflush(stderr); | ||
968 | ret = 1; | ||
969 | err: | ||
970 | if (a != NULL) BN_free(a); | ||
971 | if (b != NULL) BN_free(b); | ||
972 | if (r != NULL) BN_free(r); | ||
973 | if (t != NULL) BN_free(t); | ||
974 | return ret; | ||
975 | } | ||
976 | |||
977 | int test_sqrt(BIO *bp, BN_CTX *ctx) | ||
978 | { | ||
979 | BIGNUM *a,*p,*r; | ||
980 | int i, j; | ||
981 | int ret = 0; | ||
982 | |||
983 | a = BN_new(); | ||
984 | p = BN_new(); | ||
985 | r = BN_new(); | ||
986 | if (a == NULL || p == NULL || r == NULL) goto err; | ||
987 | |||
988 | for (i = 0; i < 16; i++) | ||
989 | { | ||
990 | if (i < 8) | ||
991 | { | ||
992 | unsigned primes[8] = { 2, 3, 5, 7, 11, 13, 17, 19 }; | ||
993 | |||
994 | if (!BN_set_word(p, primes[i])) goto err; | ||
995 | } | ||
996 | else | ||
997 | { | ||
998 | if (!BN_set_word(a, 32)) goto err; | ||
999 | if (!BN_set_word(r, 2*i + 1)) goto err; | ||
1000 | |||
1001 | if (!BN_generate_prime(p, 256, 0, a, r, genprime_cb, NULL)) goto err; | ||
1002 | putc('\n', stderr); | ||
1003 | } | ||
1004 | p->neg = rand_neg(); | ||
1005 | |||
1006 | for (j = 0; j < num2; j++) | ||
1007 | { | ||
1008 | /* construct 'a' such that it is a square modulo p, | ||
1009 | * but in general not a proper square and not reduced modulo p */ | ||
1010 | if (!BN_bntest_rand(r, 256, 0, 3)) goto err; | ||
1011 | if (!BN_nnmod(r, r, p, ctx)) goto err; | ||
1012 | if (!BN_mod_sqr(r, r, p, ctx)) goto err; | ||
1013 | if (!BN_bntest_rand(a, 256, 0, 3)) goto err; | ||
1014 | if (!BN_nnmod(a, a, p, ctx)) goto err; | ||
1015 | if (!BN_mod_sqr(a, a, p, ctx)) goto err; | ||
1016 | if (!BN_mul(a, a, r, ctx)) goto err; | ||
1017 | if (rand_neg()) | ||
1018 | if (!BN_sub(a, a, p)) goto err; | ||
1019 | |||
1020 | if (!BN_mod_sqrt(r, a, p, ctx)) goto err; | ||
1021 | if (!BN_mod_sqr(r, r, p, ctx)) goto err; | ||
1022 | |||
1023 | if (!BN_nnmod(a, a, p, ctx)) goto err; | ||
1024 | |||
1025 | if (BN_cmp(a, r) != 0) | ||
1026 | { | ||
1027 | fprintf(stderr, "BN_mod_sqrt failed: a = "); | ||
1028 | BN_print_fp(stderr, a); | ||
1029 | fprintf(stderr, ", r = "); | ||
1030 | BN_print_fp(stderr, r); | ||
1031 | fprintf(stderr, ", p = "); | ||
1032 | BN_print_fp(stderr, p); | ||
1033 | fprintf(stderr, "\n"); | ||
1034 | goto err; | ||
1035 | } | ||
1036 | |||
1037 | putc('.', stderr); | ||
1038 | fflush(stderr); | ||
1039 | } | ||
1040 | |||
1041 | putc('\n', stderr); | ||
1042 | fflush(stderr); | ||
1043 | } | ||
1044 | ret = 1; | ||
1045 | err: | ||
1046 | if (a != NULL) BN_free(a); | ||
1047 | if (p != NULL) BN_free(p); | ||
1048 | if (r != NULL) BN_free(r); | ||
1049 | return ret; | ||
1050 | } | ||
1051 | |||
1052 | int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_) | ||
1053 | { | ||
1054 | BIGNUM *a,*b,*c,*d; | ||
1055 | int i; | ||
1056 | |||
1057 | b=BN_new(); | ||
643 | c=BN_new(); | 1058 | c=BN_new(); |
1059 | d=BN_new(); | ||
644 | BN_one(c); | 1060 | BN_one(c); |
645 | 1061 | ||
646 | BN_rand(a,200,0,0); /**/ | 1062 | if(a_) |
647 | a->neg=rand_neg(); | 1063 | a=a_; |
648 | for (i=0; i<70; i++) | 1064 | else |
1065 | { | ||
1066 | a=BN_new(); | ||
1067 | BN_bntest_rand(a,200,0,0); /**/ | ||
1068 | a->neg=rand_neg(); | ||
1069 | } | ||
1070 | for (i=0; i<num0; i++) | ||
649 | { | 1071 | { |
650 | BN_lshift(b,a,i+1); | 1072 | BN_lshift(b,a,i+1); |
651 | BN_add(c,c,c); | 1073 | BN_add(c,c,c); |
@@ -661,25 +1083,42 @@ BIO *bp; | |||
661 | BN_print(bp,b); | 1083 | BN_print(bp,b); |
662 | BIO_puts(bp,"\n"); | 1084 | BIO_puts(bp,"\n"); |
663 | } | 1085 | } |
1086 | BN_mul(d,a,c,ctx); | ||
1087 | BN_sub(d,d,b); | ||
1088 | if(!BN_is_zero(d)) | ||
1089 | { | ||
1090 | fprintf(stderr,"Left shift test failed!\n"); | ||
1091 | fprintf(stderr,"a="); | ||
1092 | BN_print_fp(stderr,a); | ||
1093 | fprintf(stderr,"\nb="); | ||
1094 | BN_print_fp(stderr,b); | ||
1095 | fprintf(stderr,"\nc="); | ||
1096 | BN_print_fp(stderr,c); | ||
1097 | fprintf(stderr,"\nd="); | ||
1098 | BN_print_fp(stderr,d); | ||
1099 | fprintf(stderr,"\n"); | ||
1100 | return 0; | ||
1101 | } | ||
664 | } | 1102 | } |
665 | BN_free(a); | 1103 | BN_free(a); |
666 | BN_free(b); | 1104 | BN_free(b); |
667 | BN_free(c); | 1105 | BN_free(c); |
1106 | BN_free(d); | ||
668 | return(1); | 1107 | return(1); |
669 | } | 1108 | } |
670 | 1109 | ||
671 | int test_lshift1(bp) | 1110 | int test_lshift1(BIO *bp) |
672 | BIO *bp; | ||
673 | { | 1111 | { |
674 | BIGNUM *a,*b; | 1112 | BIGNUM *a,*b,*c; |
675 | int i; | 1113 | int i; |
676 | 1114 | ||
677 | a=BN_new(); | 1115 | a=BN_new(); |
678 | b=BN_new(); | 1116 | b=BN_new(); |
1117 | c=BN_new(); | ||
679 | 1118 | ||
680 | BN_rand(a,200,0,0); /**/ | 1119 | BN_bntest_rand(a,200,0,0); /**/ |
681 | a->neg=rand_neg(); | 1120 | a->neg=rand_neg(); |
682 | for (i=0; i<70; i++) | 1121 | for (i=0; i<num0; i++) |
683 | { | 1122 | { |
684 | BN_lshift1(b,a); | 1123 | BN_lshift1(b,a); |
685 | if (bp != NULL) | 1124 | if (bp != NULL) |
@@ -693,27 +1132,37 @@ BIO *bp; | |||
693 | BN_print(bp,b); | 1132 | BN_print(bp,b); |
694 | BIO_puts(bp,"\n"); | 1133 | BIO_puts(bp,"\n"); |
695 | } | 1134 | } |
1135 | BN_add(c,a,a); | ||
1136 | BN_sub(a,b,c); | ||
1137 | if(!BN_is_zero(a)) | ||
1138 | { | ||
1139 | fprintf(stderr,"Left shift one test failed!\n"); | ||
1140 | return 0; | ||
1141 | } | ||
1142 | |||
696 | BN_copy(a,b); | 1143 | BN_copy(a,b); |
697 | } | 1144 | } |
698 | BN_free(a); | 1145 | BN_free(a); |
699 | BN_free(b); | 1146 | BN_free(b); |
1147 | BN_free(c); | ||
700 | return(1); | 1148 | return(1); |
701 | } | 1149 | } |
702 | 1150 | ||
703 | int test_rshift(bp) | 1151 | int test_rshift(BIO *bp,BN_CTX *ctx) |
704 | BIO *bp; | ||
705 | { | 1152 | { |
706 | BIGNUM *a,*b,*c; | 1153 | BIGNUM *a,*b,*c,*d,*e; |
707 | int i; | 1154 | int i; |
708 | 1155 | ||
709 | a=BN_new(); | 1156 | a=BN_new(); |
710 | b=BN_new(); | 1157 | b=BN_new(); |
711 | c=BN_new(); | 1158 | c=BN_new(); |
1159 | d=BN_new(); | ||
1160 | e=BN_new(); | ||
712 | BN_one(c); | 1161 | BN_one(c); |
713 | 1162 | ||
714 | BN_rand(a,200,0,0); /**/ | 1163 | BN_bntest_rand(a,200,0,0); /**/ |
715 | a->neg=rand_neg(); | 1164 | a->neg=rand_neg(); |
716 | for (i=0; i<70; i++) | 1165 | for (i=0; i<num0; i++) |
717 | { | 1166 | { |
718 | BN_rshift(b,a,i+1); | 1167 | BN_rshift(b,a,i+1); |
719 | BN_add(c,c,c); | 1168 | BN_add(c,c,c); |
@@ -729,25 +1178,34 @@ BIO *bp; | |||
729 | BN_print(bp,b); | 1178 | BN_print(bp,b); |
730 | BIO_puts(bp,"\n"); | 1179 | BIO_puts(bp,"\n"); |
731 | } | 1180 | } |
1181 | BN_div(d,e,a,c,ctx); | ||
1182 | BN_sub(d,d,b); | ||
1183 | if(!BN_is_zero(d)) | ||
1184 | { | ||
1185 | fprintf(stderr,"Right shift test failed!\n"); | ||
1186 | return 0; | ||
1187 | } | ||
732 | } | 1188 | } |
733 | BN_free(a); | 1189 | BN_free(a); |
734 | BN_free(b); | 1190 | BN_free(b); |
735 | BN_free(c); | 1191 | BN_free(c); |
1192 | BN_free(d); | ||
1193 | BN_free(e); | ||
736 | return(1); | 1194 | return(1); |
737 | } | 1195 | } |
738 | 1196 | ||
739 | int test_rshift1(bp) | 1197 | int test_rshift1(BIO *bp) |
740 | BIO *bp; | ||
741 | { | 1198 | { |
742 | BIGNUM *a,*b; | 1199 | BIGNUM *a,*b,*c; |
743 | int i; | 1200 | int i; |
744 | 1201 | ||
745 | a=BN_new(); | 1202 | a=BN_new(); |
746 | b=BN_new(); | 1203 | b=BN_new(); |
1204 | c=BN_new(); | ||
747 | 1205 | ||
748 | BN_rand(a,200,0,0); /**/ | 1206 | BN_bntest_rand(a,200,0,0); /**/ |
749 | a->neg=rand_neg(); | 1207 | a->neg=rand_neg(); |
750 | for (i=0; i<70; i++) | 1208 | for (i=0; i<num0; i++) |
751 | { | 1209 | { |
752 | BN_rshift1(b,a); | 1210 | BN_rshift1(b,a); |
753 | if (bp != NULL) | 1211 | if (bp != NULL) |
@@ -761,14 +1219,22 @@ BIO *bp; | |||
761 | BN_print(bp,b); | 1219 | BN_print(bp,b); |
762 | BIO_puts(bp,"\n"); | 1220 | BIO_puts(bp,"\n"); |
763 | } | 1221 | } |
1222 | BN_sub(c,a,b); | ||
1223 | BN_sub(c,c,b); | ||
1224 | if(!BN_is_zero(c) && !BN_abs_is_word(c, 1)) | ||
1225 | { | ||
1226 | fprintf(stderr,"Right shift one test failed!\n"); | ||
1227 | return 0; | ||
1228 | } | ||
764 | BN_copy(a,b); | 1229 | BN_copy(a,b); |
765 | } | 1230 | } |
766 | BN_free(a); | 1231 | BN_free(a); |
767 | BN_free(b); | 1232 | BN_free(b); |
1233 | BN_free(c); | ||
768 | return(1); | 1234 | return(1); |
769 | } | 1235 | } |
770 | 1236 | ||
771 | int rand_neg() | 1237 | int rand_neg(void) |
772 | { | 1238 | { |
773 | static unsigned int neg=0; | 1239 | static unsigned int neg=0; |
774 | static int sign[8]={0,0,0,1,1,0,1,1}; | 1240 | static int sign[8]={0,0,0,1,1,0,1,1}; |
diff --git a/src/lib/libcrypto/bn/exp.c b/src/lib/libcrypto/bn/exp.c index ec443459d8..4865b0ef74 100644 --- a/src/lib/libcrypto/bn/exp.c +++ b/src/lib/libcrypto/bn/exp.c | |||
@@ -1,3 +1,5 @@ | |||
1 | /* unused */ | ||
2 | |||
1 | #include <stdio.h> | 3 | #include <stdio.h> |
2 | #include <openssl/tmdiff.h> | 4 | #include <openssl/tmdiff.h> |
3 | #include "bn_lcl.h" | 5 | #include "bn_lcl.h" |
diff --git a/src/lib/libcrypto/bn/expspeed.c b/src/lib/libcrypto/bn/expspeed.c index 344f883d35..07a1bcf51c 100644 --- a/src/lib/libcrypto/bn/expspeed.c +++ b/src/lib/libcrypto/bn/expspeed.c | |||
@@ -1,3 +1,5 @@ | |||
1 | /* unused */ | ||
2 | |||
1 | /* crypto/bn/expspeed.c */ | 3 | /* crypto/bn/expspeed.c */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 4 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 5 | * All rights reserved. |
@@ -59,6 +61,31 @@ | |||
59 | /* most of this code has been pilfered from my libdes speed.c program */ | 61 | /* most of this code has been pilfered from my libdes speed.c program */ |
60 | 62 | ||
61 | #define BASENUM 5000 | 63 | #define BASENUM 5000 |
64 | #define NUM_START 0 | ||
65 | |||
66 | |||
67 | /* determine timings for modexp, modmul, modsqr, gcd, Kronecker symbol, | ||
68 | * modular inverse, or modular square roots */ | ||
69 | #define TEST_EXP | ||
70 | #undef TEST_MUL | ||
71 | #undef TEST_SQR | ||
72 | #undef TEST_GCD | ||
73 | #undef TEST_KRON | ||
74 | #undef TEST_INV | ||
75 | #undef TEST_SQRT | ||
76 | #define P_MOD_64 9 /* least significant 6 bits for prime to be used for BN_sqrt timings */ | ||
77 | |||
78 | #if defined(TEST_EXP) + defined(TEST_MUL) + defined(TEST_SQR) + defined(TEST_GCD) + defined(TEST_KRON) + defined(TEST_INV) +defined(TEST_SQRT) != 1 | ||
79 | # error "choose one test" | ||
80 | #endif | ||
81 | |||
82 | #if defined(TEST_INV) || defined(TEST_SQRT) | ||
83 | # define C_PRIME | ||
84 | static void genprime_cb(int p, int n, void *arg); | ||
85 | #endif | ||
86 | |||
87 | |||
88 | |||
62 | #undef PROG | 89 | #undef PROG |
63 | #define PROG bnspeed_main | 90 | #define PROG bnspeed_main |
64 | 91 | ||
@@ -66,14 +93,14 @@ | |||
66 | #include <stdlib.h> | 93 | #include <stdlib.h> |
67 | #include <signal.h> | 94 | #include <signal.h> |
68 | #include <string.h> | 95 | #include <string.h> |
69 | #include "crypto.h" | 96 | #include <openssl/crypto.h> |
70 | #include "err.h" | 97 | #include <openssl/err.h> |
98 | #include <openssl/rand.h> | ||
71 | 99 | ||
72 | #ifndef MSDOS | 100 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
73 | #define TIMES | 101 | #define TIMES |
74 | #endif | 102 | #endif |
75 | 103 | ||
76 | #ifndef VMS | ||
77 | #ifndef _IRIX | 104 | #ifndef _IRIX |
78 | #include <time.h> | 105 | #include <time.h> |
79 | #endif | 106 | #endif |
@@ -81,36 +108,33 @@ | |||
81 | #include <sys/types.h> | 108 | #include <sys/types.h> |
82 | #include <sys/times.h> | 109 | #include <sys/times.h> |
83 | #endif | 110 | #endif |
84 | #else /* VMS */ | 111 | |
85 | #include <types.h> | 112 | /* Depending on the VMS version, the tms structure is perhaps defined. |
86 | struct tms { | 113 | The __TMS macro will show if it was. If it wasn't defined, we should |
87 | time_t tms_utime; | 114 | undefine TIMES, since that tells the rest of the program how things |
88 | time_t tms_stime; | 115 | should be handled. -- Richard Levitte */ |
89 | time_t tms_uchild; /* I dunno... */ | 116 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
90 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 117 | #undef TIMES |
91 | } | ||
92 | #endif | 118 | #endif |
119 | |||
93 | #ifndef TIMES | 120 | #ifndef TIMES |
94 | #include <sys/timeb.h> | 121 | #include <sys/timeb.h> |
95 | #endif | 122 | #endif |
96 | 123 | ||
97 | #ifdef sun | 124 | #if defined(sun) || defined(__ultrix) |
125 | #define _POSIX_SOURCE | ||
98 | #include <limits.h> | 126 | #include <limits.h> |
99 | #include <sys/param.h> | 127 | #include <sys/param.h> |
100 | #endif | 128 | #endif |
101 | 129 | ||
102 | #include "bn.h" | 130 | #include <openssl/bn.h> |
103 | #include "x509.h" | 131 | #include <openssl/x509.h> |
104 | 132 | ||
105 | /* The following if from times(3) man page. It may need to be changed */ | 133 | /* The following if from times(3) man page. It may need to be changed */ |
106 | #ifndef HZ | 134 | #ifndef HZ |
107 | # ifndef CLK_TCK | 135 | # ifndef CLK_TCK |
108 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ | 136 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ |
109 | # ifndef VMS | 137 | # define HZ 100.0 |
110 | # define HZ 100.0 | ||
111 | # else /* VMS */ | ||
112 | # define HZ 100.0 | ||
113 | # endif | ||
114 | # else /* _BSD_CLK_TCK_ */ | 138 | # else /* _BSD_CLK_TCK_ */ |
115 | # define HZ ((double)_BSD_CLK_TCK_) | 139 | # define HZ ((double)_BSD_CLK_TCK_) |
116 | # endif | 140 | # endif |
@@ -123,17 +147,11 @@ struct tms { | |||
123 | #define BUFSIZE ((long)1024*8) | 147 | #define BUFSIZE ((long)1024*8) |
124 | int run=0; | 148 | int run=0; |
125 | 149 | ||
126 | #ifndef NOPROTO | ||
127 | static double Time_F(int s); | 150 | static double Time_F(int s); |
128 | #else | ||
129 | static double Time_F(); | ||
130 | #endif | ||
131 | |||
132 | #define START 0 | 151 | #define START 0 |
133 | #define STOP 1 | 152 | #define STOP 1 |
134 | 153 | ||
135 | static double Time_F(s) | 154 | static double Time_F(int s) |
136 | int s; | ||
137 | { | 155 | { |
138 | double ret; | 156 | double ret; |
139 | #ifdef TIMES | 157 | #ifdef TIMES |
@@ -169,62 +187,167 @@ int s; | |||
169 | #endif | 187 | #endif |
170 | } | 188 | } |
171 | 189 | ||
172 | #define NUM_SIZES 6 | 190 | #define NUM_SIZES 7 |
173 | static int sizes[NUM_SIZES]={256,512,1024,2048,4096,8192}; | 191 | #if NUM_START > NUM_SIZES |
174 | static int mul_c[NUM_SIZES]={8*8*8*8*8,8*8*8*8,8*8*8,8*8,8,1}; | 192 | # error "NUM_START > NUM_SIZES" |
193 | #endif | ||
194 | static int sizes[NUM_SIZES]={128,256,512,1024,2048,4096,8192}; | ||
195 | static int mul_c[NUM_SIZES]={8*8*8*8*8*8,8*8*8*8*8,8*8*8*8,8*8*8,8*8,8,1}; | ||
175 | /*static int sizes[NUM_SIZES]={59,179,299,419,539}; */ | 196 | /*static int sizes[NUM_SIZES]={59,179,299,419,539}; */ |
176 | 197 | ||
198 | #define RAND_SEED(string) { const char str[] = string; RAND_seed(string, sizeof str); } | ||
199 | |||
177 | void do_mul_exp(BIGNUM *r,BIGNUM *a,BIGNUM *b,BIGNUM *c,BN_CTX *ctx); | 200 | void do_mul_exp(BIGNUM *r,BIGNUM *a,BIGNUM *b,BIGNUM *c,BN_CTX *ctx); |
178 | 201 | ||
179 | int main(argc,argv) | 202 | int main(int argc, char **argv) |
180 | int argc; | ||
181 | char **argv; | ||
182 | { | 203 | { |
183 | BN_CTX *ctx; | 204 | BN_CTX *ctx; |
184 | BIGNUM *a,*b,*c,*r; | 205 | BIGNUM *a,*b,*c,*r; |
185 | 206 | ||
207 | #if 1 | ||
208 | if (!CRYPTO_set_mem_debug_functions(0,0,0,0,0)) | ||
209 | abort(); | ||
210 | #endif | ||
211 | |||
186 | ctx=BN_CTX_new(); | 212 | ctx=BN_CTX_new(); |
187 | a=BN_new(); | 213 | a=BN_new(); |
188 | b=BN_new(); | 214 | b=BN_new(); |
189 | c=BN_new(); | 215 | c=BN_new(); |
190 | r=BN_new(); | 216 | r=BN_new(); |
191 | 217 | ||
218 | while (!RAND_status()) | ||
219 | /* not enough bits */ | ||
220 | RAND_SEED("I demand a manual recount!"); | ||
221 | |||
192 | do_mul_exp(r,a,b,c,ctx); | 222 | do_mul_exp(r,a,b,c,ctx); |
223 | return 0; | ||
193 | } | 224 | } |
194 | 225 | ||
195 | void do_mul_exp(r,a,b,c,ctx) | 226 | void do_mul_exp(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *c, BN_CTX *ctx) |
196 | BIGNUM *r; | ||
197 | BIGNUM *a; | ||
198 | BIGNUM *b; | ||
199 | BIGNUM *c; | ||
200 | BN_CTX *ctx; | ||
201 | { | 227 | { |
202 | int i,k; | 228 | int i,k; |
203 | double tm; | 229 | double tm; |
204 | long num; | 230 | long num; |
205 | BN_MONT_CTX m; | ||
206 | |||
207 | memset(&m,0,sizeof(m)); | ||
208 | 231 | ||
209 | num=BASENUM; | 232 | num=BASENUM; |
210 | for (i=0; i<NUM_SIZES; i++) | 233 | for (i=NUM_START; i<NUM_SIZES; i++) |
211 | { | 234 | { |
212 | BN_rand(a,sizes[i],1,0); | 235 | #ifdef C_PRIME |
213 | BN_rand(b,sizes[i],1,0); | 236 | # ifdef TEST_SQRT |
214 | BN_rand(c,sizes[i],1,1); | 237 | if (!BN_set_word(a, 64)) goto err; |
215 | BN_mod(a,a,c,ctx); | 238 | if (!BN_set_word(b, P_MOD_64)) goto err; |
216 | BN_mod(b,b,c,ctx); | 239 | # define ADD a |
217 | 240 | # define REM b | |
218 | BN_MONT_CTX_set(&m,c,ctx); | 241 | # else |
242 | # define ADD NULL | ||
243 | # define REM NULL | ||
244 | # endif | ||
245 | if (!BN_generate_prime(c,sizes[i],0,ADD,REM,genprime_cb,NULL)) goto err; | ||
246 | putc('\n', stderr); | ||
247 | fflush(stderr); | ||
248 | #endif | ||
219 | 249 | ||
220 | Time_F(START); | ||
221 | for (k=0; k<num; k++) | 250 | for (k=0; k<num; k++) |
222 | BN_mod_exp_mont(r,a,b,c,ctx,&m); | 251 | { |
252 | if (k%50 == 0) /* Average over num/50 different choices of random numbers. */ | ||
253 | { | ||
254 | if (!BN_pseudo_rand(a,sizes[i],1,0)) goto err; | ||
255 | |||
256 | if (!BN_pseudo_rand(b,sizes[i],1,0)) goto err; | ||
257 | |||
258 | #ifndef C_PRIME | ||
259 | if (!BN_pseudo_rand(c,sizes[i],1,1)) goto err; | ||
260 | #endif | ||
261 | |||
262 | #ifdef TEST_SQRT | ||
263 | if (!BN_mod_sqr(a,a,c,ctx)) goto err; | ||
264 | if (!BN_mod_sqr(b,b,c,ctx)) goto err; | ||
265 | #else | ||
266 | if (!BN_nnmod(a,a,c,ctx)) goto err; | ||
267 | if (!BN_nnmod(b,b,c,ctx)) goto err; | ||
268 | #endif | ||
269 | |||
270 | if (k == 0) | ||
271 | Time_F(START); | ||
272 | } | ||
273 | |||
274 | #if defined(TEST_EXP) | ||
275 | if (!BN_mod_exp(r,a,b,c,ctx)) goto err; | ||
276 | #elif defined(TEST_MUL) | ||
277 | { | ||
278 | int i = 0; | ||
279 | for (i = 0; i < 50; i++) | ||
280 | if (!BN_mod_mul(r,a,b,c,ctx)) goto err; | ||
281 | } | ||
282 | #elif defined(TEST_SQR) | ||
283 | { | ||
284 | int i = 0; | ||
285 | for (i = 0; i < 50; i++) | ||
286 | { | ||
287 | if (!BN_mod_sqr(r,a,c,ctx)) goto err; | ||
288 | if (!BN_mod_sqr(r,b,c,ctx)) goto err; | ||
289 | } | ||
290 | } | ||
291 | #elif defined(TEST_GCD) | ||
292 | if (!BN_gcd(r,a,b,ctx)) goto err; | ||
293 | if (!BN_gcd(r,b,c,ctx)) goto err; | ||
294 | if (!BN_gcd(r,c,a,ctx)) goto err; | ||
295 | #elif defined(TEST_KRON) | ||
296 | if (-2 == BN_kronecker(a,b,ctx)) goto err; | ||
297 | if (-2 == BN_kronecker(b,c,ctx)) goto err; | ||
298 | if (-2 == BN_kronecker(c,a,ctx)) goto err; | ||
299 | #elif defined(TEST_INV) | ||
300 | if (!BN_mod_inverse(r,a,c,ctx)) goto err; | ||
301 | if (!BN_mod_inverse(r,b,c,ctx)) goto err; | ||
302 | #else /* TEST_SQRT */ | ||
303 | if (!BN_mod_sqrt(r,a,c,ctx)) goto err; | ||
304 | if (!BN_mod_sqrt(r,b,c,ctx)) goto err; | ||
305 | #endif | ||
306 | } | ||
223 | tm=Time_F(STOP); | 307 | tm=Time_F(STOP); |
224 | printf("mul %4d ^ %4d %% %d -> %8.3fms %5.1f\n",sizes[i],sizes[i],sizes[i],tm*1000.0/num,tm*mul_c[i]/num); | 308 | printf( |
309 | #if defined(TEST_EXP) | ||
310 | "modexp %4d ^ %4d %% %4d" | ||
311 | #elif defined(TEST_MUL) | ||
312 | "50*modmul %4d %4d %4d" | ||
313 | #elif defined(TEST_SQR) | ||
314 | "100*modsqr %4d %4d %4d" | ||
315 | #elif defined(TEST_GCD) | ||
316 | "3*gcd %4d %4d %4d" | ||
317 | #elif defined(TEST_KRON) | ||
318 | "3*kronecker %4d %4d %4d" | ||
319 | #elif defined(TEST_INV) | ||
320 | "2*inv %4d %4d mod %4d" | ||
321 | #else /* TEST_SQRT */ | ||
322 | "2*sqrt [prime == %d (mod 64)] %4d %4d mod %4d" | ||
323 | #endif | ||
324 | " -> %8.3fms %5.1f (%ld)\n", | ||
325 | #ifdef TEST_SQRT | ||
326 | P_MOD_64, | ||
327 | #endif | ||
328 | sizes[i],sizes[i],sizes[i],tm*1000.0/num,tm*mul_c[i]/num, num); | ||
225 | num/=7; | 329 | num/=7; |
226 | if (num <= 0) num=1; | 330 | if (num <= 0) num=1; |
227 | } | 331 | } |
332 | return; | ||
228 | 333 | ||
334 | err: | ||
335 | ERR_print_errors_fp(stderr); | ||
229 | } | 336 | } |
230 | 337 | ||
338 | |||
339 | #ifdef C_PRIME | ||
340 | static void genprime_cb(int p, int n, void *arg) | ||
341 | { | ||
342 | char c='*'; | ||
343 | |||
344 | if (p == 0) c='.'; | ||
345 | if (p == 1) c='+'; | ||
346 | if (p == 2) c='*'; | ||
347 | if (p == 3) c='\n'; | ||
348 | putc(c, stderr); | ||
349 | fflush(stderr); | ||
350 | (void)n; | ||
351 | (void)arg; | ||
352 | } | ||
353 | #endif | ||
diff --git a/src/lib/libcrypto/bn/exptest.c b/src/lib/libcrypto/bn/exptest.c index 67dc95d726..5ca570d1a8 100644 --- a/src/lib/libcrypto/bn/exptest.c +++ b/src/lib/libcrypto/bn/exptest.c | |||
@@ -59,30 +59,37 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "bio.h" | 62 | #include <openssl/bio.h> |
63 | #include "bn.h" | 63 | #include <openssl/bn.h> |
64 | #include "rand.h" | 64 | #include <openssl/rand.h> |
65 | #include "err.h" | 65 | #include <openssl/err.h> |
66 | #ifdef WINDOWS | 66 | #ifdef OPENSSL_SYS_WINDOWS |
67 | #include "../bio/bss_file.c" | 67 | #include "../bio/bss_file.c" |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #define NUM_BITS (BN_BITS*2) | 70 | #define NUM_BITS (BN_BITS*2) |
71 | 71 | ||
72 | int main(argc,argv) | 72 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; |
73 | int argc; | 73 | |
74 | char *argv[]; | 74 | int main(int argc, char *argv[]) |
75 | { | 75 | { |
76 | BN_CTX *ctx; | 76 | BN_CTX *ctx; |
77 | BIO *out=NULL; | 77 | BIO *out=NULL; |
78 | int i,ret; | 78 | int i,ret; |
79 | unsigned char c; | 79 | unsigned char c; |
80 | BIGNUM *r_mont,*r_recp,*a,*b,*m; | 80 | BIGNUM *r_mont,*r_recp,*r_simple,*a,*b,*m; |
81 | |||
82 | RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_rand may fail, and we don't | ||
83 | * even check its return value | ||
84 | * (which we should) */ | ||
85 | |||
86 | ERR_load_BN_strings(); | ||
81 | 87 | ||
82 | ctx=BN_CTX_new(); | 88 | ctx=BN_CTX_new(); |
83 | if (ctx == NULL) exit(1); | 89 | if (ctx == NULL) exit(1); |
84 | r_mont=BN_new(); | 90 | r_mont=BN_new(); |
85 | r_recp=BN_new(); | 91 | r_recp=BN_new(); |
92 | r_simple=BN_new(); | ||
86 | a=BN_new(); | 93 | a=BN_new(); |
87 | b=BN_new(); | 94 | b=BN_new(); |
88 | m=BN_new(); | 95 | m=BN_new(); |
@@ -114,29 +121,61 @@ char *argv[]; | |||
114 | 121 | ||
115 | ret=BN_mod_exp_mont(r_mont,a,b,m,ctx,NULL); | 122 | ret=BN_mod_exp_mont(r_mont,a,b,m,ctx,NULL); |
116 | if (ret <= 0) | 123 | if (ret <= 0) |
117 | { printf("BN_mod_exp_mont() problems\n"); exit(1); } | 124 | { |
125 | printf("BN_mod_exp_mont() problems\n"); | ||
126 | ERR_print_errors(out); | ||
127 | exit(1); | ||
128 | } | ||
118 | 129 | ||
119 | ret=BN_mod_exp_recp(r_recp,a,b,m,ctx); | 130 | ret=BN_mod_exp_recp(r_recp,a,b,m,ctx); |
120 | if (ret <= 0) | 131 | if (ret <= 0) |
121 | { printf("BN_mod_exp_recp() problems\n"); exit(1); } | ||
122 | |||
123 | if (BN_cmp(r_mont,r_recp) != 0) | ||
124 | { | 132 | { |
125 | printf("\nmont and recp results differ\n"); | 133 | printf("BN_mod_exp_recp() problems\n"); |
134 | ERR_print_errors(out); | ||
135 | exit(1); | ||
136 | } | ||
137 | |||
138 | ret=BN_mod_exp_simple(r_simple,a,b,m,ctx); | ||
139 | if (ret <= 0) | ||
140 | { | ||
141 | printf("BN_mod_exp_simple() problems\n"); | ||
142 | ERR_print_errors(out); | ||
143 | exit(1); | ||
144 | } | ||
145 | |||
146 | if (BN_cmp(r_simple, r_mont) == 0 | ||
147 | && BN_cmp(r_simple,r_recp) == 0) | ||
148 | { | ||
149 | printf("."); | ||
150 | fflush(stdout); | ||
151 | } | ||
152 | else | ||
153 | { | ||
154 | if (BN_cmp(r_simple,r_mont) != 0) | ||
155 | printf("\nsimple and mont results differ\n"); | ||
156 | if (BN_cmp(r_simple,r_recp) != 0) | ||
157 | printf("\nsimple and recp results differ\n"); | ||
158 | |||
126 | printf("a (%3d) = ",BN_num_bits(a)); BN_print(out,a); | 159 | printf("a (%3d) = ",BN_num_bits(a)); BN_print(out,a); |
127 | printf("\nb (%3d) = ",BN_num_bits(b)); BN_print(out,b); | 160 | printf("\nb (%3d) = ",BN_num_bits(b)); BN_print(out,b); |
128 | printf("\nm (%3d) = ",BN_num_bits(m)); BN_print(out,m); | 161 | printf("\nm (%3d) = ",BN_num_bits(m)); BN_print(out,m); |
162 | printf("\nsimple ="); BN_print(out,r_simple); | ||
129 | printf("\nrecp ="); BN_print(out,r_recp); | 163 | printf("\nrecp ="); BN_print(out,r_recp); |
130 | printf("\nmont ="); BN_print(out,r_mont); | 164 | printf("\nmont ="); BN_print(out,r_mont); |
131 | printf("\n"); | 165 | printf("\n"); |
132 | exit(1); | 166 | exit(1); |
133 | } | 167 | } |
134 | else | ||
135 | { | ||
136 | printf("."); | ||
137 | fflush(stdout); | ||
138 | } | ||
139 | } | 168 | } |
169 | BN_free(r_mont); | ||
170 | BN_free(r_recp); | ||
171 | BN_free(r_simple); | ||
172 | BN_free(a); | ||
173 | BN_free(b); | ||
174 | BN_free(m); | ||
175 | BN_CTX_free(ctx); | ||
176 | ERR_remove_state(0); | ||
177 | CRYPTO_mem_leaks(out); | ||
178 | BIO_free(out); | ||
140 | printf(" done\n"); | 179 | printf(" done\n"); |
141 | exit(0); | 180 | exit(0); |
142 | err: | 181 | err: |
diff --git a/src/lib/libcrypto/bn/vms-helper.c b/src/lib/libcrypto/bn/vms-helper.c index 73af337069..4b63149bf3 100644 --- a/src/lib/libcrypto/bn/vms-helper.c +++ b/src/lib/libcrypto/bn/vms-helper.c | |||
@@ -59,8 +59,10 @@ | |||
59 | 59 | ||
60 | bn_div_words_abort(int i) | 60 | bn_div_words_abort(int i) |
61 | { | 61 | { |
62 | #if !defined(NO_STDIO) && !defined(WIN16) | 62 | #ifdef BN_DEBUG |
63 | #if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) | ||
63 | fprintf(stderr,"Division would overflow (%d)\n",i); | 64 | fprintf(stderr,"Division would overflow (%d)\n",i); |
64 | #endif | 65 | #endif |
65 | abort(); | 66 | abort(); |
67 | #endif | ||
66 | } | 68 | } |
diff --git a/src/lib/libcrypto/cast/cast_spd.c b/src/lib/libcrypto/cast/cast_spd.c index ab75e65386..76abf50d98 100644 --- a/src/lib/libcrypto/cast/cast_spd.c +++ b/src/lib/libcrypto/cast/cast_spd.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,34 +77,31 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "cast.h" | 99 | #include <openssl/cast.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | #ifndef CLK_TCK | 103 | #ifndef CLK_TCK |
105 | #ifndef VMS | ||
106 | #define HZ 100.0 | ||
107 | #else /* VMS */ | ||
108 | #define HZ 100.0 | 104 | #define HZ 100.0 |
109 | #endif | ||
110 | #else /* CLK_TCK */ | 105 | #else /* CLK_TCK */ |
111 | #define HZ ((double)CLK_TCK) | 106 | #define HZ ((double)CLK_TCK) |
112 | #endif | 107 | #endif |
@@ -115,12 +110,7 @@ struct tms { | |||
115 | #define BUFSIZE ((long)1024) | 110 | #define BUFSIZE ((long)1024) |
116 | long run=0; | 111 | long run=0; |
117 | 112 | ||
118 | #ifndef NOPROTO | ||
119 | double Time_F(int s); | 113 | double Time_F(int s); |
120 | #else | ||
121 | double Time_F(); | ||
122 | #endif | ||
123 | |||
124 | #ifdef SIGALRM | 114 | #ifdef SIGALRM |
125 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 115 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
126 | #define SIGRETTYPE void | 116 | #define SIGRETTYPE void |
@@ -128,14 +118,8 @@ double Time_F(); | |||
128 | #define SIGRETTYPE int | 118 | #define SIGRETTYPE int |
129 | #endif | 119 | #endif |
130 | 120 | ||
131 | #ifndef NOPROTO | ||
132 | SIGRETTYPE sig_done(int sig); | 121 | SIGRETTYPE sig_done(int sig); |
133 | #else | 122 | SIGRETTYPE sig_done(int sig) |
134 | SIGRETTYPE sig_done(); | ||
135 | #endif | ||
136 | |||
137 | SIGRETTYPE sig_done(sig) | ||
138 | int sig; | ||
139 | { | 123 | { |
140 | signal(SIGALRM,sig_done); | 124 | signal(SIGALRM,sig_done); |
141 | run=0; | 125 | run=0; |
@@ -148,8 +132,7 @@ int sig; | |||
148 | #define START 0 | 132 | #define START 0 |
149 | #define STOP 1 | 133 | #define STOP 1 |
150 | 134 | ||
151 | double Time_F(s) | 135 | double Time_F(int s) |
152 | int s; | ||
153 | { | 136 | { |
154 | double ret; | 137 | double ret; |
155 | #ifdef TIMES | 138 | #ifdef TIMES |
@@ -185,9 +168,7 @@ int s; | |||
185 | #endif | 168 | #endif |
186 | } | 169 | } |
187 | 170 | ||
188 | int main(argc,argv) | 171 | int main(int argc, char **argv) |
189 | int argc; | ||
190 | char **argv; | ||
191 | { | 172 | { |
192 | long count; | 173 | long count; |
193 | static unsigned char buf[BUFSIZE]; | 174 | static unsigned char buf[BUFSIZE]; |
@@ -202,7 +183,7 @@ char **argv; | |||
202 | #endif | 183 | #endif |
203 | 184 | ||
204 | #ifndef TIMES | 185 | #ifndef TIMES |
205 | printf("To get the most acurate results, try to run this\n"); | 186 | printf("To get the most accurate results, try to run this\n"); |
206 | printf("program when this computer is idle.\n"); | 187 | printf("program when this computer is idle.\n"); |
207 | #endif | 188 | #endif |
208 | 189 | ||
@@ -287,7 +268,7 @@ char **argv; | |||
287 | printf("CAST raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); | 268 | printf("CAST raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); |
288 | printf("CAST cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); | 269 | printf("CAST cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); |
289 | exit(0); | 270 | exit(0); |
290 | #if defined(LINT) || defined(MSDOS) | 271 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
291 | return(0); | 272 | return(0); |
292 | #endif | 273 | #endif |
293 | } | 274 | } |
diff --git a/src/lib/libcrypto/cast/castopts.c b/src/lib/libcrypto/cast/castopts.c index 68cf5a4a60..1b858d153b 100644 --- a/src/lib/libcrypto/cast/castopts.c +++ b/src/lib/libcrypto/cast/castopts.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. | 59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. |
60 | * This is for machines with 64k code segment size restrictions. */ | 60 | * This is for machines with 64k code segment size restrictions. */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern void exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,25 +77,26 @@ extern void exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "cast.h" | 99 | #include <openssl/cast.h> |
101 | 100 | ||
102 | #define CAST_DEFAULT_OPTIONS | 101 | #define CAST_DEFAULT_OPTIONS |
103 | 102 | ||
@@ -136,11 +135,7 @@ struct tms { | |||
136 | #ifndef HZ | 135 | #ifndef HZ |
137 | # ifndef CLK_TCK | 136 | # ifndef CLK_TCK |
138 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ | 137 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ |
139 | # ifndef VMS | 138 | # define HZ 100.0 |
140 | # define HZ 100.0 | ||
141 | # else /* VMS */ | ||
142 | # define HZ 100.0 | ||
143 | # endif | ||
144 | # else /* _BSD_CLK_TCK_ */ | 139 | # else /* _BSD_CLK_TCK_ */ |
145 | # define HZ ((double)_BSD_CLK_TCK_) | 140 | # define HZ ((double)_BSD_CLK_TCK_) |
146 | # endif | 141 | # endif |
@@ -152,12 +147,7 @@ struct tms { | |||
152 | #define BUFSIZE ((long)1024) | 147 | #define BUFSIZE ((long)1024) |
153 | long run=0; | 148 | long run=0; |
154 | 149 | ||
155 | #ifndef NOPROTO | ||
156 | double Time_F(int s); | 150 | double Time_F(int s); |
157 | #else | ||
158 | double Time_F(); | ||
159 | #endif | ||
160 | |||
161 | #ifdef SIGALRM | 151 | #ifdef SIGALRM |
162 | #if defined(__STDC__) || defined(sgi) | 152 | #if defined(__STDC__) || defined(sgi) |
163 | #define SIGRETTYPE void | 153 | #define SIGRETTYPE void |
@@ -165,14 +155,8 @@ double Time_F(); | |||
165 | #define SIGRETTYPE int | 155 | #define SIGRETTYPE int |
166 | #endif | 156 | #endif |
167 | 157 | ||
168 | #ifndef NOPROTO | ||
169 | SIGRETTYPE sig_done(int sig); | 158 | SIGRETTYPE sig_done(int sig); |
170 | #else | 159 | SIGRETTYPE sig_done(int sig) |
171 | SIGRETTYPE sig_done(); | ||
172 | #endif | ||
173 | |||
174 | SIGRETTYPE sig_done(sig) | ||
175 | int sig; | ||
176 | { | 160 | { |
177 | signal(SIGALRM,sig_done); | 161 | signal(SIGALRM,sig_done); |
178 | run=0; | 162 | run=0; |
@@ -185,8 +169,7 @@ int sig; | |||
185 | #define START 0 | 169 | #define START 0 |
186 | #define STOP 1 | 170 | #define STOP 1 |
187 | 171 | ||
188 | double Time_F(s) | 172 | double Time_F(int s) |
189 | int s; | ||
190 | { | 173 | { |
191 | double ret; | 174 | double ret; |
192 | #ifdef TIMES | 175 | #ifdef TIMES |
@@ -247,9 +230,7 @@ int s; | |||
247 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ | 230 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ |
248 | tm[index]*8,1.0e6/tm[index]); | 231 | tm[index]*8,1.0e6/tm[index]); |
249 | 232 | ||
250 | int main(argc,argv) | 233 | int main(int argc, char **argv) |
251 | int argc; | ||
252 | char **argv; | ||
253 | { | 234 | { |
254 | long count; | 235 | long count; |
255 | static unsigned char buf[BUFSIZE]; | 236 | static unsigned char buf[BUFSIZE]; |
@@ -271,7 +252,7 @@ char **argv; | |||
271 | } | 252 | } |
272 | 253 | ||
273 | #ifndef TIMES | 254 | #ifndef TIMES |
274 | fprintf(stderr,"To get the most acurate results, try to run this\n"); | 255 | fprintf(stderr,"To get the most accurate results, try to run this\n"); |
275 | fprintf(stderr,"program when this computer is idle.\n"); | 256 | fprintf(stderr,"program when this computer is idle.\n"); |
276 | #endif | 257 | #endif |
277 | 258 | ||
@@ -351,7 +332,7 @@ char **argv; | |||
351 | break; | 332 | break; |
352 | } | 333 | } |
353 | exit(0); | 334 | exit(0); |
354 | #if defined(LINT) || defined(MSDOS) | 335 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
355 | return(0); | 336 | return(0); |
356 | #endif | 337 | #endif |
357 | } | 338 | } |
diff --git a/src/lib/libcrypto/cast/casts.cpp b/src/lib/libcrypto/cast/casts.cpp index bac7be2c9c..8d7bd468d2 100644 --- a/src/lib/libcrypto/cast/casts.cpp +++ b/src/lib/libcrypto/cast/casts.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "cast.h" | 35 | #include <openssl/cast.h> |
36 | 36 | ||
37 | void main(int argc,char *argv[]) | 37 | void main(int argc,char *argv[]) |
38 | { | 38 | { |
diff --git a/src/lib/libcrypto/cast/casttest.c b/src/lib/libcrypto/cast/casttest.c index 8b009bc249..099e790886 100644 --- a/src/lib/libcrypto/cast/casttest.c +++ b/src/lib/libcrypto/cast/casttest.c | |||
@@ -59,36 +59,44 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "cast.h" | ||
63 | 62 | ||
64 | /* #define FULL_TEST */ | 63 | #ifdef OPENSSL_NO_CAST |
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No CAST support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/cast.h> | ||
65 | 71 | ||
66 | unsigned char k[16]={ | 72 | #define FULL_TEST |
73 | |||
74 | static unsigned char k[16]={ | ||
67 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, | 75 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, |
68 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A | 76 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A |
69 | }; | 77 | }; |
70 | 78 | ||
71 | unsigned char in[8]={ 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; | 79 | static unsigned char in[8]={ 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF}; |
72 | 80 | ||
73 | int k_len[3]={16,10}; | 81 | static int k_len[3]={16,10,5}; |
74 | unsigned char c[3][8]={ | 82 | static unsigned char c[3][8]={ |
75 | {0x23,0x8B,0x4F,0xE5,0x84,0x7E,0x44,0xB2}, | 83 | {0x23,0x8B,0x4F,0xE5,0x84,0x7E,0x44,0xB2}, |
76 | {0xEB,0x6A,0x71,0x1A,0x2C,0x02,0x27,0x1B}, | 84 | {0xEB,0x6A,0x71,0x1A,0x2C,0x02,0x27,0x1B}, |
77 | {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}, | 85 | {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E}, |
78 | }; | 86 | }; |
79 | unsigned char out[80]; | 87 | static unsigned char out[80]; |
80 | 88 | ||
81 | unsigned char in_a[16]={ | 89 | static unsigned char in_a[16]={ |
82 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, | 90 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, |
83 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A}; | 91 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A}; |
84 | unsigned char in_b[16]={ | 92 | static unsigned char in_b[16]={ |
85 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, | 93 | 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, |
86 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A}; | 94 | 0x23,0x45,0x67,0x89,0x34,0x56,0x78,0x9A}; |
87 | 95 | ||
88 | unsigned char c_a[16]={ | 96 | static unsigned char c_a[16]={ |
89 | 0xEE,0xA9,0xD0,0xA2,0x49,0xFD,0x3B,0xA6, | 97 | 0xEE,0xA9,0xD0,0xA2,0x49,0xFD,0x3B,0xA6, |
90 | 0xB3,0x43,0x6F,0xB8,0x9D,0x6D,0xCA,0x92}; | 98 | 0xB3,0x43,0x6F,0xB8,0x9D,0x6D,0xCA,0x92}; |
91 | unsigned char c_b[16]={ | 99 | static unsigned char c_b[16]={ |
92 | 0xB2,0xC9,0x5E,0xB0,0x0C,0x31,0xAD,0x71, | 100 | 0xB2,0xC9,0x5E,0xB0,0x0C,0x31,0xAD,0x71, |
93 | 0x80,0xAC,0x05,0xB8,0xE8,0x3D,0x69,0x6E}; | 101 | 0x80,0xAC,0x05,0xB8,0xE8,0x3D,0x69,0x6E}; |
94 | 102 | ||
@@ -120,104 +128,103 @@ static unsigned char cfb_cipher64[CFB_TEST_SIZE]={ | |||
120 | }; | 128 | }; |
121 | #endif | 129 | #endif |
122 | 130 | ||
123 | int main(argc,argv) | 131 | int main(int argc, char *argv[]) |
124 | int argc; | 132 | { |
125 | char *argv[]; | ||
126 | { | ||
127 | #ifdef FULL_TEST | 133 | #ifdef FULL_TEST |
128 | long l; | 134 | long l; |
129 | CAST_KEY key_b; | 135 | CAST_KEY key_b; |
130 | #endif | 136 | #endif |
131 | int i,z,err=0; | 137 | int i,z,err=0; |
132 | CAST_KEY key; | 138 | CAST_KEY key; |
133 | 139 | ||
134 | for (z=0; z<1; z++) | 140 | for (z=0; z<3; z++) |
135 | { | 141 | { |
136 | CAST_set_key(&key,k_len[z],k); | 142 | CAST_set_key(&key,k_len[z],k); |
137 | 143 | ||
138 | CAST_ecb_encrypt(in,out,&key,CAST_ENCRYPT); | 144 | CAST_ecb_encrypt(in,out,&key,CAST_ENCRYPT); |
139 | if (memcmp(out,&(c[z][0]),8) != 0) | 145 | if (memcmp(out,&(c[z][0]),8) != 0) |
140 | { | 146 | { |
141 | printf("ecb cast error encrypting\n"); | 147 | printf("ecb cast error encrypting for keysize %d\n",k_len[z]*8); |
142 | printf("got :"); | 148 | printf("got :"); |
143 | for (i=0; i<8; i++) | 149 | for (i=0; i<8; i++) |
144 | printf("%02X ",out[i]); | 150 | printf("%02X ",out[i]); |
145 | printf("\n"); | 151 | printf("\n"); |
146 | printf("expected:"); | 152 | printf("expected:"); |
147 | for (i=0; i<8; i++) | 153 | for (i=0; i<8; i++) |
148 | printf("%02X ",c[z][i]); | 154 | printf("%02X ",c[z][i]); |
149 | err=20; | 155 | err=20; |
150 | printf("\n"); | 156 | printf("\n"); |
151 | } | 157 | } |
152 | 158 | ||
153 | CAST_ecb_encrypt(out,out,&key,CAST_DECRYPT); | 159 | CAST_ecb_encrypt(out,out,&key,CAST_DECRYPT); |
154 | if (memcmp(out,in,8) != 0) | 160 | if (memcmp(out,in,8) != 0) |
155 | { | 161 | { |
156 | printf("ecb cast error decrypting\n"); | 162 | printf("ecb cast error decrypting for keysize %d\n",k_len[z]*8); |
157 | printf("got :"); | 163 | printf("got :"); |
158 | for (i=0; i<8; i++) | 164 | for (i=0; i<8; i++) |
159 | printf("%02X ",out[i]); | 165 | printf("%02X ",out[i]); |
160 | printf("\n"); | 166 | printf("\n"); |
161 | printf("expected:"); | 167 | printf("expected:"); |
162 | for (i=0; i<8; i++) | 168 | for (i=0; i<8; i++) |
163 | printf("%02X ",in[i]); | 169 | printf("%02X ",in[i]); |
164 | printf("\n"); | 170 | printf("\n"); |
165 | err=3; | 171 | err=3; |
166 | } | 172 | } |
167 | } | 173 | } |
168 | if (err == 0) printf("ecb cast5 ok\n"); | 174 | if (err == 0) |
175 | printf("ecb cast5 ok\n"); | ||
169 | 176 | ||
170 | #ifdef FULL_TEST | 177 | #ifdef FULL_TEST |
171 | { | 178 | { |
172 | unsigned char out_a[16],out_b[16]; | 179 | unsigned char out_a[16],out_b[16]; |
173 | static char *hex="0123456789ABCDEF"; | 180 | static char *hex="0123456789ABCDEF"; |
174 | 181 | ||
175 | printf("This test will take some time...."); | 182 | printf("This test will take some time...."); |
176 | fflush(stdout); | 183 | fflush(stdout); |
177 | memcpy(out_a,in_a,sizeof(in_a)); | 184 | memcpy(out_a,in_a,sizeof(in_a)); |
178 | memcpy(out_b,in_b,sizeof(in_b)); | 185 | memcpy(out_b,in_b,sizeof(in_b)); |
179 | i=1; | 186 | i=1; |
180 | 187 | ||
181 | for (l=0; l<1000000L; l++) | 188 | for (l=0; l<1000000L; l++) |
182 | { | 189 | { |
183 | CAST_set_key(&key_b,16,out_b); | 190 | CAST_set_key(&key_b,16,out_b); |
184 | CAST_ecb_encrypt(&(out_a[0]),&(out_a[0]),&key_b,CAST_ENCRYPT); | 191 | CAST_ecb_encrypt(&(out_a[0]),&(out_a[0]),&key_b,CAST_ENCRYPT); |
185 | CAST_ecb_encrypt(&(out_a[8]),&(out_a[8]),&key_b,CAST_ENCRYPT); | 192 | CAST_ecb_encrypt(&(out_a[8]),&(out_a[8]),&key_b,CAST_ENCRYPT); |
186 | CAST_set_key(&key,16,out_a); | 193 | CAST_set_key(&key,16,out_a); |
187 | CAST_ecb_encrypt(&(out_b[0]),&(out_b[0]),&key,CAST_ENCRYPT); | 194 | CAST_ecb_encrypt(&(out_b[0]),&(out_b[0]),&key,CAST_ENCRYPT); |
188 | CAST_ecb_encrypt(&(out_b[8]),&(out_b[8]),&key,CAST_ENCRYPT); | 195 | CAST_ecb_encrypt(&(out_b[8]),&(out_b[8]),&key,CAST_ENCRYPT); |
189 | if ((l & 0xffff) == 0xffff) | 196 | if ((l & 0xffff) == 0xffff) |
190 | { | 197 | { |
191 | printf("%c",hex[i&0x0f]); | 198 | printf("%c",hex[i&0x0f]); |
192 | fflush(stdout); | 199 | fflush(stdout); |
193 | i++; | 200 | i++; |
194 | } | 201 | } |
195 | } | 202 | } |
196 | 203 | ||
197 | if ( (memcmp(out_a,c_a,sizeof(c_a)) != 0) || | 204 | if ( (memcmp(out_a,c_a,sizeof(c_a)) != 0) || |
198 | (memcmp(out_b,c_b,sizeof(c_b)) != 0)) | 205 | (memcmp(out_b,c_b,sizeof(c_b)) != 0)) |
199 | { | 206 | { |
200 | printf("\n"); | 207 | printf("\n"); |
201 | printf("Error\n"); | 208 | printf("Error\n"); |
202 | 209 | ||
203 | printf("A out ="); | 210 | printf("A out ="); |
204 | for (i=0; i<16; i++) printf("%02X ",out_a[i]); | 211 | for (i=0; i<16; i++) printf("%02X ",out_a[i]); |
205 | printf("\nactual="); | 212 | printf("\nactual="); |
206 | for (i=0; i<16; i++) printf("%02X ",c_a[i]); | 213 | for (i=0; i<16; i++) printf("%02X ",c_a[i]); |
207 | printf("\n"); | 214 | printf("\n"); |
208 | 215 | ||
209 | printf("B out ="); | 216 | printf("B out ="); |
210 | for (i=0; i<16; i++) printf("%02X ",out_b[i]); | 217 | for (i=0; i<16; i++) printf("%02X ",out_b[i]); |
211 | printf("\nactual="); | 218 | printf("\nactual="); |
212 | for (i=0; i<16; i++) printf("%02X ",c_b[i]); | 219 | for (i=0; i<16; i++) printf("%02X ",c_b[i]); |
213 | printf("\n"); | 220 | printf("\n"); |
214 | } | 221 | } |
215 | else | 222 | else |
216 | printf(" ok\n"); | 223 | printf(" ok\n"); |
217 | } | 224 | } |
218 | #endif | 225 | #endif |
219 | 226 | ||
220 | exit(err); | 227 | exit(err); |
221 | return(err); | 228 | return(err); |
222 | } | 229 | } |
223 | 230 | #endif | |
diff --git a/src/lib/libcrypto/conf/cnf_save.c b/src/lib/libcrypto/conf/cnf_save.c index c9018de10e..1439487526 100644 --- a/src/lib/libcrypto/conf/cnf_save.c +++ b/src/lib/libcrypto/conf/cnf_save.c | |||
@@ -57,28 +57,28 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "conf.h" | 60 | #include <openssl/conf.h> |
61 | 61 | ||
62 | void print_conf(CONF_VALUE *cv); | 62 | static void print_conf(CONF_VALUE *cv); |
63 | static IMPLEMENT_LHASH_DOALL_FN(print_conf, CONF_VALUE *); | ||
63 | 64 | ||
64 | main() | 65 | main() |
65 | { | 66 | { |
66 | LHASH *conf; | 67 | LHASH *conf; |
67 | long l; | 68 | long l; |
68 | 69 | ||
69 | conf=CONF_load(NULL,"../../apps/ssleay.cnf",&l); | 70 | conf=CONF_load(NULL,"../../apps/openssl.cnf",&l); |
70 | if (conf == NULL) | 71 | if (conf == NULL) |
71 | { | 72 | { |
72 | fprintf(stderr,"error loading config, line %ld\n",l); | 73 | fprintf(stderr,"error loading config, line %ld\n",l); |
73 | exit(1); | 74 | exit(1); |
74 | } | 75 | } |
75 | 76 | ||
76 | lh_doall(conf,print_conf); | 77 | lh_doall(conf,LHASH_DOALL_FN(print_conf)); |
77 | } | 78 | } |
78 | 79 | ||
79 | 80 | ||
80 | void print_conf(cv) | 81 | static void print_conf(CONF_VALUE *cv) |
81 | CONF_VALUE *cv; | ||
82 | { | 82 | { |
83 | int i; | 83 | int i; |
84 | CONF_VALUE *v; | 84 | CONF_VALUE *v; |
diff --git a/src/lib/libcrypto/conf/test.c b/src/lib/libcrypto/conf/test.c index 899ee2a067..7fab85053e 100644 --- a/src/lib/libcrypto/conf/test.c +++ b/src/lib/libcrypto/conf/test.c | |||
@@ -58,7 +58,8 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "conf.h" | 61 | #include <openssl/conf.h> |
62 | #include <openssl/err.h> | ||
62 | 63 | ||
63 | main() | 64 | main() |
64 | { | 65 | { |
@@ -66,7 +67,10 @@ main() | |||
66 | long eline; | 67 | long eline; |
67 | char *s,*s2; | 68 | char *s,*s2; |
68 | 69 | ||
69 | conf=CONF_load(NULL,"ssleay.conf",&eline); | 70 | #ifdef USE_WIN32 |
71 | CONF_set_default_method(CONF_WIN32); | ||
72 | #endif | ||
73 | conf=CONF_load(NULL,"ssleay.cnf",&eline); | ||
70 | if (conf == NULL) | 74 | if (conf == NULL) |
71 | { | 75 | { |
72 | ERR_load_crypto_strings(); | 76 | ERR_load_crypto_strings(); |
@@ -87,5 +91,8 @@ main() | |||
87 | s=CONF_get_string(conf,"s_client","cipher1"); | 91 | s=CONF_get_string(conf,"s_client","cipher1"); |
88 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); | 92 | printf("s_client:cipher1=%s\n",(s == NULL)?"NULL":s); |
89 | 93 | ||
94 | printf("---------------------------- DUMP ------------------------\n"); | ||
95 | CONF_dump_fp(conf, stdout); | ||
96 | |||
90 | exit(0); | 97 | exit(0); |
91 | } | 98 | } |
diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com index bf916528eb..4847a69a71 100644 --- a/src/lib/libcrypto/crypto-lib.com +++ b/src/lib/libcrypto/crypto-lib.com | |||
@@ -14,7 +14,14 @@ $! | |||
14 | $! It was re-written so it would try to determine what "C" compiler to use | 14 | $! It was re-written so it would try to determine what "C" compiler to use |
15 | $! or you can specify which "C" compiler to use. | 15 | $! or you can specify which "C" compiler to use. |
16 | $! | 16 | $! |
17 | $! Specify RSAREF as P1 to compile with the RSAREF library instead of | 17 | $! Specify the following as P1 to build just that part or ALL to just |
18 | $! build everything. | ||
19 | $! | ||
20 | $! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library. | ||
21 | $! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE | ||
22 | $! ALL To do both LIBRARY and APPS | ||
23 | $! | ||
24 | $! Specify RSAREF as P2 to compile with the RSAREF library instead of | ||
18 | $! the regular one. If you specify NORSAREF it will compile with the | 25 | $! the regular one. If you specify NORSAREF it will compile with the |
19 | $! regular RSAREF routines. (Note: If you are in the United States | 26 | $! regular RSAREF routines. (Note: If you are in the United States |
20 | $! you MUST compile with RSAREF unless you have a license from RSA). | 27 | $! you MUST compile with RSAREF unless you have a license from RSA). |
@@ -26,10 +33,10 @@ $! directory structure stored. You have to extract the file | |||
26 | $! into the [.RSAREF] directory under the root directory as that | 33 | $! into the [.RSAREF] directory under the root directory as that |
27 | $! is where the scripts will look for the files. | 34 | $! is where the scripts will look for the files. |
28 | $! | 35 | $! |
29 | $! Specify DEBUG or NODEBUG as P2 to compile with or without debugger | 36 | $! Specify DEBUG or NODEBUG as P3 to compile with or without debugger |
30 | $! information. | 37 | $! information. |
31 | $! | 38 | $! |
32 | $! Specify which compiler at P3 to try to compile under. | 39 | $! Specify which compiler at P4 to try to compile under. |
33 | $! | 40 | $! |
34 | $! VAXC For VAX C. | 41 | $! VAXC For VAX C. |
35 | $! DECC For DEC C. | 42 | $! DECC For DEC C. |
@@ -38,15 +45,16 @@ $! | |||
38 | $! If you don't speficy a compiler, it will try to determine which | 45 | $! If you don't speficy a compiler, it will try to determine which |
39 | $! "C" compiler to use. | 46 | $! "C" compiler to use. |
40 | $! | 47 | $! |
41 | $! P4, if defined, sets a TCP/IP library to use, through one of the following | 48 | $! P5, if defined, sets a TCP/IP library to use, through one of the following |
42 | $! keywords: | 49 | $! keywords: |
43 | $! | 50 | $! |
44 | $! UCX for UCX | 51 | $! UCX for UCX |
52 | $! TCPIP for TCPIP (post UCX) | ||
45 | $! SOCKETSHR for SOCKETSHR+NETLIB | 53 | $! SOCKETSHR for SOCKETSHR+NETLIB |
46 | $! | 54 | $! |
47 | $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 55 | $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
48 | $! | 56 | $! |
49 | $! P6, if defined, sets a choice of crypto methods to compile. | 57 | $! P7, if defined, sets a choice of crypto methods to compile. |
50 | $! WARNING: this should only be done to recompile some part of an already | 58 | $! WARNING: this should only be done to recompile some part of an already |
51 | $! fully compiled library. | 59 | $! fully compiled library. |
52 | $! | 60 | $! |
@@ -79,12 +87,13 @@ $ ENDIF | |||
79 | $! | 87 | $! |
80 | $! Define The Different Encryption Types. | 88 | $! Define The Different Encryption Types. |
81 | $! | 89 | $! |
82 | $ ENCRYPT_TYPES = ",MD2,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - | 90 | $ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - |
83 | "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - | 91 | "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - |
84 | "BN,RSA,DSA,DH,"+ - | 92 | "BN,EC,RSA,DSA,DH,DSO,ENGINE,AES,"+ - |
85 | "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - | 93 | "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - |
86 | "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - | 94 | "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - |
87 | "CONF,TXT_DB,PKCS7,PKCS12,COMP" | 95 | "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5" |
96 | $ ENCRYPT_PROGRAMS = "DES,PKCS7" | ||
88 | $! | 97 | $! |
89 | $! Check To Make Sure We Have Valid Command Line Parameters. | 98 | $! Check To Make Sure We Have Valid Command Line Parameters. |
90 | $! | 99 | $! |
@@ -136,6 +145,14 @@ $! Define The Library Name. | |||
136 | $! | 145 | $! |
137 | $ LIB_NAME := 'EXE_DIR'LIBCRYPTO.OLB | 146 | $ LIB_NAME := 'EXE_DIR'LIBCRYPTO.OLB |
138 | $! | 147 | $! |
148 | $! Define The CRYPTO-LIB We Are To Use. | ||
149 | $! | ||
150 | $ CRYPTO_LIB := 'EXE_DIR'LIBCRYPTO.OLB | ||
151 | $! | ||
152 | $! Define The RSAREF-LIB We Are To Use. | ||
153 | $! | ||
154 | $ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB | ||
155 | $! | ||
139 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... | 156 | $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library... |
140 | $! | 157 | $! |
141 | $ IF (F$SEARCH(LIB_NAME).EQS."") | 158 | $ IF (F$SEARCH(LIB_NAME).EQS."") |
@@ -149,10 +166,18 @@ $! End The Library Check. | |||
149 | $! | 166 | $! |
150 | $ ENDIF | 167 | $ ENDIF |
151 | $! | 168 | $! |
169 | $! Build our options file for the application | ||
170 | $! | ||
171 | $ GOSUB CHECK_OPT_FILE | ||
172 | $! | ||
152 | $! Define The Different Encryption "library" Strings. | 173 | $! Define The Different Encryption "library" Strings. |
153 | $! | 174 | $! |
154 | $ LIB_ = "cryptlib,mem,cversion,ex_data,tmdiff,cpt_err" | 175 | $ APPS_DES = "DES/DES,CBC3_ENC" |
176 | $ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" | ||
177 | $ | ||
178 | $ LIB_ = "cryptlib,mem,mem_dbg,cversion,ex_data,tmdiff,cpt_err,ebcdic,uid,o_time" | ||
155 | $ LIB_MD2 = "md2_dgst,md2_one" | 179 | $ LIB_MD2 = "md2_dgst,md2_one" |
180 | $ LIB_MD4 = "md4_dgst,md4_one" | ||
156 | $ LIB_MD5 = "md5_dgst,md5_one" | 181 | $ LIB_MD5 = "md5_dgst,md5_one" |
157 | $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one" | 182 | $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one" |
158 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" | 183 | $ LIB_MDC2 = "mdc2dgst,mdc2_one" |
@@ -162,8 +187,9 @@ $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ - | |||
162 | "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ - | 187 | "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ - |
163 | "enc_read,enc_writ,ofb64enc,"+ - | 188 | "enc_read,enc_writ,ofb64enc,"+ - |
164 | "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ - | 189 | "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ - |
165 | "des_enc,fcrypt_b,read2pwd,"+ - | 190 | "des_enc,fcrypt_b,"+ - |
166 | "fcrypt,xcbc_enc,read_pwd,rpc_enc,cbc_cksm,supp,ede_cbcm_enc" | 191 | "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ - |
192 | "ede_cbcm_enc,des_old,des_old2,read2pwd" | ||
167 | $ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64" | 193 | $ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64" |
168 | $ LIB_RC4 = "rc4_skey,rc4_enc" | 194 | $ LIB_RC4 = "rc4_skey,rc4_enc" |
169 | $ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64" | 195 | $ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64" |
@@ -171,84 +197,100 @@ $ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey" | |||
171 | $ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64" | 197 | $ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64" |
172 | $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64" | 198 | $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64" |
173 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" | 199 | $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" |
174 | $ IF F$TRNLNM("OPENSSL_NO_ASM") .NES. "" THEN LIB_BN_ASM = "bn_asm" | 200 | $ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.EQS."AXP" THEN LIB_BN_ASM = "bn_asm" |
175 | $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_mul,"+ - | 201 | $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ - |
176 | "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - | 202 | "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - |
177 | "bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+",bn_recp,bn_mont,"+ - | 203 | "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - |
178 | "bn_mpi,bn_exp2" | 204 | "bn_recp,bn_mont,bn_mpi,bn_exp2" |
179 | $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - | 205 | $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - |
180 | "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk" | 206 | "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - |
181 | $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err" | 207 | "rsa_asn1" |
182 | $ LIB_DH = "dh_gen,dh_key,dh_lib,dh_check,dh_err" | 208 | $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_recp,ecp_nist,ec_cvt,ec_mult,"+ - |
209 | "ec_err" | ||
210 | $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl" | ||
211 | $ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err" | ||
212 | $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ - | ||
213 | "dso_openssl,dso_win32,dso_vms" | ||
214 | $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ - | ||
215 | "eng_table,eng_pkey,eng_fat,eng_all,"+ - | ||
216 | "tb_rsa,tb_dsa,tb_dh,tb_rand,tb_cipher,tb_digest,"+ - | ||
217 | "eng_openssl,eng_dyn,eng_cnf,"+ - | ||
218 | "hw_atalla,hw_cswift,hw_ncipher,hw_nuron,hw_ubsec,"+ - | ||
219 | "hw_openbsd_dev_crypto,hw_aep,hw_sureware,hw_4758_cca" | ||
220 | $ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,aes_ctr" | ||
183 | $ LIB_BUFFER = "buffer,buf_err" | 221 | $ LIB_BUFFER = "buffer,buf_err" |
184 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - | 222 | $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - |
185 | "bss_mem,bss_null,bss_fd,"+ - | 223 | "bss_mem,bss_null,bss_fd,"+ - |
186 | "bss_file,bss_sock,bss_conn,"+ - | 224 | "bss_file,bss_sock,bss_conn,"+ - |
187 | "bf_null,bf_buff,b_print,b_dump,"+ - | 225 | "bf_null,bf_buff,b_print,b_dump,"+ - |
188 | "b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio" ! + ",bss_log" for syslog | 226 | "b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ - |
227 | "bf_lbuf" | ||
189 | $ LIB_STACK = "stack" | 228 | $ LIB_STACK = "stack" |
190 | $ LIB_LHASH = "lhash,lh_stats" | 229 | $ LIB_LHASH = "lhash,lh_stats" |
191 | $ LIB_RAND = "md_rand,randfile,rand_lib" | 230 | $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ - |
231 | "rand_vms" | ||
192 | $ LIB_ERR = "err,err_all,err_prn" | 232 | $ LIB_ERR = "err,err_all,err_prn" |
193 | $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" | 233 | $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" |
194 | $ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - | 234 | $ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - |
195 | "e_ecb_d,e_cbc_d,e_cfb_d,e_ofb_d,"+ - | 235 | "e_des,e_bf,e_idea,e_des3,"+ - |
196 | "e_ecb_i,e_cbc_i,e_cfb_i,e_ofb_i,"+ - | 236 | "e_rc4,e_aes,names,"+ - |
197 | "e_ecb_3d,e_cbc_3d,e_rc4,names,"+ - | 237 | "e_xcbc_d,e_rc2,e_cast,e_rc5" |
198 | "e_cfb_3d,e_ofb_3d,e_xcbc_d,"+ - | 238 | $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - |
199 | "e_ecb_r2,e_cbc_r2,e_cfb_r2,e_ofb_r2,"+ - | 239 | "m_dss,m_dss1,m_mdc2,m_ripemd,"+ - |
200 | "e_ecb_bf,e_cbc_bf,e_cfb_bf,e_ofb_bf" | ||
201 | $ LIB_EVP_2 = "e_ecb_c,e_cbc_c,e_cfb_c,e_ofb_c,"+ - | ||
202 | "e_ecb_r5,e_cbc_r5,e_cfb_r5,e_ofb_r5,"+ - | ||
203 | "m_null,m_md2,m_md5,m_sha,m_sha1,m_dss,m_dss1,m_mdc2,"+ - | ||
204 | "m_ripemd,"+ - | ||
205 | "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - | 240 | "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - |
206 | "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - | 241 | "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - |
207 | "c_all,evp_lib,bio_ok,evp_pkey,evp_pbe,p5_crpt,p5_crpt2" | 242 | "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- |
243 | "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" | ||
208 | $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - | 244 | $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - |
209 | "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,a_bmp,"+ - | 245 | "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ - |
210 | "a_enum,a_vis,a_utf8,a_sign,a_digest,a_verify,"+ - | 246 | "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ - |
211 | "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,"+ - | 247 | "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,x_bignum,"+ - |
212 | "x_name,x_cinf,x_x509,x_crl,x_info,x_spki,nsseq,"+ - | 248 | "x_long,x_name,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ - |
213 | "d2i_r_pr,i2d_r_pr,d2i_r_pu,i2d_r_pu,"+ - | ||
214 | "d2i_s_pr,i2d_s_pr,d2i_s_pu,i2d_s_pu,"+ - | ||
215 | "d2i_pu,d2i_pr,i2d_pu,i2d_pr" | 249 | "d2i_pu,d2i_pr,i2d_pu,i2d_pr" |
216 | $ LIB_ASN1_2 = "t_req,t_x509,t_crl,t_pkey,"+ - | 250 | $ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ - |
217 | "p7_i_s,p7_signi,p7_signd,p7_recip,p7_enc_c,p7_evp,"+ - | 251 | "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ - |
218 | "p7_dgst,p7_s_e,p7_enc,p7_lib,"+ - | 252 | "f_int,f_string,n_pkey,"+ - |
219 | "f_int,f_string,i2d_dhp,i2d_dsap,d2i_dhp,d2i_dsap,n_pkey,"+ - | ||
220 | "f_enum,a_hdr,x_pkey,a_bool,x_exten,"+ - | 253 | "f_enum,a_hdr,x_pkey,a_bool,x_exten,"+ - |
221 | "asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,"+ - | 254 | "asn1_par,asn1_lib,asn1_err,a_meth,a_bytes,a_strnid,"+ - |
222 | "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey" | 255 | "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid" |
223 | $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err" | 256 | $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ - |
257 | "pem_x509,pem_xaux,pem_oth,pem_pk8,pem_pkey" | ||
224 | $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ - | 258 | $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ - |
225 | "x509_obj,x509_req,x509_vfy,"+ - | 259 | "x509_obj,x509_req,x509spki,x509_vfy,"+ - |
226 | "x509_set,x509rset,x509_err,"+ - | 260 | "x509_set,x509cset,x509rset,x509_err,"+ - |
227 | "x509name,x509_v3,x509_ext,"+ - | 261 | "x509name,x509_v3,x509_ext,x509_att,"+ - |
228 | "x509type,x509_lu,x_all,x509_txt,"+ - | 262 | "x509type,x509_lu,x_all,x509_txt,"+ - |
229 | "by_file,by_dir" | 263 | "x509_trs,by_file,by_dir" |
230 | $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - | 264 | $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ - |
231 | "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - | 265 | "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ - |
232 | "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld" | 266 | "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ - |
233 | $ LIB_CONF = "conf,conf_err" | 267 | "v3_ocsp,v3_akeya" |
268 | $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall" | ||
234 | $ LIB_TXT_DB = "txt_db" | 269 | $ LIB_TXT_DB = "txt_db" |
235 | $ LIB_PKCS7 = "pk7_lib,pkcs7err,pk7_doit" | 270 | $ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ - |
236 | $ LIB_PKCS12 = "p12_add,p12_attr,p12_bags,p12_crpt,p12_crt,p12_decr,"+ - | 271 | "pk7_mime" |
237 | "p12_init,p12_key,p12_kiss,p12_lib,p12_mac,p12_mutl,"+ - | 272 | $ LIB_PKCS12 = "p12_add,p12_asn,p12_attr,p12_crpt,p12_crt,p12_decr,"+ - |
238 | "p12_sbag,p12_utl,pk12err" | 273 | "p12_init,p12_key,p12_kiss,p12_mutl,"+ - |
274 | "p12_utl,p12_npas,pk12err,p12_p8d,p12_p8e" | ||
239 | $ LIB_COMP = "comp_lib,"+ - | 275 | $ LIB_COMP = "comp_lib,"+ - |
240 | "c_rle,c_zlib" | 276 | "c_rle,c_zlib" |
277 | $ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ - | ||
278 | "ocsp_srv,ocsp_prn,ocsp_vfy,ocsp_err" | ||
279 | $ LIB_UI_COMPAT = ",ui_compat" | ||
280 | $ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT | ||
281 | $ LIB_KRB5 = "krb5_asn" | ||
241 | $! | 282 | $! |
242 | $! Setup exceptional compilations | 283 | $! Setup exceptional compilations |
243 | $! | 284 | $! |
244 | $ COMPILEWITH_CC3 = ",bss_rtcp," | 285 | $ COMPILEWITH_CC3 = ",bss_rtcp," |
245 | $ COMPILEWITH_CC4 = ",a_utctm," | 286 | $ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time," |
246 | $ COMPILEWITH_CC5 = ",md2_dgst,md5_dgst,mdc2dgst,sha_dgst,sha1dgst," + - | 287 | $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + - |
247 | "rmd_dgst,bf_enc," | 288 | "sha_dgst,sha1dgst,rmd_dgst,bf_enc," |
248 | $! | 289 | $! |
249 | $! Check To See If We Are Going To Use RSAREF. | 290 | $! Check To See If We Are Going To Use RSAREF. |
250 | $! | 291 | $! |
251 | $ IF (RSAREF.EQS."TRUE" .AND. ENCRYPT_TYPES - "RSA".NES.ENCRYPT_TYPES) | 292 | $ IF (RSAREF.EQS."TRUE" .AND. ENCRYPT_TYPES - "RSA".NES.ENCRYPT_TYPES - |
293 | .AND. (BUILDALL .EQS. "TRUE" .OR. BUILDALL .EQS. "LIBRARY")) | ||
252 | $ THEN | 294 | $ THEN |
253 | $! | 295 | $! |
254 | $! Check To See If The File [-.RSAREF]RSAREF.C Is Actually There. | 296 | $! Check To See If The File [-.RSAREF]RSAREF.C Is Actually There. |
@@ -256,10 +298,10 @@ $! | |||
256 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAREF.C").EQS."") | 298 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAREF.C").EQS."") |
257 | $ THEN | 299 | $ THEN |
258 | $! | 300 | $! |
259 | $! Tell The User That The File Dosen't Exist. | 301 | $! Tell The User That The File Doesn't Exist. |
260 | $! | 302 | $! |
261 | $ WRITE SYS$OUTPUT "" | 303 | $ WRITE SYS$OUTPUT "" |
262 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAREF.C Dosen't Exist." | 304 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAREF.C Doesn't Exist." |
263 | $ WRITE SYS$OUTPUT "" | 305 | $ WRITE SYS$OUTPUT "" |
264 | $! | 306 | $! |
265 | $! Exit The Build. | 307 | $! Exit The Build. |
@@ -291,10 +333,10 @@ $! | |||
291 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAR_ERR.C").EQS."") | 333 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]RSAR_ERR.C").EQS."") |
292 | $ THEN | 334 | $ THEN |
293 | $! | 335 | $! |
294 | $! Tell The User That The File Dosen't Exist. | 336 | $! Tell The User That The File Doesn't Exist. |
295 | $! | 337 | $! |
296 | $ WRITE SYS$OUTPUT "" | 338 | $ WRITE SYS$OUTPUT "" |
297 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAR_ERR.C Dosen't Exist." | 339 | $ WRITE SYS$OUTPUT "The File [-.RSAREF]RSAR_ERR.C Doesn't Exist." |
298 | $ WRITE SYS$OUTPUT "" | 340 | $ WRITE SYS$OUTPUT "" |
299 | $! | 341 | $! |
300 | $! Exit The Build. | 342 | $! Exit The Build. |
@@ -340,6 +382,8 @@ $! | |||
340 | $! Extract The Module Name From The Encryption List. | 382 | $! Extract The Module Name From The Encryption List. |
341 | $! | 383 | $! |
342 | $ MODULE_NAME = F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES) | 384 | $ MODULE_NAME = F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES) |
385 | $ IF MODULE_NAME.EQS."Basic" THEN MODULE_NAME = "" | ||
386 | $ MODULE_NAME1 = MODULE_NAME | ||
343 | $! | 387 | $! |
344 | $! Check To See If We Are At The End Of The Module List. | 388 | $! Check To See If We Are At The End Of The Module List. |
345 | $! | 389 | $! |
@@ -358,20 +402,10 @@ $! Increment The Moudle Counter. | |||
358 | $! | 402 | $! |
359 | $ MODULE_COUNTER = MODULE_COUNTER + 1 | 403 | $ MODULE_COUNTER = MODULE_COUNTER + 1 |
360 | $! | 404 | $! |
361 | $! Tell The User What Module We Are Building. | 405 | $! Create The Library and Apps Module Names. |
362 | $! | ||
363 | $ IF (MODULE_NAME.NES."") | ||
364 | $ THEN | ||
365 | $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME," Files." | ||
366 | $ ENDIF | ||
367 | $! | ||
368 | $! Define A File Counter And Set It To "0". | ||
369 | $! | ||
370 | $ FILE_COUNTER = 0 | ||
371 | $! | ||
372 | $! Create The Library Module Name. | ||
373 | $! | 406 | $! |
374 | $ LIB_MODULE = "LIB_" + MODULE_NAME | 407 | $ LIB_MODULE = "LIB_" + MODULE_NAME |
408 | $ APPS_MODULE = "APPS_" + MODULE_NAME | ||
375 | $ IF (MODULE_NAME.EQS."ASN1_2") | 409 | $ IF (MODULE_NAME.EQS."ASN1_2") |
376 | $ THEN | 410 | $ THEN |
377 | $ MODULE_NAME = "ASN1" | 411 | $ MODULE_NAME = "ASN1" |
@@ -381,6 +415,11 @@ $ THEN | |||
381 | $ MODULE_NAME = "EVP" | 415 | $ MODULE_NAME = "EVP" |
382 | $ ENDIF | 416 | $ ENDIF |
383 | $! | 417 | $! |
418 | $! Set state (can be LIB and APPS) | ||
419 | $! | ||
420 | $ STATE = "LIB" | ||
421 | $ IF BUILDALL .EQS. "APPS" THEN STATE = "APPS" | ||
422 | $! | ||
384 | $! Check if the library module name actually is defined | 423 | $! Check if the library module name actually is defined |
385 | $! | 424 | $! |
386 | $ IF F$TYPE('LIB_MODULE') .EQS. "" | 425 | $ IF F$TYPE('LIB_MODULE') .EQS. "" |
@@ -391,22 +430,92 @@ $ WRITE SYS$ERROR "" | |||
391 | $ GOTO MODULE_NEXT | 430 | $ GOTO MODULE_NEXT |
392 | $ ENDIF | 431 | $ ENDIF |
393 | $! | 432 | $! |
433 | $! Top Of The Module Loop. | ||
434 | $! | ||
435 | $ MODULE_AGAIN: | ||
436 | $! | ||
437 | $! Tell The User What Module We Are Building. | ||
438 | $! | ||
439 | $ IF (MODULE_NAME1.NES."") | ||
440 | $ THEN | ||
441 | $ IF STATE .EQS. "LIB" | ||
442 | $ THEN | ||
443 | $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Library Files. (",BUILDALL,",",STATE,")" | ||
444 | $ ELSE IF F$TYPE('APPS_MODULE') .NES. "" | ||
445 | $ THEN | ||
446 | $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Applications. (",BUILDALL,",",STATE,")" | ||
447 | $ ENDIF | ||
448 | $ ENDIF | ||
449 | $ ENDIF | ||
450 | $! | ||
451 | $! Define A File Counter And Set It To "0". | ||
452 | $! | ||
453 | $ FILE_COUNTER = 0 | ||
454 | $ APPLICATION = "" | ||
455 | $ APPLICATION_COUNTER = 0 | ||
456 | $! | ||
394 | $! Top Of The File Loop. | 457 | $! Top Of The File Loop. |
395 | $! | 458 | $! |
396 | $ NEXT_FILE: | 459 | $ NEXT_FILE: |
397 | $! | 460 | $! |
398 | $! O.K, Extract The File Name From The File List. | 461 | $! Look in the LIB_MODULE is we're in state LIB |
399 | $! | 462 | $! |
400 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE') | 463 | $ IF STATE .EQS. "LIB" |
464 | $ THEN | ||
465 | $! | ||
466 | $! O.K, Extract The File Name From The File List. | ||
467 | $! | ||
468 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE') | ||
469 | $! | ||
470 | $! else | ||
471 | $! | ||
472 | $ ELSE | ||
473 | $ FILE_NAME = "," | ||
474 | $! | ||
475 | $ IF F$TYPE('APPS_MODULE') .NES. "" | ||
476 | $ THEN | ||
477 | $! | ||
478 | $! Extract The File Name From The File List. | ||
479 | $! This part is a bit more complicated. | ||
480 | $! | ||
481 | $ IF APPLICATION .EQS. "" | ||
482 | $ THEN | ||
483 | $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE') | ||
484 | $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1 | ||
485 | $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION) | ||
486 | $ APPLICATION = F$ELEMENT(0,"/",APPLICATION) | ||
487 | $ FILE_COUNTER = 0 | ||
488 | $ ENDIF | ||
489 | $ | ||
490 | $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*" | ||
491 | $! SHOW SYMBOL APPLICATION* | ||
492 | $! | ||
493 | $ IF APPLICATION .NES. ";" | ||
494 | $ THEN | ||
495 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",APPLICATION_OBJECTS) | ||
496 | $ IF FILE_NAME .EQS. "," | ||
497 | $ THEN | ||
498 | $ APPLICATION = "" | ||
499 | $ GOTO NEXT_FILE | ||
500 | $ ENDIF | ||
501 | $ ENDIF | ||
502 | $ ENDIF | ||
503 | $ ENDIF | ||
401 | $! | 504 | $! |
402 | $! Check To See If We Are At The End Of The File List. | 505 | $! Check To See If We Are At The End Of The File List. |
403 | $! | 506 | $! |
404 | $ IF (FILE_NAME.EQS.",") | 507 | $ IF (FILE_NAME.EQS.",") |
405 | $ THEN | 508 | $ THEN |
406 | $! | 509 | $! |
407 | $! We Are At The End Of The File List, Goto FILE_DONE. | 510 | $! We Are At The End Of The File List, Change State Or Goto FILE_DONE. |
408 | $! | 511 | $! |
409 | $ GOTO FILE_DONE | 512 | $ IF STATE .EQS. "LIB" .AND. BUILDALL .NES. "LIBRARY" |
513 | $ THEN | ||
514 | $ STATE = "APPS" | ||
515 | $ GOTO MODULE_AGAIN | ||
516 | $ ELSE | ||
517 | $ GOTO FILE_DONE | ||
518 | $ ENDIF | ||
410 | $! | 519 | $! |
411 | $! End The File List Check. | 520 | $! End The File List Check. |
412 | $! | 521 | $! |
@@ -440,10 +549,10 @@ $! | |||
440 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") | 549 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") |
441 | $ THEN | 550 | $ THEN |
442 | $! | 551 | $! |
443 | $! Tell The User That The File Dosen't Exist. | 552 | $! Tell The User That The File Doesn't Exist. |
444 | $! | 553 | $! |
445 | $ WRITE SYS$OUTPUT "" | 554 | $ WRITE SYS$OUTPUT "" |
446 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." | 555 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist." |
447 | $ WRITE SYS$OUTPUT "" | 556 | $ WRITE SYS$OUTPUT "" |
448 | $! | 557 | $! |
449 | $! Exit The Build. | 558 | $! Exit The Build. |
@@ -458,7 +567,7 @@ $! Tell The User We Are Compiling The File. | |||
458 | $! | 567 | $! |
459 | $ IF (MODULE_NAME.EQS."") | 568 | $ IF (MODULE_NAME.EQS."") |
460 | $ THEN | 569 | $ THEN |
461 | WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File." | 570 | $ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE,")" |
462 | $ ENDIF | 571 | $ ENDIF |
463 | $ IF (MODULE_NAME.NES."") | 572 | $ IF (MODULE_NAME.NES."") |
464 | $ THEN | 573 | $ THEN |
@@ -490,14 +599,17 @@ $ ENDIF | |||
490 | $ ENDIF | 599 | $ ENDIF |
491 | $ ENDIF | 600 | $ ENDIF |
492 | $ ENDIF | 601 | $ ENDIF |
602 | $ IF STATE .EQS. "LIB" | ||
603 | $ THEN | ||
493 | $! | 604 | $! |
494 | $! Add It To The Library. | 605 | $! Add It To The Library. |
495 | $! | 606 | $! |
496 | $ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE' | 607 | $ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE' |
497 | $! | 608 | $! |
498 | $! Time To Clean Up The Object File. | 609 | $! Time To Clean Up The Object File. |
499 | $! | 610 | $! |
500 | $ DELETE 'OBJECT_FILE';* | 611 | $ DELETE 'OBJECT_FILE';* |
612 | $ ENDIF | ||
501 | $! | 613 | $! |
502 | $! Go Back And Do It Again. | 614 | $! Go Back And Do It Again. |
503 | $! | 615 | $! |
@@ -507,6 +619,100 @@ $! All Done With This Library Part. | |||
507 | $! | 619 | $! |
508 | $ FILE_DONE: | 620 | $ FILE_DONE: |
509 | $! | 621 | $! |
622 | $! Time To Build Some Applications | ||
623 | $! | ||
624 | $ IF F$TYPE('APPS_MODULE') .NES. "" .AND. BUILDALL .NES. "LIBRARY" | ||
625 | $ THEN | ||
626 | $ APPLICATION_COUNTER = 0 | ||
627 | $ NEXT_APPLICATION: | ||
628 | $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE') | ||
629 | $ IF APPLICATION .EQS. ";" THEN GOTO APPLICATION_DONE | ||
630 | $ | ||
631 | $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1 | ||
632 | $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION) | ||
633 | $ APPLICATION = F$ELEMENT(0,"/",APPLICATION) | ||
634 | $ | ||
635 | $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*" | ||
636 | $! SHOW SYMBOL APPLICATION* | ||
637 | $! | ||
638 | $! Tell the user what happens | ||
639 | $! | ||
640 | $ WRITE SYS$OUTPUT " ",APPLICATION,".exe" | ||
641 | $! | ||
642 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | ||
643 | $! | ||
644 | $ ON ERROR THEN GOTO NEXT_APPLICATION | ||
645 | $ IF (RSAREF.EQS."TRUE") | ||
646 | $ THEN | ||
647 | $! | ||
648 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
649 | $! | ||
650 | $ IF (TCPIP_LIB.NES."") | ||
651 | $ THEN | ||
652 | $! | ||
653 | $! Link With The RSAREF Library And A Specific TCP/IP Library. | ||
654 | $! | ||
655 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
656 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
657 | 'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
658 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
659 | $! | ||
660 | $! Else... | ||
661 | $! | ||
662 | $ ELSE | ||
663 | $! | ||
664 | $! Link With The RSAREF Library And NO TCP/IP Library. | ||
665 | $! | ||
666 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
667 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
668 | 'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
669 | 'OPT_FILE'/OPTION | ||
670 | $! | ||
671 | $! End The TCP/IP Library Check. | ||
672 | $! | ||
673 | $ ENDIF | ||
674 | $! | ||
675 | $! Else... | ||
676 | $! | ||
677 | $ ELSE | ||
678 | $! | ||
679 | $! Don't Link With The RSAREF Routines. | ||
680 | $! | ||
681 | $! | ||
682 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
683 | $! | ||
684 | $ IF (TCPIP_LIB.NES."") | ||
685 | $ THEN | ||
686 | $! | ||
687 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | ||
688 | $! | ||
689 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
690 | 'OBJ_DIR''APPLICATION_OBJECTS', - | ||
691 | 'CRYPTO_LIB'/LIBRARY, - | ||
692 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
693 | $! | ||
694 | $! Else... | ||
695 | $! | ||
696 | $ ELSE | ||
697 | $! | ||
698 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
699 | $! | ||
700 | $ LINK/'DEBUGGER'/'TRACEBACK'/EXE='EXE_DIR''APPLICATION'.EXE - | ||
701 | 'OBJ_DIR''APPLICATION_OBJECTS',- | ||
702 | 'CRYPTO_LIB'/LIBRARY, - | ||
703 | 'OPT_FILE'/OPTION | ||
704 | $! | ||
705 | $! End The TCP/IP Library Check. | ||
706 | $! | ||
707 | $ ENDIF | ||
708 | $! | ||
709 | $! End The RSAREF Link Check. | ||
710 | $! | ||
711 | $ ENDIF | ||
712 | $ GOTO NEXT_APPLICATION | ||
713 | $ APPLICATION_DONE: | ||
714 | $ ENDIF | ||
715 | $! | ||
510 | $! Go Back And Get The Next Module. | 716 | $! Go Back And Get The Next Module. |
511 | $! | 717 | $! |
512 | $ GOTO MODULE_NEXT | 718 | $ GOTO MODULE_NEXT |
@@ -653,17 +859,71 @@ $ CHECK_OPTIONS: | |||
653 | $! | 859 | $! |
654 | $! Check To See If P1 Is Blank. | 860 | $! Check To See If P1 Is Blank. |
655 | $! | 861 | $! |
656 | $ IF (P1.EQS."NORSAREF") | 862 | $ IF (P1.EQS."ALL") |
657 | $ THEN | 863 | $ THEN |
658 | $! | 864 | $! |
659 | $! P1 Is NORSAREF, So Compile With The Regular RSA Libraries. | 865 | $! P1 Is Blank, So Build Everything. |
866 | $! | ||
867 | $ BUILDALL = "TRUE" | ||
868 | $! | ||
869 | $! Else... | ||
870 | $! | ||
871 | $ ELSE | ||
872 | $! | ||
873 | $! Else, Check To See If P1 Has A Valid Arguement. | ||
874 | $! | ||
875 | $ IF (P1.EQS."LIBRARY").OR.(P1.EQS."APPS") | ||
876 | $ THEN | ||
877 | $! | ||
878 | $! A Valid Arguement. | ||
879 | $! | ||
880 | $ BUILDALL = P1 | ||
881 | $! | ||
882 | $! Else... | ||
883 | $! | ||
884 | $ ELSE | ||
885 | $! | ||
886 | $! Tell The User We Don't Know What They Want. | ||
887 | $! | ||
888 | $ WRITE SYS$OUTPUT "" | ||
889 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | ||
890 | $ WRITE SYS$OUTPUT "" | ||
891 | $ WRITE SYS$OUTPUT " ALL : Just Build Everything." | ||
892 | $ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.SSL]LIBCRYPTO.OLB Library." | ||
893 | $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.SSL]*.EXE Programs." | ||
894 | $ WRITE SYS$OUTPUT "" | ||
895 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" | ||
896 | $ WRITE SYS$OUTPUT "" | ||
897 | $ WRITE SYS$OUTPUT " AXP : Alpha Architecture." | ||
898 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." | ||
899 | $ WRITE SYS$OUTPUT "" | ||
900 | $! | ||
901 | $! Time To EXIT. | ||
902 | $! | ||
903 | $ EXIT | ||
904 | $! | ||
905 | $! End The Valid Arguement Check. | ||
906 | $! | ||
907 | $ ENDIF | ||
908 | $! | ||
909 | $! End The P1 Check. | ||
910 | $! | ||
911 | $ ENDIF | ||
912 | $! | ||
913 | $! Check To See If P2 Is Blank. | ||
914 | $! | ||
915 | $ P2 = "NORSAREF" | ||
916 | $ IF (P2.EQS."NORSAREF") | ||
917 | $ THEN | ||
918 | $! | ||
919 | $! P2 Is NORSAREF, So Compile With The Regular RSA Libraries. | ||
660 | $! | 920 | $! |
661 | $ RSAREF = "FALSE" | 921 | $ RSAREF = "FALSE" |
662 | $ ELSE | 922 | $ ELSE |
663 | $! | 923 | $! |
664 | $! Check To See If We Are To Use The RSAREF Library. | 924 | $! Check To See If We Are To Use The RSAREF Library. |
665 | $! | 925 | $! |
666 | $ IF (P1.EQS."RSAREF") | 926 | $ IF (P2.EQS."RSAREF") |
667 | $ THEN | 927 | $ THEN |
668 | $! | 928 | $! |
669 | $! Check To Make Sure We Have The RSAREF Source Code Directory. | 929 | $! Check To Make Sure We Have The RSAREF Source Code Directory. |
@@ -677,7 +937,7 @@ $! | |||
677 | $ WRITE SYS$OUTPUT "" | 937 | $ WRITE SYS$OUTPUT "" |
678 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." | 938 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." |
679 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" | 939 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" |
680 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the" | 940 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file doesn't have the" |
681 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" | 941 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" |
682 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" | 942 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" |
683 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." | 943 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." |
@@ -697,7 +957,7 @@ $! | |||
697 | $! They Entered An Invalid Option.. | 957 | $! They Entered An Invalid Option.. |
698 | $! | 958 | $! |
699 | $ WRITE SYS$OUTPUT "" | 959 | $ WRITE SYS$OUTPUT "" |
700 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | 960 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" |
701 | $ WRITE SYS$OUTPUT "" | 961 | $ WRITE SYS$OUTPUT "" |
702 | $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library." | 962 | $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library." |
703 | $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library." | 963 | $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library." |
@@ -711,16 +971,16 @@ $! End The Valid Arguement Check. | |||
711 | $! | 971 | $! |
712 | $ ENDIF | 972 | $ ENDIF |
713 | $! | 973 | $! |
714 | $! End The P1 Check. | 974 | $! End The P2 Check. |
715 | $! | 975 | $! |
716 | $ ENDIF | 976 | $ ENDIF |
717 | $! | 977 | $! |
718 | $! Check To See If P2 Is Blank. | 978 | $! Check To See If P3 Is Blank. |
719 | $! | 979 | $! |
720 | $ IF (P2.EQS."NODEBUG") | 980 | $ IF (P3.EQS."NODEBUG") |
721 | $ THEN | 981 | $ THEN |
722 | $! | 982 | $! |
723 | $! P2 Is NODEBUG, So Compile Without The Debugger Information. | 983 | $! P3 Is NODEBUG, So Compile Without The Debugger Information. |
724 | $! | 984 | $! |
725 | $ DEBUGGER = "NODEBUG" | 985 | $ DEBUGGER = "NODEBUG" |
726 | $ TRACEBACK = "NOTRACEBACK" | 986 | $ TRACEBACK = "NOTRACEBACK" |
@@ -733,7 +993,7 @@ $ ELSE | |||
733 | $! | 993 | $! |
734 | $! Check To See If We Are To Compile With Debugger Information. | 994 | $! Check To See If We Are To Compile With Debugger Information. |
735 | $! | 995 | $! |
736 | $ IF (P2.EQS."DEBUG") | 996 | $ IF (P3.EQS."DEBUG") |
737 | $ THEN | 997 | $ THEN |
738 | $! | 998 | $! |
739 | $! Compile With Debugger Information. | 999 | $! Compile With Debugger Information. |
@@ -750,7 +1010,7 @@ $! | |||
750 | $! They Entered An Invalid Option.. | 1010 | $! They Entered An Invalid Option.. |
751 | $! | 1011 | $! |
752 | $ WRITE SYS$OUTPUT "" | 1012 | $ WRITE SYS$OUTPUT "" |
753 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | 1013 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" |
754 | $ WRITE SYS$OUTPUT "" | 1014 | $ WRITE SYS$OUTPUT "" |
755 | $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." | 1015 | $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." |
756 | $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." | 1016 | $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." |
@@ -764,7 +1024,7 @@ $! End The Valid Arguement Check. | |||
764 | $! | 1024 | $! |
765 | $ ENDIF | 1025 | $ ENDIF |
766 | $! | 1026 | $! |
767 | $! End The P2 Check. | 1027 | $! End The P3 Check. |
768 | $! | 1028 | $! |
769 | $ ENDIF | 1029 | $ ENDIF |
770 | $! | 1030 | $! |
@@ -774,9 +1034,9 @@ $! Written By: Richard Levitte | |||
774 | $! richard@levitte.org | 1034 | $! richard@levitte.org |
775 | $! | 1035 | $! |
776 | $! | 1036 | $! |
777 | $! Check To See If We Have A Option For P5. | 1037 | $! Check To See If We Have A Option For P6. |
778 | $! | 1038 | $! |
779 | $ IF (P5.EQS."") | 1039 | $ IF (P6.EQS."") |
780 | $ THEN | 1040 | $ THEN |
781 | $! | 1041 | $! |
782 | $! Get The Version Of VMS We Are Using. | 1042 | $! Get The Version Of VMS We Are Using. |
@@ -798,13 +1058,13 @@ $! End The VMS Version Check. | |||
798 | $! | 1058 | $! |
799 | $ ENDIF | 1059 | $ ENDIF |
800 | $! | 1060 | $! |
801 | $! End The P5 Check. | 1061 | $! End The P6 Check. |
802 | $! | 1062 | $! |
803 | $ ENDIF | 1063 | $ ENDIF |
804 | $! | 1064 | $! |
805 | $! Check To See If P3 Is Blank. | 1065 | $! Check To See If P4 Is Blank. |
806 | $! | 1066 | $! |
807 | $ IF (P3.EQS."") | 1067 | $ IF (P4.EQS."") |
808 | $ THEN | 1068 | $ THEN |
809 | $! | 1069 | $! |
810 | $! O.K., The User Didn't Specify A Compiler, Let's Try To | 1070 | $! O.K., The User Didn't Specify A Compiler, Let's Try To |
@@ -817,7 +1077,7 @@ $ THEN | |||
817 | $! | 1077 | $! |
818 | $! Looks Like GNUC, Set To Use GNUC. | 1078 | $! Looks Like GNUC, Set To Use GNUC. |
819 | $! | 1079 | $! |
820 | $ P3 = "GNUC" | 1080 | $ P4 = "GNUC" |
821 | $! | 1081 | $! |
822 | $! Else... | 1082 | $! Else... |
823 | $! | 1083 | $! |
@@ -830,7 +1090,7 @@ $ THEN | |||
830 | $! | 1090 | $! |
831 | $! Looks Like DECC, Set To Use DECC. | 1091 | $! Looks Like DECC, Set To Use DECC. |
832 | $! | 1092 | $! |
833 | $ P3 = "DECC" | 1093 | $ P4 = "DECC" |
834 | $! | 1094 | $! |
835 | $! Else... | 1095 | $! Else... |
836 | $! | 1096 | $! |
@@ -838,7 +1098,7 @@ $ ELSE | |||
838 | $! | 1098 | $! |
839 | $! Looks Like VAXC, Set To Use VAXC. | 1099 | $! Looks Like VAXC, Set To Use VAXC. |
840 | $! | 1100 | $! |
841 | $ P3 = "VAXC" | 1101 | $ P4 = "VAXC" |
842 | $! | 1102 | $! |
843 | $! End The VAXC Compiler Check. | 1103 | $! End The VAXC Compiler Check. |
844 | $! | 1104 | $! |
@@ -852,9 +1112,9 @@ $! End The Compiler Check. | |||
852 | $! | 1112 | $! |
853 | $ ENDIF | 1113 | $ ENDIF |
854 | $! | 1114 | $! |
855 | $! Check To See If We Have A Option For P4. | 1115 | $! Check To See If We Have A Option For P5. |
856 | $! | 1116 | $! |
857 | $ IF (P4.EQS."") | 1117 | $ IF (P5.EQS."") |
858 | $ THEN | 1118 | $ THEN |
859 | $! | 1119 | $! |
860 | $! Find out what socket library we have available | 1120 | $! Find out what socket library we have available |
@@ -864,7 +1124,7 @@ $ THEN | |||
864 | $! | 1124 | $! |
865 | $! We have SOCKETSHR, and it is my opinion that it's the best to use. | 1125 | $! We have SOCKETSHR, and it is my opinion that it's the best to use. |
866 | $! | 1126 | $! |
867 | $ P4 = "SOCKETSHR" | 1127 | $ P5 = "SOCKETSHR" |
868 | $! | 1128 | $! |
869 | $! Tell the user | 1129 | $! Tell the user |
870 | $! | 1130 | $! |
@@ -884,7 +1144,7 @@ $ THEN | |||
884 | $! | 1144 | $! |
885 | $! Last resort: a UCX or UCX-compatible library | 1145 | $! Last resort: a UCX or UCX-compatible library |
886 | $! | 1146 | $! |
887 | $ P4 = "UCX" | 1147 | $ P5 = "UCX" |
888 | $! | 1148 | $! |
889 | $! Tell the user | 1149 | $! Tell the user |
890 | $! | 1150 | $! |
@@ -898,22 +1158,22 @@ $ ENDIF | |||
898 | $! | 1158 | $! |
899 | $! Set Up Initial CC Definitions, Possibly With User Ones | 1159 | $! Set Up Initial CC Definitions, Possibly With User Ones |
900 | $! | 1160 | $! |
901 | $ CCDEFS = "VMS=1,TCPIP_TYPE_''P4'" | 1161 | $ CCDEFS = "TCPIP_TYPE_''P5',DSO_VMS" |
902 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 1162 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
903 | $ CCEXTRAFLAGS = "" | 1163 | $ CCEXTRAFLAGS = "" |
904 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 1164 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
905 | $ CCDISABLEWARNINGS = "" | 1165 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX" |
906 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 1166 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
907 | CCDISABLEWARNINGS = USER_CCDISABLEWARNINGS | 1167 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
908 | $! | 1168 | $! |
909 | $! Check To See If The User Entered A Valid Paramter. | 1169 | $! Check To See If The User Entered A Valid Paramter. |
910 | $! | 1170 | $! |
911 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | 1171 | $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC") |
912 | $ THEN | 1172 | $ THEN |
913 | $! | 1173 | $! |
914 | $! Check To See If The User Wanted DECC. | 1174 | $! Check To See If The User Wanted DECC. |
915 | $! | 1175 | $! |
916 | $ IF (P3.EQS."DECC") | 1176 | $ IF (P4.EQS."DECC") |
917 | $ THEN | 1177 | $ THEN |
918 | $! | 1178 | $! |
919 | $! Looks Like DECC, Set To Use DECC. | 1179 | $! Looks Like DECC, Set To Use DECC. |
@@ -930,7 +1190,9 @@ $ CC = "CC" | |||
930 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 1190 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
931 | THEN CC = "CC/DECC" | 1191 | THEN CC = "CC/DECC" |
932 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | 1192 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - |
933 | "/NOLIST/PREFIX=ALL/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS | 1193 | "/NOLIST/PREFIX=ALL" + - |
1194 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP])" + - | ||
1195 | CCEXTRAFLAGS | ||
934 | $! | 1196 | $! |
935 | $! Define The Linker Options File Name. | 1197 | $! Define The Linker Options File Name. |
936 | $! | 1198 | $! |
@@ -942,7 +1204,7 @@ $ ENDIF | |||
942 | $! | 1204 | $! |
943 | $! Check To See If We Are To Use VAXC. | 1205 | $! Check To See If We Are To Use VAXC. |
944 | $! | 1206 | $! |
945 | $ IF (P3.EQS."VAXC") | 1207 | $ IF (P4.EQS."VAXC") |
946 | $ THEN | 1208 | $ THEN |
947 | $! | 1209 | $! |
948 | $! Looks Like VAXC, Set To Use VAXC. | 1210 | $! Looks Like VAXC, Set To Use VAXC. |
@@ -962,7 +1224,8 @@ $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!" | |||
962 | $ EXIT | 1224 | $ EXIT |
963 | $ ENDIF | 1225 | $ ENDIF |
964 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | 1226 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
965 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST/INCLUDE=SYS$DISK:[]" + - | 1227 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
1228 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - | ||
966 | CCEXTRAFLAGS | 1229 | CCEXTRAFLAGS |
967 | $ CCDEFS = """VAXC""," + CCDEFS | 1230 | $ CCDEFS = """VAXC""," + CCDEFS |
968 | $! | 1231 | $! |
@@ -980,7 +1243,7 @@ $ ENDIF | |||
980 | $! | 1243 | $! |
981 | $! Check To See If We Are To Use GNU C. | 1244 | $! Check To See If We Are To Use GNU C. |
982 | $! | 1245 | $! |
983 | $ IF (P3.EQS."GNUC") | 1246 | $ IF (P4.EQS."GNUC") |
984 | $ THEN | 1247 | $ THEN |
985 | $! | 1248 | $! |
986 | $! Looks Like GNUC, Set To Use GNUC. | 1249 | $! Looks Like GNUC, Set To Use GNUC. |
@@ -994,7 +1257,8 @@ $! | |||
994 | $! Use GNU C... | 1257 | $! Use GNU C... |
995 | $! | 1258 | $! |
996 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | 1259 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
997 | "/INCLUDE=SYS$DISK:[]" + CCEXTRAFLAGS | 1260 | "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + - |
1261 | CCEXTRAFLAGS | ||
998 | $! | 1262 | $! |
999 | $! Define The Linker Options File Name. | 1263 | $! Define The Linker Options File Name. |
1000 | $! | 1264 | $! |
@@ -1051,7 +1315,7 @@ $ CC4DISABLEWARNINGS = "" | |||
1051 | $ ENDIF | 1315 | $ ENDIF |
1052 | $ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS | 1316 | $ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS |
1053 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 1317 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
1054 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG" | 1318 | $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P3 .NES. "DEBUG" |
1055 | $ THEN | 1319 | $ THEN |
1056 | $ CC5 = CC + "/OPTIMIZE=NODISJOINT" | 1320 | $ CC5 = CC + "/OPTIMIZE=NODISJOINT" |
1057 | $ ELSE | 1321 | $ ELSE |
@@ -1070,7 +1334,7 @@ $! | |||
1070 | $! Tell The User We Don't Know What They Want. | 1334 | $! Tell The User We Don't Know What They Want. |
1071 | $! | 1335 | $! |
1072 | $ WRITE SYS$OUTPUT "" | 1336 | $ WRITE SYS$OUTPUT "" |
1073 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" | 1337 | $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" |
1074 | $ WRITE SYS$OUTPUT "" | 1338 | $ WRITE SYS$OUTPUT "" |
1075 | $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." | 1339 | $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." |
1076 | $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." | 1340 | $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." |
@@ -1096,17 +1360,18 @@ $ WRITE SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO | |||
1096 | $! | 1360 | $! |
1097 | $! Time to check the contents, and to make sure we get the correct library. | 1361 | $! Time to check the contents, and to make sure we get the correct library. |
1098 | $! | 1362 | $! |
1099 | $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" | 1363 | $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" - |
1364 | .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE" | ||
1100 | $ THEN | 1365 | $ THEN |
1101 | $! | 1366 | $! |
1102 | $! Check to see if SOCKETSHR was chosen | 1367 | $! Check to see if SOCKETSHR was chosen |
1103 | $! | 1368 | $! |
1104 | $ IF P4.EQS."SOCKETSHR" | 1369 | $ IF P5.EQS."SOCKETSHR" |
1105 | $ THEN | 1370 | $ THEN |
1106 | $! | 1371 | $! |
1107 | $! Set the library to use SOCKETSHR | 1372 | $! Set the library to use SOCKETSHR |
1108 | $! | 1373 | $! |
1109 | $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT" | 1374 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" |
1110 | $! | 1375 | $! |
1111 | $! Done with SOCKETSHR | 1376 | $! Done with SOCKETSHR |
1112 | $! | 1377 | $! |
@@ -1114,12 +1379,12 @@ $ ENDIF | |||
1114 | $! | 1379 | $! |
1115 | $! Check to see if MULTINET was chosen | 1380 | $! Check to see if MULTINET was chosen |
1116 | $! | 1381 | $! |
1117 | $ IF P4.EQS."MULTINET" | 1382 | $ IF P5.EQS."MULTINET" |
1118 | $ THEN | 1383 | $ THEN |
1119 | $! | 1384 | $! |
1120 | $! Set the library to use UCX emulation. | 1385 | $! Set the library to use UCX emulation. |
1121 | $! | 1386 | $! |
1122 | $ P4 = "UCX" | 1387 | $ P5 = "UCX" |
1123 | $! | 1388 | $! |
1124 | $! Done with MULTINET | 1389 | $! Done with MULTINET |
1125 | $! | 1390 | $! |
@@ -1127,24 +1392,50 @@ $ ENDIF | |||
1127 | $! | 1392 | $! |
1128 | $! Check to see if UCX was chosen | 1393 | $! Check to see if UCX was chosen |
1129 | $! | 1394 | $! |
1130 | $ IF P4.EQS."UCX" | 1395 | $ IF P5.EQS."UCX" |
1131 | $ THEN | 1396 | $ THEN |
1132 | $! | 1397 | $! |
1133 | $! Set the library to use UCX. | 1398 | $! Set the library to use UCX. |
1134 | $! | 1399 | $! |
1135 | $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT" | 1400 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" |
1136 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 1401 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
1137 | $ THEN | 1402 | $ THEN |
1138 | $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | 1403 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" |
1139 | $ ELSE | 1404 | $ ELSE |
1140 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 1405 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
1141 | TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT" | 1406 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" |
1142 | $ ENDIF | 1407 | $ ENDIF |
1143 | $! | 1408 | $! |
1144 | $! Done with UCX | 1409 | $! Done with UCX |
1145 | $! | 1410 | $! |
1146 | $ ENDIF | 1411 | $ ENDIF |
1147 | $! | 1412 | $! |
1413 | $! Check to see if TCPIP was chosen | ||
1414 | $! | ||
1415 | $ IF P5.EQS."TCPIP" | ||
1416 | $ THEN | ||
1417 | $! | ||
1418 | $! Set the library to use TCPIP (post UCX). | ||
1419 | $! | ||
1420 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | ||
1421 | $! | ||
1422 | $! Done with TCPIP | ||
1423 | $! | ||
1424 | $ ENDIF | ||
1425 | $! | ||
1426 | $! Check to see if NONE was chosen | ||
1427 | $! | ||
1428 | $ IF P5.EQS."NONE" | ||
1429 | $ THEN | ||
1430 | $! | ||
1431 | $! Do not use a TCPIP library. | ||
1432 | $! | ||
1433 | $ TCPIP_LIB = "" | ||
1434 | $! | ||
1435 | $! Done with TCPIP | ||
1436 | $! | ||
1437 | $ ENDIF | ||
1438 | $! | ||
1148 | $! Print info | 1439 | $! Print info |
1149 | $! | 1440 | $! |
1150 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 1441 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB |
@@ -1156,10 +1447,11 @@ $! | |||
1156 | $! Tell The User We Don't Know What They Want. | 1447 | $! Tell The User We Don't Know What They Want. |
1157 | $! | 1448 | $! |
1158 | $ WRITE SYS$OUTPUT "" | 1449 | $ WRITE SYS$OUTPUT "" |
1159 | $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" | 1450 | $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:" |
1160 | $ WRITE SYS$OUTPUT "" | 1451 | $ WRITE SYS$OUTPUT "" |
1161 | $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." | 1452 | $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." |
1162 | $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." | 1453 | $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." |
1454 | $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library." | ||
1163 | $ WRITE SYS$OUTPUT "" | 1455 | $ WRITE SYS$OUTPUT "" |
1164 | $! | 1456 | $! |
1165 | $! Time To EXIT. | 1457 | $! Time To EXIT. |
@@ -1173,9 +1465,10 @@ $! | |||
1173 | $! Check if the user wanted to compile just a subset of all the encryption | 1465 | $! Check if the user wanted to compile just a subset of all the encryption |
1174 | $! methods. | 1466 | $! methods. |
1175 | $! | 1467 | $! |
1176 | $ IF P6 .NES. "" | 1468 | $ IF P7 .NES. "" |
1177 | $ THEN | 1469 | $ THEN |
1178 | $ ENCRYPT_TYPES = P6 | 1470 | $ ENCRYPT_TYPES = P7 |
1471 | $! NYI: ENCRYPT_PROGRAMS = P7 | ||
1179 | $ ENDIF | 1472 | $ ENDIF |
1180 | $! | 1473 | $! |
1181 | $! Time To RETURN... | 1474 | $! Time To RETURN... |
@@ -1191,6 +1484,7 @@ $! | |||
1191 | $! Save directory information | 1484 | $! Save directory information |
1192 | $! | 1485 | $! |
1193 | $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" | 1486 | $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" |
1487 | $ __HERE = F$EDIT(__HERE,"UPCASE") | ||
1194 | $ __TOP = __HERE - "CRYPTO]" | 1488 | $ __TOP = __HERE - "CRYPTO]" |
1195 | $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | 1489 | $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" |
1196 | $! | 1490 | $! |
diff --git a/src/lib/libcrypto/des/VERSION b/src/lib/libcrypto/des/VERSION index f62d8bdac0..c7d01542bc 100644 --- a/src/lib/libcrypto/des/VERSION +++ b/src/lib/libcrypto/des/VERSION | |||
@@ -1,3 +1,4 @@ | |||
1 | Fixed the weak key values which were wrong :-( | ||
1 | Defining SIGACTION causes sigaction() to be used instead of signal(). | 2 | Defining SIGACTION causes sigaction() to be used instead of signal(). |
2 | SIGUSR1/SIGUSR2 are no longer mapped in the read tty stuff because it | 3 | SIGUSR1/SIGUSR2 are no longer mapped in the read tty stuff because it |
3 | can cause problems. This should hopefully not affect normal | 4 | can cause problems. This should hopefully not affect normal |
diff --git a/src/lib/libcrypto/des/asm/des686.pl b/src/lib/libcrypto/des/asm/des686.pl index cf1a82fb5c..d3ad5d5edd 100644 --- a/src/lib/libcrypto/des/asm/des686.pl +++ b/src/lib/libcrypto/des/asm/des686.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | $prog="des686.pl"; | 3 | $prog="des686.pl"; |
4 | 4 | ||
@@ -46,19 +46,19 @@ EOF | |||
46 | $L="edi"; | 46 | $L="edi"; |
47 | $R="esi"; | 47 | $R="esi"; |
48 | 48 | ||
49 | &des_encrypt("des_encrypt",1); | 49 | &DES_encrypt("DES_encrypt1",1); |
50 | &des_encrypt("des_encrypt2",0); | 50 | &DES_encrypt("DES_encrypt2",0); |
51 | 51 | ||
52 | &des_encrypt3("des_encrypt3",1); | 52 | &DES_encrypt3("DES_encrypt3",1); |
53 | &des_encrypt3("des_decrypt3",0); | 53 | &DES_encrypt3("DES_decrypt3",0); |
54 | 54 | ||
55 | &file_end(); | 55 | &file_end(); |
56 | 56 | ||
57 | sub des_encrypt | 57 | sub DES_encrypt |
58 | { | 58 | { |
59 | local($name,$do_ip)=@_; | 59 | local($name,$do_ip)=@_; |
60 | 60 | ||
61 | &function_begin($name,"EXTRN _des_SPtrans:DWORD"); | 61 | &function_begin($name,"EXTRN _DES_SPtrans:DWORD"); |
62 | 62 | ||
63 | &comment(""); | 63 | &comment(""); |
64 | &comment("Load the 2 words"); | 64 | &comment("Load the 2 words"); |
@@ -94,11 +94,11 @@ sub des_encrypt | |||
94 | { | 94 | { |
95 | &comment(""); | 95 | &comment(""); |
96 | &comment("Round $i"); | 96 | &comment("Round $i"); |
97 | &D_ENCRYPT($L,$R,$i*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); | 97 | &D_ENCRYPT($L,$R,$i*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx"); |
98 | 98 | ||
99 | &comment(""); | 99 | &comment(""); |
100 | &comment("Round ".sprintf("%d",$i+1)); | 100 | &comment("Round ".sprintf("%d",$i+1)); |
101 | &D_ENCRYPT($R,$L,($i+1)*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); | 101 | &D_ENCRYPT($R,$L,($i+1)*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx"); |
102 | } | 102 | } |
103 | &jmp(&label("end")); | 103 | &jmp(&label("end")); |
104 | 104 | ||
@@ -108,10 +108,10 @@ sub des_encrypt | |||
108 | { | 108 | { |
109 | &comment(""); | 109 | &comment(""); |
110 | &comment("Round $i"); | 110 | &comment("Round $i"); |
111 | &D_ENCRYPT($L,$R,$i*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); | 111 | &D_ENCRYPT($L,$R,$i*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx"); |
112 | &comment(""); | 112 | &comment(""); |
113 | &comment("Round ".sprintf("%d",$i-1)); | 113 | &comment("Round ".sprintf("%d",$i-1)); |
114 | &D_ENCRYPT($R,$L,($i-1)*2,"ebp","des_SPtrans","ecx","edx","eax","ebx"); | 114 | &D_ENCRYPT($R,$L,($i-1)*2,"ebp","DES_SPtrans","ecx","edx","eax","ebx"); |
115 | } | 115 | } |
116 | 116 | ||
117 | &set_label("end"); | 117 | &set_label("end"); |
diff --git a/src/lib/libcrypto/des/asm/readme b/src/lib/libcrypto/des/asm/readme index f8529d9307..1beafe253b 100644 --- a/src/lib/libcrypto/des/asm/readme +++ b/src/lib/libcrypto/des/asm/readme | |||
@@ -8,7 +8,7 @@ assembler for the inner DES routines in libdes :-). | |||
8 | 8 | ||
9 | The file to implement in assembler is des_enc.c. Replace the following | 9 | The file to implement in assembler is des_enc.c. Replace the following |
10 | 4 functions | 10 | 4 functions |
11 | des_encrypt(DES_LONG data[2],des_key_schedule ks, int encrypt); | 11 | des_encrypt1(DES_LONG data[2],des_key_schedule ks, int encrypt); |
12 | des_encrypt2(DES_LONG data[2],des_key_schedule ks, int encrypt); | 12 | des_encrypt2(DES_LONG data[2],des_key_schedule ks, int encrypt); |
13 | des_encrypt3(DES_LONG data[2],des_key_schedule ks1,ks2,ks3); | 13 | des_encrypt3(DES_LONG data[2],des_key_schedule ks1,ks2,ks3); |
14 | des_decrypt3(DES_LONG data[2],des_key_schedule ks1,ks2,ks3); | 14 | des_decrypt3(DES_LONG data[2],des_key_schedule ks1,ks2,ks3); |
diff --git a/src/lib/libcrypto/des/cbc3_enc.c b/src/lib/libcrypto/des/cbc3_enc.c index 92a78b05d6..b5db4e14f7 100644 --- a/src/lib/libcrypto/des/cbc3_enc.c +++ b/src/lib/libcrypto/des/cbc3_enc.c | |||
@@ -58,42 +58,42 @@ | |||
58 | 58 | ||
59 | #include "des_locl.h" | 59 | #include "des_locl.h" |
60 | 60 | ||
61 | /* HAS BUGS? DON'T USE - this is only present for use in des.c */ | 61 | /* HAS BUGS! DON'T USE - this is only present for use in des.c */ |
62 | void des_3cbc_encrypt(input, output, length, ks1, ks2, iv1, iv2, enc) | 62 | void DES_3cbc_encrypt(DES_cblock *input, DES_cblock *output, long length, |
63 | des_cblock (*input); | 63 | DES_key_schedule ks1, DES_key_schedule ks2, DES_cblock *iv1, |
64 | des_cblock (*output); | 64 | DES_cblock *iv2, int enc) |
65 | long length; | ||
66 | des_key_schedule ks1; | ||
67 | des_key_schedule ks2; | ||
68 | des_cblock (*iv1); | ||
69 | des_cblock (*iv2); | ||
70 | int enc; | ||
71 | { | 65 | { |
72 | int off=((int)length-1)/8; | 66 | int off=((int)length-1)/8; |
73 | long l8=((length+7)/8)*8; | 67 | long l8=((length+7)/8)*8; |
74 | des_cblock niv1,niv2; | 68 | DES_cblock niv1,niv2; |
75 | 69 | ||
76 | if (enc == DES_ENCRYPT) | 70 | if (enc == DES_ENCRYPT) |
77 | { | 71 | { |
78 | des_cbc_encrypt(input,output,length,ks1,iv1,enc); | 72 | DES_cbc_encrypt((unsigned char*)input, |
79 | if (length >= sizeof(des_cblock)) | 73 | (unsigned char*)output,length,&ks1,iv1,enc); |
80 | memcpy(niv1,output[off],sizeof(des_cblock)); | 74 | if (length >= sizeof(DES_cblock)) |
81 | des_cbc_encrypt(output,output,l8,ks2,iv1,!enc); | 75 | memcpy(niv1,output[off],sizeof(DES_cblock)); |
82 | des_cbc_encrypt(output,output,l8,ks1,iv2, enc); | 76 | DES_cbc_encrypt((unsigned char*)output, |
83 | if (length >= sizeof(des_cblock)) | 77 | (unsigned char*)output,l8,&ks2,iv1,!enc); |
84 | memcpy(niv2,output[off],sizeof(des_cblock)); | 78 | DES_cbc_encrypt((unsigned char*)output, |
79 | (unsigned char*)output,l8,&ks1,iv2,enc); | ||
80 | if (length >= sizeof(DES_cblock)) | ||
81 | memcpy(niv2,output[off],sizeof(DES_cblock)); | ||
85 | } | 82 | } |
86 | else | 83 | else |
87 | { | 84 | { |
88 | if (length >= sizeof(des_cblock)) | 85 | if (length >= sizeof(DES_cblock)) |
89 | memcpy(niv2,input[off],sizeof(des_cblock)); | 86 | memcpy(niv2,input[off],sizeof(DES_cblock)); |
90 | des_cbc_encrypt(input,output,l8,ks1,iv2,enc); | 87 | DES_cbc_encrypt((unsigned char*)input, |
91 | des_cbc_encrypt(output,output,l8,ks2,iv1,!enc); | 88 | (unsigned char*)output,l8,&ks1,iv2,enc); |
92 | if (length >= sizeof(des_cblock)) | 89 | DES_cbc_encrypt((unsigned char*)output, |
93 | memcpy(niv1,output[off],sizeof(des_cblock)); | 90 | (unsigned char*)output,l8,&ks2,iv1,!enc); |
94 | des_cbc_encrypt(output,output,length,ks1,iv1, enc); | 91 | if (length >= sizeof(DES_cblock)) |
92 | memcpy(niv1,output[off],sizeof(DES_cblock)); | ||
93 | DES_cbc_encrypt((unsigned char*)output, | ||
94 | (unsigned char*)output,length,&ks1,iv1,enc); | ||
95 | } | 95 | } |
96 | memcpy(*iv1,niv1,sizeof(des_cblock)); | 96 | memcpy(*iv1,niv1,sizeof(DES_cblock)); |
97 | memcpy(*iv2,niv2,sizeof(des_cblock)); | 97 | memcpy(*iv2,niv2,sizeof(DES_cblock)); |
98 | } | 98 | } |
99 | 99 | ||
diff --git a/src/lib/libcrypto/des/des-lib.com b/src/lib/libcrypto/des/des-lib.com index 2aea7a0dea..fc2c35a1ce 100644 --- a/src/lib/libcrypto/des/des-lib.com +++ b/src/lib/libcrypto/des/des-lib.com | |||
@@ -846,8 +846,8 @@ $ ENDIF | |||
846 | $! | 846 | $! |
847 | $! Set Up Initial CC Definitions, Possibly With User Ones | 847 | $! Set Up Initial CC Definitions, Possibly With User Ones |
848 | $! | 848 | $! |
849 | $ CCDEFS = "VMS=1" | 849 | $ CCDEFS = "" |
850 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 850 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = USER_CCDEFS |
851 | $ CCEXTRAFLAGS = "" | 851 | $ CCEXTRAFLAGS = "" |
852 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 852 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
853 | $ CCDISABLEWARNINGS = "" | 853 | $ CCDISABLEWARNINGS = "" |
diff --git a/src/lib/libcrypto/des/des.c b/src/lib/libcrypto/des/des.c index c1e5005474..d8c846b23d 100644 --- a/src/lib/libcrypto/des/des.c +++ b/src/lib/libcrypto/des/des.c | |||
@@ -58,17 +58,26 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #ifndef MSDOS | 61 | #include <string.h> |
62 | #include <openssl/opensslconf.h> | ||
63 | #ifndef OPENSSL_SYS_MSDOS | ||
64 | #ifndef OPENSSL_SYS_VMS | ||
65 | #include OPENSSL_UNISTD | ||
66 | #else /* OPENSSL_SYS_VMS */ | ||
67 | #ifdef __DECC | ||
62 | #include <unistd.h> | 68 | #include <unistd.h> |
63 | #else | 69 | #else /* not __DECC */ |
70 | #include <math.h> | ||
71 | #endif /* __DECC */ | ||
72 | #endif /* OPENSSL_SYS_VMS */ | ||
73 | #else /* OPENSSL_SYS_MSDOS */ | ||
64 | #include <io.h> | 74 | #include <io.h> |
65 | #define RAND | ||
66 | #endif | 75 | #endif |
67 | 76 | ||
68 | #include <time.h> | 77 | #include <time.h> |
69 | #include "des_ver.h" | 78 | #include "des_ver.h" |
70 | 79 | ||
71 | #ifdef VMS | 80 | #ifdef OPENSSL_SYS_VMS |
72 | #include <types.h> | 81 | #include <types.h> |
73 | #include <stat.h> | 82 | #include <stat.h> |
74 | #else | 83 | #else |
@@ -77,21 +86,10 @@ | |||
77 | #endif | 86 | #endif |
78 | #include <sys/stat.h> | 87 | #include <sys/stat.h> |
79 | #endif | 88 | #endif |
80 | #if defined(NOCONST) | 89 | #include <openssl/des.h> |
81 | #define const | 90 | #include <openssl/rand.h> |
82 | #endif | 91 | #include <openssl/ui_compat.h> |
83 | #include "des.h" | ||
84 | |||
85 | #if defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS) | ||
86 | #include <string.h> | ||
87 | #endif | ||
88 | 92 | ||
89 | #ifdef RAND | ||
90 | #define random rand | ||
91 | #define srandom(s) srand(s) | ||
92 | #endif | ||
93 | |||
94 | #ifndef NOPROTO | ||
95 | void usage(void); | 93 | void usage(void); |
96 | void doencryption(void); | 94 | void doencryption(void); |
97 | int uufwrite(unsigned char *data, int size, unsigned int num, FILE *fp); | 95 | int uufwrite(unsigned char *data, int size, unsigned int num, FILE *fp); |
@@ -99,21 +97,10 @@ void uufwriteEnd(FILE *fp); | |||
99 | int uufread(unsigned char *out,int size,unsigned int num,FILE *fp); | 97 | int uufread(unsigned char *out,int size,unsigned int num,FILE *fp); |
100 | int uuencode(unsigned char *in,int num,unsigned char *out); | 98 | int uuencode(unsigned char *in,int num,unsigned char *out); |
101 | int uudecode(unsigned char *in,int num,unsigned char *out); | 99 | int uudecode(unsigned char *in,int num,unsigned char *out); |
102 | void des_3cbc_encrypt(des_cblock *input,des_cblock *output,long length, | 100 | void DES_3cbc_encrypt(DES_cblock *input,DES_cblock *output,long length, |
103 | des_key_schedule sk1,des_key_schedule sk2, | 101 | DES_key_schedule sk1,DES_key_schedule sk2, |
104 | des_cblock *ivec1,des_cblock *ivec2,int enc); | 102 | DES_cblock *ivec1,DES_cblock *ivec2,int enc); |
105 | #else | 103 | #ifdef OPENSSL_SYS_VMS |
106 | void usage(); | ||
107 | void doencryption(); | ||
108 | int uufwrite(); | ||
109 | void uufwriteEnd(); | ||
110 | int uufread(); | ||
111 | int uuencode(); | ||
112 | int uudecode(); | ||
113 | void des_3cbc_encrypt(); | ||
114 | #endif | ||
115 | |||
116 | #ifdef VMS | ||
117 | #define EXIT(a) exit(a&0x10000000L) | 104 | #define EXIT(a) exit(a&0x10000000L) |
118 | #else | 105 | #else |
119 | #define EXIT(a) exit(a) | 106 | #define EXIT(a) exit(a) |
@@ -133,14 +120,12 @@ int uubufnum=0; | |||
133 | #define OUTUUBUF (65*100) | 120 | #define OUTUUBUF (65*100) |
134 | unsigned char b[OUTUUBUF]; | 121 | unsigned char b[OUTUUBUF]; |
135 | unsigned char bb[300]; | 122 | unsigned char bb[300]; |
136 | des_cblock cksum={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; | 123 | DES_cblock cksum={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; |
137 | char cksumname[200]=""; | 124 | char cksumname[200]=""; |
138 | 125 | ||
139 | int vflag,cflag,eflag,dflag,kflag,bflag,fflag,sflag,uflag,flag3,hflag,error; | 126 | int vflag,cflag,eflag,dflag,kflag,bflag,fflag,sflag,uflag,flag3,hflag,error; |
140 | 127 | ||
141 | int main(argc, argv) | 128 | int main(int argc, char **argv) |
142 | int argc; | ||
143 | char **argv; | ||
144 | { | 129 | { |
145 | int i; | 130 | int i; |
146 | struct stat ins,outs; | 131 | struct stat ins,outs; |
@@ -168,12 +153,14 @@ char **argv; | |||
168 | case 'c': | 153 | case 'c': |
169 | cflag=1; | 154 | cflag=1; |
170 | strncpy(cksumname,p,200); | 155 | strncpy(cksumname,p,200); |
156 | cksumname[sizeof(cksumname)-1]='\0'; | ||
171 | p+=strlen(cksumname); | 157 | p+=strlen(cksumname); |
172 | break; | 158 | break; |
173 | case 'C': | 159 | case 'C': |
174 | cflag=1; | 160 | cflag=1; |
175 | longk=1; | 161 | longk=1; |
176 | strncpy(cksumname,p,200); | 162 | strncpy(cksumname,p,200); |
163 | cksumname[sizeof(cksumname)-1]='\0'; | ||
177 | p+=strlen(cksumname); | 164 | p+=strlen(cksumname); |
178 | break; | 165 | break; |
179 | case 'e': | 166 | case 'e': |
@@ -205,6 +192,7 @@ char **argv; | |||
205 | case 'u': | 192 | case 'u': |
206 | uflag=1; | 193 | uflag=1; |
207 | strncpy(uuname,p,200); | 194 | strncpy(uuname,p,200); |
195 | uuname[sizeof(uuname)-1]='\0'; | ||
208 | p+=strlen(uuname); | 196 | p+=strlen(uuname); |
209 | break; | 197 | break; |
210 | case 'h': | 198 | case 'h': |
@@ -274,12 +262,12 @@ char **argv; | |||
274 | #endif | 262 | #endif |
275 | if ( (in != NULL) && | 263 | if ( (in != NULL) && |
276 | (out != NULL) && | 264 | (out != NULL) && |
277 | #ifndef MSDOS | 265 | #ifndef OPENSSL_SYS_MSDOS |
278 | (stat(in,&ins) != -1) && | 266 | (stat(in,&ins) != -1) && |
279 | (stat(out,&outs) != -1) && | 267 | (stat(out,&outs) != -1) && |
280 | (ins.st_dev == outs.st_dev) && | 268 | (ins.st_dev == outs.st_dev) && |
281 | (ins.st_ino == outs.st_ino)) | 269 | (ins.st_ino == outs.st_ino)) |
282 | #else /* MSDOS */ | 270 | #else /* OPENSSL_SYS_MSDOS */ |
283 | (strcmp(in,out) == 0)) | 271 | (strcmp(in,out) == 0)) |
284 | #endif | 272 | #endif |
285 | { | 273 | { |
@@ -314,7 +302,7 @@ char **argv; | |||
314 | EXIT(5); | 302 | EXIT(5); |
315 | } | 303 | } |
316 | 304 | ||
317 | #ifdef MSDOS | 305 | #ifdef OPENSSL_SYS_MSDOS |
318 | /* This should set the file to binary mode. */ | 306 | /* This should set the file to binary mode. */ |
319 | { | 307 | { |
320 | #include <fcntl.h> | 308 | #include <fcntl.h> |
@@ -331,33 +319,33 @@ char **argv; | |||
331 | EXIT(0); | 319 | EXIT(0); |
332 | } | 320 | } |
333 | 321 | ||
334 | void usage() | 322 | void usage(void) |
335 | { | 323 | { |
336 | char **u; | 324 | char **u; |
337 | static const char *Usage[]={ | 325 | static const char *Usage[]={ |
338 | "des <options> [input-file [output-file]]", | 326 | "des <options> [input-file [output-file]]", |
339 | "options:", | 327 | "options:", |
340 | "-v : des(1) version number", | 328 | "-v : des(1) version number", |
341 | "-e : encrypt using sunOS compatible user key to DES key conversion.", | 329 | "-e : encrypt using SunOS compatible user key to DES key conversion.", |
342 | "-E : encrypt ", | 330 | "-E : encrypt ", |
343 | "-d : decrypt using sunOS compatible user key to DES key conversion.", | 331 | "-d : decrypt using SunOS compatible user key to DES key conversion.", |
344 | "-D : decrypt ", | 332 | "-D : decrypt ", |
345 | "-c[ckname] : generate a cbc_cksum using sunOS compatible user key to", | 333 | "-c[ckname] : generate a cbc_cksum using SunOS compatible user key to", |
346 | " DES key conversion and output to ckname (stdout default,", | 334 | " DES key conversion and output to ckname (stdout default,", |
347 | " stderr if data being output on stdout). The checksum is", | 335 | " stderr if data being output on stdout). The checksum is", |
348 | " generated before encryption and after decryption if used", | 336 | " generated before encryption and after decryption if used", |
349 | " in conjunction with -[eEdD].", | 337 | " in conjunction with -[eEdD].", |
350 | "-C[ckname] : generate a cbc_cksum as for -c but compatible with -[ED].", | 338 | "-C[ckname] : generate a cbc_cksum as for -c but compatible with -[ED].", |
351 | "-k key : use key 'key'", | 339 | "-k key : use key 'key'", |
352 | "-h : the key that is entered will be a hexidecimal number", | 340 | "-h : the key that is entered will be a hexadecimal number", |
353 | " that is used directly as the des key", | 341 | " that is used directly as the des key", |
354 | "-u[uuname] : input file is uudecoded if -[dD] or output uuencoded data if -[eE]", | 342 | "-u[uuname] : input file is uudecoded if -[dD] or output uuencoded data if -[eE]", |
355 | " (uuname is the filename to put in the uuencode header).", | 343 | " (uuname is the filename to put in the uuencode header).", |
356 | "-b : encrypt using DES in ecb encryption mode, the defaut is cbc mode.", | 344 | "-b : encrypt using DES in ecb encryption mode, the default is cbc mode.", |
357 | "-3 : encrypt using tripple DES encryption. This uses 2 keys", | 345 | "-3 : encrypt using triple DES encryption. This uses 2 keys", |
358 | " generated from the input key. If the input key is less", | 346 | " generated from the input key. If the input key is less", |
359 | " than 8 characters long, this is equivelent to normal", | 347 | " than 8 characters long, this is equivalent to normal", |
360 | " encryption. Default is tripple cbc, -b makes it tripple ecb.", | 348 | " encryption. Default is triple cbc, -b makes it triple ecb.", |
361 | NULL | 349 | NULL |
362 | }; | 350 | }; |
363 | for (u=(char **)Usage; *u; u++) | 351 | for (u=(char **)Usage; *u; u++) |
@@ -369,31 +357,29 @@ NULL | |||
369 | EXIT(1); | 357 | EXIT(1); |
370 | } | 358 | } |
371 | 359 | ||
372 | void doencryption() | 360 | void doencryption(void) |
373 | { | 361 | { |
374 | #ifdef _LIBC | 362 | #ifdef _LIBC |
375 | extern int srandom(); | ||
376 | extern int random(); | ||
377 | extern unsigned long time(); | 363 | extern unsigned long time(); |
378 | #endif | 364 | #endif |
379 | 365 | ||
380 | register int i; | 366 | register int i; |
381 | des_key_schedule ks,ks2; | 367 | DES_key_schedule ks,ks2; |
382 | unsigned char iv[8],iv2[8]; | 368 | DES_cblock iv,iv2; |
383 | char *p; | 369 | char *p; |
384 | int num=0,j,k,l,rem,ll,len,last,ex=0; | 370 | int num=0,j,k,l,rem,ll,len,last,ex=0; |
385 | des_cblock kk,k2; | 371 | DES_cblock kk,k2; |
386 | FILE *O; | 372 | FILE *O; |
387 | int Exit=0; | 373 | int Exit=0; |
388 | #ifndef MSDOS | 374 | #ifndef OPENSSL_SYS_MSDOS |
389 | static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8]; | 375 | static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8]; |
390 | #else | 376 | #else |
391 | static unsigned char *buf=NULL,*obuf=NULL; | 377 | static unsigned char *buf=NULL,*obuf=NULL; |
392 | 378 | ||
393 | if (buf == NULL) | 379 | if (buf == NULL) |
394 | { | 380 | { |
395 | if ( (( buf=(unsigned char *)Malloc(BUFSIZE+8)) == NULL) || | 381 | if ( (( buf=OPENSSL_malloc(BUFSIZE+8)) == NULL) || |
396 | ((obuf=(unsigned char *)Malloc(BUFSIZE+8)) == NULL)) | 382 | ((obuf=OPENSSL_malloc(BUFSIZE+8)) == NULL)) |
397 | { | 383 | { |
398 | fputs("Not enough memory\n",stderr); | 384 | fputs("Not enough memory\n",stderr); |
399 | Exit=10; | 385 | Exit=10; |
@@ -440,19 +426,19 @@ void doencryption() | |||
440 | else | 426 | else |
441 | k2[i-8]=k; | 427 | k2[i-8]=k; |
442 | } | 428 | } |
443 | des_set_key((C_Block *)k2,ks2); | 429 | DES_set_key_unchecked(&k2,&ks2); |
444 | memset(k2,0,sizeof(k2)); | 430 | memset(k2,0,sizeof(k2)); |
445 | } | 431 | } |
446 | else if (longk || flag3) | 432 | else if (longk || flag3) |
447 | { | 433 | { |
448 | if (flag3) | 434 | if (flag3) |
449 | { | 435 | { |
450 | des_string_to_2keys(key,(C_Block *)kk,(C_Block *)k2); | 436 | DES_string_to_2keys(key,&kk,&k2); |
451 | des_set_key((C_Block *)k2,ks2); | 437 | DES_set_key_unchecked(&k2,&ks2); |
452 | memset(k2,0,sizeof(k2)); | 438 | memset(k2,0,sizeof(k2)); |
453 | } | 439 | } |
454 | else | 440 | else |
455 | des_string_to_key(key,(C_Block *)kk); | 441 | DES_string_to_key(key,&kk); |
456 | } | 442 | } |
457 | else | 443 | else |
458 | for (i=0; i<KEYSIZ; i++) | 444 | for (i=0; i<KEYSIZ; i++) |
@@ -470,7 +456,7 @@ void doencryption() | |||
470 | kk[i]=key[i]|0x80; | 456 | kk[i]=key[i]|0x80; |
471 | } | 457 | } |
472 | 458 | ||
473 | des_set_key((C_Block *)kk,ks); | 459 | DES_set_key_unchecked(&kk,&ks); |
474 | memset(key,0,sizeof(key)); | 460 | memset(key,0,sizeof(key)); |
475 | memset(kk,0,sizeof(kk)); | 461 | memset(kk,0,sizeof(kk)); |
476 | /* woops - A bug that does not showup under unix :-( */ | 462 | /* woops - A bug that does not showup under unix :-( */ |
@@ -498,9 +484,8 @@ void doencryption() | |||
498 | len=l-rem; | 484 | len=l-rem; |
499 | if (feof(DES_IN)) | 485 | if (feof(DES_IN)) |
500 | { | 486 | { |
501 | srandom((unsigned int)time(NULL)); | ||
502 | for (i=7-rem; i>0; i--) | 487 | for (i=7-rem; i>0; i--) |
503 | buf[l++]=random()&0xff; | 488 | RAND_pseudo_bytes(buf + l++, 1); |
504 | buf[l++]=rem; | 489 | buf[l++]=rem; |
505 | ex=1; | 490 | ex=1; |
506 | len+=rem; | 491 | len+=rem; |
@@ -510,8 +495,8 @@ void doencryption() | |||
510 | 495 | ||
511 | if (cflag) | 496 | if (cflag) |
512 | { | 497 | { |
513 | des_cbc_cksum((C_Block *)buf,(C_Block *)cksum, | 498 | DES_cbc_cksum(buf,&cksum, |
514 | (long)len,ks,(C_Block *)cksum); | 499 | (long)len,&ks,&cksum); |
515 | if (!eflag) | 500 | if (!eflag) |
516 | { | 501 | { |
517 | if (feof(DES_IN)) break; | 502 | if (feof(DES_IN)) break; |
@@ -521,34 +506,34 @@ void doencryption() | |||
521 | 506 | ||
522 | if (bflag && !flag3) | 507 | if (bflag && !flag3) |
523 | for (i=0; i<l; i+=8) | 508 | for (i=0; i<l; i+=8) |
524 | des_ecb_encrypt( | 509 | DES_ecb_encrypt( |
525 | (des_cblock *)&(buf[i]), | 510 | (DES_cblock *)&(buf[i]), |
526 | (des_cblock *)&(obuf[i]), | 511 | (DES_cblock *)&(obuf[i]), |
527 | ks,do_encrypt); | 512 | &ks,do_encrypt); |
528 | else if (flag3 && bflag) | 513 | else if (flag3 && bflag) |
529 | for (i=0; i<l; i+=8) | 514 | for (i=0; i<l; i+=8) |
530 | des_ecb2_encrypt( | 515 | DES_ecb2_encrypt( |
531 | (des_cblock *)&(buf[i]), | 516 | (DES_cblock *)&(buf[i]), |
532 | (des_cblock *)&(obuf[i]), | 517 | (DES_cblock *)&(obuf[i]), |
533 | ks,ks2,do_encrypt); | 518 | &ks,&ks2,do_encrypt); |
534 | else if (flag3 && !bflag) | 519 | else if (flag3 && !bflag) |
535 | { | 520 | { |
536 | char tmpbuf[8]; | 521 | char tmpbuf[8]; |
537 | 522 | ||
538 | if (rem) memcpy(tmpbuf,&(buf[l]), | 523 | if (rem) memcpy(tmpbuf,&(buf[l]), |
539 | (unsigned int)rem); | 524 | (unsigned int)rem); |
540 | des_3cbc_encrypt( | 525 | DES_3cbc_encrypt( |
541 | (des_cblock *)buf,(des_cblock *)obuf, | 526 | (DES_cblock *)buf,(DES_cblock *)obuf, |
542 | (long)l,ks,ks2,(des_cblock *)iv, | 527 | (long)l,ks,ks2,&iv, |
543 | (des_cblock *)iv2,do_encrypt); | 528 | &iv2,do_encrypt); |
544 | if (rem) memcpy(&(buf[l]),tmpbuf, | 529 | if (rem) memcpy(&(buf[l]),tmpbuf, |
545 | (unsigned int)rem); | 530 | (unsigned int)rem); |
546 | } | 531 | } |
547 | else | 532 | else |
548 | { | 533 | { |
549 | des_cbc_encrypt( | 534 | DES_cbc_encrypt( |
550 | (des_cblock *)buf,(des_cblock *)obuf, | 535 | buf,obuf, |
551 | (long)l,ks,(des_cblock *)iv,do_encrypt); | 536 | (long)l,&ks,&iv,do_encrypt); |
552 | if (l >= 8) memcpy(iv,&(obuf[l-8]),8); | 537 | if (l >= 8) memcpy(iv,&(obuf[l-8]),8); |
553 | } | 538 | } |
554 | if (rem) memcpy(buf,&(buf[l]),(unsigned int)rem); | 539 | if (rem) memcpy(buf,&(buf[l]),(unsigned int)rem); |
@@ -600,28 +585,28 @@ void doencryption() | |||
600 | 585 | ||
601 | if (bflag && !flag3) | 586 | if (bflag && !flag3) |
602 | for (i=0; i<l; i+=8) | 587 | for (i=0; i<l; i+=8) |
603 | des_ecb_encrypt( | 588 | DES_ecb_encrypt( |
604 | (des_cblock *)&(buf[i]), | 589 | (DES_cblock *)&(buf[i]), |
605 | (des_cblock *)&(obuf[i]), | 590 | (DES_cblock *)&(obuf[i]), |
606 | ks,do_encrypt); | 591 | &ks,do_encrypt); |
607 | else if (flag3 && bflag) | 592 | else if (flag3 && bflag) |
608 | for (i=0; i<l; i+=8) | 593 | for (i=0; i<l; i+=8) |
609 | des_ecb2_encrypt( | 594 | DES_ecb2_encrypt( |
610 | (des_cblock *)&(buf[i]), | 595 | (DES_cblock *)&(buf[i]), |
611 | (des_cblock *)&(obuf[i]), | 596 | (DES_cblock *)&(obuf[i]), |
612 | ks,ks2,do_encrypt); | 597 | &ks,&ks2,do_encrypt); |
613 | else if (flag3 && !bflag) | 598 | else if (flag3 && !bflag) |
614 | { | 599 | { |
615 | des_3cbc_encrypt( | 600 | DES_3cbc_encrypt( |
616 | (des_cblock *)buf,(des_cblock *)obuf, | 601 | (DES_cblock *)buf,(DES_cblock *)obuf, |
617 | (long)l,ks,ks2,(des_cblock *)iv, | 602 | (long)l,ks,ks2,&iv, |
618 | (des_cblock *)iv2,do_encrypt); | 603 | &iv2,do_encrypt); |
619 | } | 604 | } |
620 | else | 605 | else |
621 | { | 606 | { |
622 | des_cbc_encrypt( | 607 | DES_cbc_encrypt( |
623 | (des_cblock *)buf,(des_cblock *)obuf, | 608 | buf,obuf, |
624 | (long)l,ks,(des_cblock *)iv,do_encrypt); | 609 | (long)l,&ks,&iv,do_encrypt); |
625 | if (l >= 8) memcpy(iv,&(buf[l-8]),8); | 610 | if (l >= 8) memcpy(iv,&(buf[l-8]),8); |
626 | } | 611 | } |
627 | 612 | ||
@@ -646,9 +631,9 @@ void doencryption() | |||
646 | l=l-8+last; | 631 | l=l-8+last; |
647 | } | 632 | } |
648 | i=0; | 633 | i=0; |
649 | if (cflag) des_cbc_cksum((C_Block *)obuf, | 634 | if (cflag) DES_cbc_cksum(obuf, |
650 | (C_Block *)cksum,(long)l/8*8,ks, | 635 | (DES_cblock *)cksum,(long)l/8*8,&ks, |
651 | (C_Block *)cksum); | 636 | (DES_cblock *)cksum); |
652 | while (i != l) | 637 | while (i != l) |
653 | { | 638 | { |
654 | j=fwrite(obuf,1,(unsigned int)l-i,DES_OUT); | 639 | j=fwrite(obuf,1,(unsigned int)l-i,DES_OUT); |
@@ -683,8 +668,8 @@ void doencryption() | |||
683 | problems: | 668 | problems: |
684 | memset(buf,0,sizeof(buf)); | 669 | memset(buf,0,sizeof(buf)); |
685 | memset(obuf,0,sizeof(obuf)); | 670 | memset(obuf,0,sizeof(obuf)); |
686 | memset(ks,0,sizeof(ks)); | 671 | memset(&ks,0,sizeof(ks)); |
687 | memset(ks2,0,sizeof(ks2)); | 672 | memset(&ks2,0,sizeof(ks2)); |
688 | memset(iv,0,sizeof(iv)); | 673 | memset(iv,0,sizeof(iv)); |
689 | memset(iv2,0,sizeof(iv2)); | 674 | memset(iv2,0,sizeof(iv2)); |
690 | memset(kk,0,sizeof(kk)); | 675 | memset(kk,0,sizeof(kk)); |
@@ -696,15 +681,8 @@ problems: | |||
696 | if (Exit) EXIT(Exit); | 681 | if (Exit) EXIT(Exit); |
697 | } | 682 | } |
698 | 683 | ||
699 | int uufwrite(data, size, num, fp) | 684 | /* We ignore this parameter but it should be > ~50 I believe */ |
700 | unsigned char *data; | 685 | int uufwrite(unsigned char *data, int size, unsigned int num, FILE *fp) |
701 | int size; | ||
702 | unsigned int num; | ||
703 | FILE *fp; | ||
704 | |||
705 | /* We ignore this parameter but it should be > ~50 I believe */ | ||
706 | |||
707 | |||
708 | { | 686 | { |
709 | int i,j,left,rem,ret=num; | 687 | int i,j,left,rem,ret=num; |
710 | static int start=1; | 688 | static int start=1; |
@@ -757,8 +735,7 @@ FILE *fp; | |||
757 | return(ret); | 735 | return(ret); |
758 | } | 736 | } |
759 | 737 | ||
760 | void uufwriteEnd(fp) | 738 | void uufwriteEnd(FILE *fp) |
761 | FILE *fp; | ||
762 | { | 739 | { |
763 | int j; | 740 | int j; |
764 | static const char *end=" \nend\n"; | 741 | static const char *end=" \nend\n"; |
@@ -774,11 +751,8 @@ FILE *fp; | |||
774 | fwrite(end,1,strlen(end),fp); | 751 | fwrite(end,1,strlen(end),fp); |
775 | } | 752 | } |
776 | 753 | ||
777 | int uufread(out, size, num, fp) | 754 | /* int size: should always be > ~ 60; I actually ignore this parameter :-) */ |
778 | unsigned char *out; | 755 | int uufread(unsigned char *out, int size, unsigned int num, FILE *fp) |
779 | int size; /* should always be > ~ 60; I actually ignore this parameter :-) */ | ||
780 | unsigned int num; | ||
781 | FILE *fp; | ||
782 | { | 756 | { |
783 | int i,j,tot; | 757 | int i,j,tot; |
784 | static int done=0; | 758 | static int done=0; |
@@ -850,10 +824,7 @@ FILE *fp; | |||
850 | *((c)++)=(unsigned char)(((l) )&0xff)) | 824 | *((c)++)=(unsigned char)(((l) )&0xff)) |
851 | 825 | ||
852 | 826 | ||
853 | int uuencode(in, num, out) | 827 | int uuencode(unsigned char *in, int num, unsigned char *out) |
854 | unsigned char *in; | ||
855 | int num; | ||
856 | unsigned char *out; | ||
857 | { | 828 | { |
858 | int j,i,n,tot=0; | 829 | int j,i,n,tot=0; |
859 | DES_LONG l; | 830 | DES_LONG l; |
@@ -883,10 +854,7 @@ unsigned char *out; | |||
883 | return(tot); | 854 | return(tot); |
884 | } | 855 | } |
885 | 856 | ||
886 | int uudecode(in, num, out) | 857 | int uudecode(unsigned char *in, int num, unsigned char *out) |
887 | unsigned char *in; | ||
888 | int num; | ||
889 | unsigned char *out; | ||
890 | { | 858 | { |
891 | int j,i,k; | 859 | int j,i,k; |
892 | unsigned int n=0,space=0; | 860 | unsigned int n=0,space=0; |
diff --git a/src/lib/libcrypto/des/des3s.cpp b/src/lib/libcrypto/des/des3s.cpp index 9aff6494d9..02d527c057 100644 --- a/src/lib/libcrypto/des/des3s.cpp +++ b/src/lib/libcrypto/des/des3s.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "des.h" | 35 | #include <openssl/des.h> |
36 | 36 | ||
37 | void main(int argc,char *argv[]) | 37 | void main(int argc,char *argv[]) |
38 | { | 38 | { |
diff --git a/src/lib/libcrypto/des/des_opts.c b/src/lib/libcrypto/des/des_opts.c index fdf0fbf461..79278b920e 100644 --- a/src/lib/libcrypto/des/des_opts.c +++ b/src/lib/libcrypto/des/des_opts.c | |||
@@ -59,19 +59,19 @@ | |||
59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. | 59 | /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. |
60 | * This is for machines with 64k code segment size restrictions. */ | 60 | * This is for machines with 64k code segment size restrictions. */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | #ifndef OPENSSL_SYS_MSDOS |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #include OPENSSL_UNISTD | ||
69 | #else | 70 | #else |
70 | #include <io.h> | 71 | #include <io.h> |
71 | extern void exit(); | 72 | extern void exit(); |
72 | #endif | 73 | #endif |
73 | #include <signal.h> | 74 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 75 | #ifndef _IRIX |
76 | #include <time.h> | 76 | #include <time.h> |
77 | #endif | 77 | #endif |
@@ -79,25 +79,27 @@ extern void exit(); | |||
79 | #include <sys/types.h> | 79 | #include <sys/types.h> |
80 | #include <sys/times.h> | 80 | #include <sys/times.h> |
81 | #endif | 81 | #endif |
82 | #else /* VMS */ | 82 | |
83 | #include <types.h> | 83 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 84 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 85 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 86 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 87 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 88 | #undef TIMES |
89 | } | ||
90 | #endif | 89 | #endif |
90 | |||
91 | #ifndef TIMES | 91 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 92 | #include <sys/timeb.h> |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef sun | 95 | |
96 | #if defined(sun) || defined(__ultrix) | ||
97 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 98 | #include <limits.h> |
97 | #include <sys/param.h> | 99 | #include <sys/param.h> |
98 | #endif | 100 | #endif |
99 | 101 | ||
100 | #include "des.h" | 102 | #include <openssl/des.h> |
101 | #include "spr.h" | 103 | #include "spr.h" |
102 | 104 | ||
103 | #define DES_DEFAULT_OPTIONS | 105 | #define DES_DEFAULT_OPTIONS |
@@ -116,10 +118,10 @@ struct tms { | |||
116 | #undef DES_RISC2 | 118 | #undef DES_RISC2 |
117 | #undef DES_PTR | 119 | #undef DES_PTR |
118 | #undef D_ENCRYPT | 120 | #undef D_ENCRYPT |
119 | #define des_encrypt des_encrypt_u4_cisc_idx | 121 | #define DES_encrypt1 des_encrypt_u4_cisc_idx |
120 | #define des_encrypt2 des_encrypt2_u4_cisc_idx | 122 | #define DES_encrypt2 des_encrypt2_u4_cisc_idx |
121 | #define des_encrypt3 des_encrypt3_u4_cisc_idx | 123 | #define DES_encrypt3 des_encrypt3_u4_cisc_idx |
122 | #define des_decrypt3 des_decrypt3_u4_cisc_idx | 124 | #define DES_decrypt3 des_decrypt3_u4_cisc_idx |
123 | #undef HEADER_DES_LOCL_H | 125 | #undef HEADER_DES_LOCL_H |
124 | #include "des_enc.c" | 126 | #include "des_enc.c" |
125 | 127 | ||
@@ -128,14 +130,14 @@ struct tms { | |||
128 | #undef DES_RISC2 | 130 | #undef DES_RISC2 |
129 | #undef DES_PTR | 131 | #undef DES_PTR |
130 | #undef D_ENCRYPT | 132 | #undef D_ENCRYPT |
131 | #undef des_encrypt | 133 | #undef DES_encrypt1 |
132 | #undef des_encrypt2 | 134 | #undef DES_encrypt2 |
133 | #undef des_encrypt3 | 135 | #undef DES_encrypt3 |
134 | #undef des_decrypt3 | 136 | #undef DES_decrypt3 |
135 | #define des_encrypt des_encrypt_u16_cisc_idx | 137 | #define DES_encrypt1 des_encrypt_u16_cisc_idx |
136 | #define des_encrypt2 des_encrypt2_u16_cisc_idx | 138 | #define DES_encrypt2 des_encrypt2_u16_cisc_idx |
137 | #define des_encrypt3 des_encrypt3_u16_cisc_idx | 139 | #define DES_encrypt3 des_encrypt3_u16_cisc_idx |
138 | #define des_decrypt3 des_decrypt3_u16_cisc_idx | 140 | #define DES_decrypt3 des_decrypt3_u16_cisc_idx |
139 | #undef HEADER_DES_LOCL_H | 141 | #undef HEADER_DES_LOCL_H |
140 | #include "des_enc.c" | 142 | #include "des_enc.c" |
141 | 143 | ||
@@ -144,14 +146,14 @@ struct tms { | |||
144 | #undef DES_RISC2 | 146 | #undef DES_RISC2 |
145 | #undef DES_PTR | 147 | #undef DES_PTR |
146 | #undef D_ENCRYPT | 148 | #undef D_ENCRYPT |
147 | #undef des_encrypt | 149 | #undef DES_encrypt1 |
148 | #undef des_encrypt2 | 150 | #undef DES_encrypt2 |
149 | #undef des_encrypt3 | 151 | #undef DES_encrypt3 |
150 | #undef des_decrypt3 | 152 | #undef DES_decrypt3 |
151 | #define des_encrypt des_encrypt_u4_risc1_idx | 153 | #define DES_encrypt1 des_encrypt_u4_risc1_idx |
152 | #define des_encrypt2 des_encrypt2_u4_risc1_idx | 154 | #define DES_encrypt2 des_encrypt2_u4_risc1_idx |
153 | #define des_encrypt3 des_encrypt3_u4_risc1_idx | 155 | #define DES_encrypt3 des_encrypt3_u4_risc1_idx |
154 | #define des_decrypt3 des_decrypt3_u4_risc1_idx | 156 | #define DES_decrypt3 des_decrypt3_u4_risc1_idx |
155 | #undef HEADER_DES_LOCL_H | 157 | #undef HEADER_DES_LOCL_H |
156 | #include "des_enc.c" | 158 | #include "des_enc.c" |
157 | 159 | ||
@@ -164,14 +166,14 @@ struct tms { | |||
164 | #define DES_RISC2 | 166 | #define DES_RISC2 |
165 | #undef DES_PTR | 167 | #undef DES_PTR |
166 | #undef D_ENCRYPT | 168 | #undef D_ENCRYPT |
167 | #undef des_encrypt | 169 | #undef DES_encrypt1 |
168 | #undef des_encrypt2 | 170 | #undef DES_encrypt2 |
169 | #undef des_encrypt3 | 171 | #undef DES_encrypt3 |
170 | #undef des_decrypt3 | 172 | #undef DES_decrypt3 |
171 | #define des_encrypt des_encrypt_u4_risc2_idx | 173 | #define DES_encrypt1 des_encrypt_u4_risc2_idx |
172 | #define des_encrypt2 des_encrypt2_u4_risc2_idx | 174 | #define DES_encrypt2 des_encrypt2_u4_risc2_idx |
173 | #define des_encrypt3 des_encrypt3_u4_risc2_idx | 175 | #define DES_encrypt3 des_encrypt3_u4_risc2_idx |
174 | #define des_decrypt3 des_decrypt3_u4_risc2_idx | 176 | #define DES_decrypt3 des_decrypt3_u4_risc2_idx |
175 | #undef HEADER_DES_LOCL_H | 177 | #undef HEADER_DES_LOCL_H |
176 | #include "des_enc.c" | 178 | #include "des_enc.c" |
177 | 179 | ||
@@ -180,14 +182,14 @@ struct tms { | |||
180 | #undef DES_RISC2 | 182 | #undef DES_RISC2 |
181 | #undef DES_PTR | 183 | #undef DES_PTR |
182 | #undef D_ENCRYPT | 184 | #undef D_ENCRYPT |
183 | #undef des_encrypt | 185 | #undef DES_encrypt1 |
184 | #undef des_encrypt2 | 186 | #undef DES_encrypt2 |
185 | #undef des_encrypt3 | 187 | #undef DES_encrypt3 |
186 | #undef des_decrypt3 | 188 | #undef DES_decrypt3 |
187 | #define des_encrypt des_encrypt_u16_risc1_idx | 189 | #define DES_encrypt1 des_encrypt_u16_risc1_idx |
188 | #define des_encrypt2 des_encrypt2_u16_risc1_idx | 190 | #define DES_encrypt2 des_encrypt2_u16_risc1_idx |
189 | #define des_encrypt3 des_encrypt3_u16_risc1_idx | 191 | #define DES_encrypt3 des_encrypt3_u16_risc1_idx |
190 | #define des_decrypt3 des_decrypt3_u16_risc1_idx | 192 | #define DES_decrypt3 des_decrypt3_u16_risc1_idx |
191 | #undef HEADER_DES_LOCL_H | 193 | #undef HEADER_DES_LOCL_H |
192 | #include "des_enc.c" | 194 | #include "des_enc.c" |
193 | 195 | ||
@@ -196,14 +198,14 @@ struct tms { | |||
196 | #define DES_RISC2 | 198 | #define DES_RISC2 |
197 | #undef DES_PTR | 199 | #undef DES_PTR |
198 | #undef D_ENCRYPT | 200 | #undef D_ENCRYPT |
199 | #undef des_encrypt | 201 | #undef DES_encrypt1 |
200 | #undef des_encrypt2 | 202 | #undef DES_encrypt2 |
201 | #undef des_encrypt3 | 203 | #undef DES_encrypt3 |
202 | #undef des_decrypt3 | 204 | #undef DES_decrypt3 |
203 | #define des_encrypt des_encrypt_u16_risc2_idx | 205 | #define DES_encrypt1 des_encrypt_u16_risc2_idx |
204 | #define des_encrypt2 des_encrypt2_u16_risc2_idx | 206 | #define DES_encrypt2 des_encrypt2_u16_risc2_idx |
205 | #define des_encrypt3 des_encrypt3_u16_risc2_idx | 207 | #define DES_encrypt3 des_encrypt3_u16_risc2_idx |
206 | #define des_decrypt3 des_decrypt3_u16_risc2_idx | 208 | #define DES_decrypt3 des_decrypt3_u16_risc2_idx |
207 | #undef HEADER_DES_LOCL_H | 209 | #undef HEADER_DES_LOCL_H |
208 | #include "des_enc.c" | 210 | #include "des_enc.c" |
209 | 211 | ||
@@ -216,14 +218,14 @@ struct tms { | |||
216 | #undef DES_RISC2 | 218 | #undef DES_RISC2 |
217 | #define DES_PTR | 219 | #define DES_PTR |
218 | #undef D_ENCRYPT | 220 | #undef D_ENCRYPT |
219 | #undef des_encrypt | 221 | #undef DES_encrypt1 |
220 | #undef des_encrypt2 | 222 | #undef DES_encrypt2 |
221 | #undef des_encrypt3 | 223 | #undef DES_encrypt3 |
222 | #undef des_decrypt3 | 224 | #undef DES_decrypt3 |
223 | #define des_encrypt des_encrypt_u4_cisc_ptr | 225 | #define DES_encrypt1 des_encrypt_u4_cisc_ptr |
224 | #define des_encrypt2 des_encrypt2_u4_cisc_ptr | 226 | #define DES_encrypt2 des_encrypt2_u4_cisc_ptr |
225 | #define des_encrypt3 des_encrypt3_u4_cisc_ptr | 227 | #define DES_encrypt3 des_encrypt3_u4_cisc_ptr |
226 | #define des_decrypt3 des_decrypt3_u4_cisc_ptr | 228 | #define DES_decrypt3 des_decrypt3_u4_cisc_ptr |
227 | #undef HEADER_DES_LOCL_H | 229 | #undef HEADER_DES_LOCL_H |
228 | #include "des_enc.c" | 230 | #include "des_enc.c" |
229 | 231 | ||
@@ -232,14 +234,14 @@ struct tms { | |||
232 | #undef DES_RISC2 | 234 | #undef DES_RISC2 |
233 | #define DES_PTR | 235 | #define DES_PTR |
234 | #undef D_ENCRYPT | 236 | #undef D_ENCRYPT |
235 | #undef des_encrypt | 237 | #undef DES_encrypt1 |
236 | #undef des_encrypt2 | 238 | #undef DES_encrypt2 |
237 | #undef des_encrypt3 | 239 | #undef DES_encrypt3 |
238 | #undef des_decrypt3 | 240 | #undef DES_decrypt3 |
239 | #define des_encrypt des_encrypt_u16_cisc_ptr | 241 | #define DES_encrypt1 des_encrypt_u16_cisc_ptr |
240 | #define des_encrypt2 des_encrypt2_u16_cisc_ptr | 242 | #define DES_encrypt2 des_encrypt2_u16_cisc_ptr |
241 | #define des_encrypt3 des_encrypt3_u16_cisc_ptr | 243 | #define DES_encrypt3 des_encrypt3_u16_cisc_ptr |
242 | #define des_decrypt3 des_decrypt3_u16_cisc_ptr | 244 | #define DES_decrypt3 des_decrypt3_u16_cisc_ptr |
243 | #undef HEADER_DES_LOCL_H | 245 | #undef HEADER_DES_LOCL_H |
244 | #include "des_enc.c" | 246 | #include "des_enc.c" |
245 | 247 | ||
@@ -248,14 +250,14 @@ struct tms { | |||
248 | #undef DES_RISC2 | 250 | #undef DES_RISC2 |
249 | #define DES_PTR | 251 | #define DES_PTR |
250 | #undef D_ENCRYPT | 252 | #undef D_ENCRYPT |
251 | #undef des_encrypt | 253 | #undef DES_encrypt1 |
252 | #undef des_encrypt2 | 254 | #undef DES_encrypt2 |
253 | #undef des_encrypt3 | 255 | #undef DES_encrypt3 |
254 | #undef des_decrypt3 | 256 | #undef DES_decrypt3 |
255 | #define des_encrypt des_encrypt_u4_risc1_ptr | 257 | #define DES_encrypt1 des_encrypt_u4_risc1_ptr |
256 | #define des_encrypt2 des_encrypt2_u4_risc1_ptr | 258 | #define DES_encrypt2 des_encrypt2_u4_risc1_ptr |
257 | #define des_encrypt3 des_encrypt3_u4_risc1_ptr | 259 | #define DES_encrypt3 des_encrypt3_u4_risc1_ptr |
258 | #define des_decrypt3 des_decrypt3_u4_risc1_ptr | 260 | #define DES_decrypt3 des_decrypt3_u4_risc1_ptr |
259 | #undef HEADER_DES_LOCL_H | 261 | #undef HEADER_DES_LOCL_H |
260 | #include "des_enc.c" | 262 | #include "des_enc.c" |
261 | 263 | ||
@@ -268,14 +270,14 @@ struct tms { | |||
268 | #define DES_RISC2 | 270 | #define DES_RISC2 |
269 | #define DES_PTR | 271 | #define DES_PTR |
270 | #undef D_ENCRYPT | 272 | #undef D_ENCRYPT |
271 | #undef des_encrypt | 273 | #undef DES_encrypt1 |
272 | #undef des_encrypt2 | 274 | #undef DES_encrypt2 |
273 | #undef des_encrypt3 | 275 | #undef DES_encrypt3 |
274 | #undef des_decrypt3 | 276 | #undef DES_decrypt3 |
275 | #define des_encrypt des_encrypt_u4_risc2_ptr | 277 | #define DES_encrypt1 des_encrypt_u4_risc2_ptr |
276 | #define des_encrypt2 des_encrypt2_u4_risc2_ptr | 278 | #define DES_encrypt2 des_encrypt2_u4_risc2_ptr |
277 | #define des_encrypt3 des_encrypt3_u4_risc2_ptr | 279 | #define DES_encrypt3 des_encrypt3_u4_risc2_ptr |
278 | #define des_decrypt3 des_decrypt3_u4_risc2_ptr | 280 | #define DES_decrypt3 des_decrypt3_u4_risc2_ptr |
279 | #undef HEADER_DES_LOCL_H | 281 | #undef HEADER_DES_LOCL_H |
280 | #include "des_enc.c" | 282 | #include "des_enc.c" |
281 | 283 | ||
@@ -284,14 +286,14 @@ struct tms { | |||
284 | #undef DES_RISC2 | 286 | #undef DES_RISC2 |
285 | #define DES_PTR | 287 | #define DES_PTR |
286 | #undef D_ENCRYPT | 288 | #undef D_ENCRYPT |
287 | #undef des_encrypt | 289 | #undef DES_encrypt1 |
288 | #undef des_encrypt2 | 290 | #undef DES_encrypt2 |
289 | #undef des_encrypt3 | 291 | #undef DES_encrypt3 |
290 | #undef des_decrypt3 | 292 | #undef DES_decrypt3 |
291 | #define des_encrypt des_encrypt_u16_risc1_ptr | 293 | #define DES_encrypt1 des_encrypt_u16_risc1_ptr |
292 | #define des_encrypt2 des_encrypt2_u16_risc1_ptr | 294 | #define DES_encrypt2 des_encrypt2_u16_risc1_ptr |
293 | #define des_encrypt3 des_encrypt3_u16_risc1_ptr | 295 | #define DES_encrypt3 des_encrypt3_u16_risc1_ptr |
294 | #define des_decrypt3 des_decrypt3_u16_risc1_ptr | 296 | #define DES_decrypt3 des_decrypt3_u16_risc1_ptr |
295 | #undef HEADER_DES_LOCL_H | 297 | #undef HEADER_DES_LOCL_H |
296 | #include "des_enc.c" | 298 | #include "des_enc.c" |
297 | 299 | ||
@@ -300,14 +302,14 @@ struct tms { | |||
300 | #define DES_RISC2 | 302 | #define DES_RISC2 |
301 | #define DES_PTR | 303 | #define DES_PTR |
302 | #undef D_ENCRYPT | 304 | #undef D_ENCRYPT |
303 | #undef des_encrypt | 305 | #undef DES_encrypt1 |
304 | #undef des_encrypt2 | 306 | #undef DES_encrypt2 |
305 | #undef des_encrypt3 | 307 | #undef DES_encrypt3 |
306 | #undef des_decrypt3 | 308 | #undef DES_decrypt3 |
307 | #define des_encrypt des_encrypt_u16_risc2_ptr | 309 | #define DES_encrypt1 des_encrypt_u16_risc2_ptr |
308 | #define des_encrypt2 des_encrypt2_u16_risc2_ptr | 310 | #define DES_encrypt2 des_encrypt2_u16_risc2_ptr |
309 | #define des_encrypt3 des_encrypt3_u16_risc2_ptr | 311 | #define DES_encrypt3 des_encrypt3_u16_risc2_ptr |
310 | #define des_decrypt3 des_decrypt3_u16_risc2_ptr | 312 | #define DES_decrypt3 des_decrypt3_u16_risc2_ptr |
311 | #undef HEADER_DES_LOCL_H | 313 | #undef HEADER_DES_LOCL_H |
312 | #include "des_enc.c" | 314 | #include "des_enc.c" |
313 | 315 | ||
@@ -317,11 +319,7 @@ struct tms { | |||
317 | #ifndef HZ | 319 | #ifndef HZ |
318 | # ifndef CLK_TCK | 320 | # ifndef CLK_TCK |
319 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ | 321 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ |
320 | # ifndef VMS | 322 | # define HZ 100.0 |
321 | # define HZ 100.0 | ||
322 | # else /* VMS */ | ||
323 | # define HZ 100.0 | ||
324 | # endif | ||
325 | # else /* _BSD_CLK_TCK_ */ | 323 | # else /* _BSD_CLK_TCK_ */ |
326 | # define HZ ((double)_BSD_CLK_TCK_) | 324 | # define HZ ((double)_BSD_CLK_TCK_) |
327 | # endif | 325 | # endif |
@@ -333,12 +331,7 @@ struct tms { | |||
333 | #define BUFSIZE ((long)1024) | 331 | #define BUFSIZE ((long)1024) |
334 | long run=0; | 332 | long run=0; |
335 | 333 | ||
336 | #ifndef NOPROTO | ||
337 | double Time_F(int s); | 334 | double Time_F(int s); |
338 | #else | ||
339 | double Time_F(); | ||
340 | #endif | ||
341 | |||
342 | #ifdef SIGALRM | 335 | #ifdef SIGALRM |
343 | #if defined(__STDC__) || defined(sgi) | 336 | #if defined(__STDC__) || defined(sgi) |
344 | #define SIGRETTYPE void | 337 | #define SIGRETTYPE void |
@@ -346,14 +339,8 @@ double Time_F(); | |||
346 | #define SIGRETTYPE int | 339 | #define SIGRETTYPE int |
347 | #endif | 340 | #endif |
348 | 341 | ||
349 | #ifndef NOPROTO | ||
350 | SIGRETTYPE sig_done(int sig); | 342 | SIGRETTYPE sig_done(int sig); |
351 | #else | 343 | SIGRETTYPE sig_done(int sig) |
352 | SIGRETTYPE sig_done(); | ||
353 | #endif | ||
354 | |||
355 | SIGRETTYPE sig_done(sig) | ||
356 | int sig; | ||
357 | { | 344 | { |
358 | signal(SIGALRM,sig_done); | 345 | signal(SIGALRM,sig_done); |
359 | run=0; | 346 | run=0; |
@@ -366,8 +353,7 @@ int sig; | |||
366 | #define START 0 | 353 | #define START 0 |
367 | #define STOP 1 | 354 | #define STOP 1 |
368 | 355 | ||
369 | double Time_F(s) | 356 | double Time_F(int s) |
370 | int s; | ||
371 | { | 357 | { |
372 | double ret; | 358 | double ret; |
373 | #ifdef TIMES | 359 | #ifdef TIMES |
@@ -415,7 +401,7 @@ int s; | |||
415 | for (count=0,run=1; COND(cb); count++) \ | 401 | for (count=0,run=1; COND(cb); count++) \ |
416 | { \ | 402 | { \ |
417 | unsigned long d[2]; \ | 403 | unsigned long d[2]; \ |
418 | func(d,&(sch[0]),DES_ENCRYPT); \ | 404 | func(d,&sch,DES_ENCRYPT); \ |
419 | } \ | 405 | } \ |
420 | tm[index]=Time_F(STOP); \ | 406 | tm[index]=Time_F(STOP); \ |
421 | fprintf(stderr,"%ld %s's in %.2f second\n",count,name,tm[index]); \ | 407 | fprintf(stderr,"%ld %s's in %.2f second\n",count,name,tm[index]); \ |
@@ -425,16 +411,14 @@ int s; | |||
425 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ | 411 | fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ |
426 | tm[index]*8,1.0e6/tm[index]); | 412 | tm[index]*8,1.0e6/tm[index]); |
427 | 413 | ||
428 | int main(argc,argv) | 414 | int main(int argc, char **argv) |
429 | int argc; | ||
430 | char **argv; | ||
431 | { | 415 | { |
432 | long count; | 416 | long count; |
433 | static unsigned char buf[BUFSIZE]; | 417 | static unsigned char buf[BUFSIZE]; |
434 | static des_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; | 418 | static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; |
435 | static des_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; | 419 | static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; |
436 | static des_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; | 420 | static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; |
437 | des_key_schedule sch,sch2,sch3; | 421 | DES_key_schedule sch,sch2,sch3; |
438 | double d,tm[16],max=0; | 422 | double d,tm[16],max=0; |
439 | int rank[16]; | 423 | int rank[16]; |
440 | char *str[16]; | 424 | char *str[16]; |
@@ -450,17 +434,17 @@ char **argv; | |||
450 | } | 434 | } |
451 | 435 | ||
452 | #ifndef TIMES | 436 | #ifndef TIMES |
453 | fprintf(stderr,"To get the most acurate results, try to run this\n"); | 437 | fprintf(stderr,"To get the most accurate results, try to run this\n"); |
454 | fprintf(stderr,"program when this computer is idle.\n"); | 438 | fprintf(stderr,"program when this computer is idle.\n"); |
455 | #endif | 439 | #endif |
456 | 440 | ||
457 | des_set_key((C_Block *)key,sch); | 441 | DES_set_key_unchecked(&key,&sch); |
458 | des_set_key((C_Block *)key2,sch2); | 442 | DES_set_key_unchecked(&key2,&sch2); |
459 | des_set_key((C_Block *)key3,sch3); | 443 | DES_set_key_unchecked(&key3,&sch3); |
460 | 444 | ||
461 | #ifndef SIGALRM | 445 | #ifndef SIGALRM |
462 | fprintf(stderr,"First we calculate the approximate speed ...\n"); | 446 | fprintf(stderr,"First we calculate the approximate speed ...\n"); |
463 | des_set_key((C_Block *)key,sch); | 447 | DES_set_key_unchecked(&key,sch); |
464 | count=10; | 448 | count=10; |
465 | do { | 449 | do { |
466 | long i; | 450 | long i; |
@@ -469,7 +453,7 @@ char **argv; | |||
469 | count*=2; | 453 | count*=2; |
470 | Time_F(START); | 454 | Time_F(START); |
471 | for (i=count; i; i--) | 455 | for (i=count; i; i--) |
472 | des_encrypt(data,&(sch[0]),DES_ENCRYPT); | 456 | DES_encrypt1(data,&(sch[0]),DES_ENCRYPT); |
473 | d=Time_F(STOP); | 457 | d=Time_F(STOP); |
474 | } while (d < 3.0); | 458 | } while (d < 3.0); |
475 | ca=count; | 459 | ca=count; |
@@ -614,7 +598,7 @@ char **argv; | |||
614 | break; | 598 | break; |
615 | } | 599 | } |
616 | exit(0); | 600 | exit(0); |
617 | #if defined(LINT) || defined(MSDOS) | 601 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
618 | return(0); | 602 | return(0); |
619 | #endif | 603 | #endif |
620 | } | 604 | } |
diff --git a/src/lib/libcrypto/des/des_ver.h b/src/lib/libcrypto/des/des_ver.h index 7041a9271d..0fa94d5368 100644 --- a/src/lib/libcrypto/des/des_ver.h +++ b/src/lib/libcrypto/des/des_ver.h | |||
@@ -56,5 +56,12 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | extern char *DES_version; /* SSLeay version string */ | 59 | #include <openssl/e_os2.h> |
60 | extern char *libdes_version; /* old libdes version string */ | 60 | |
61 | #ifdef OPENSSL_BUILD_SHLIBCRYPTO | ||
62 | # undef OPENSSL_EXTERN | ||
63 | # define OPENSSL_EXTERN OPENSSL_EXPORT | ||
64 | #endif | ||
65 | |||
66 | OPENSSL_EXTERN char *DES_version; /* SSLeay version string */ | ||
67 | OPENSSL_EXTERN char *libdes_version; /* old libdes version string */ | ||
diff --git a/src/lib/libcrypto/des/dess.cpp b/src/lib/libcrypto/des/dess.cpp index 7fb5987314..5549bab90a 100644 --- a/src/lib/libcrypto/des/dess.cpp +++ b/src/lib/libcrypto/des/dess.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "des.h" | 35 | #include <openssl/des.h> |
36 | 36 | ||
37 | void main(int argc,char *argv[]) | 37 | void main(int argc,char *argv[]) |
38 | { | 38 | { |
@@ -45,19 +45,19 @@ void main(int argc,char *argv[]) | |||
45 | { | 45 | { |
46 | for (i=0; i<1000; i++) /**/ | 46 | for (i=0; i<1000; i++) /**/ |
47 | { | 47 | { |
48 | des_encrypt(&data[0],key,1); | 48 | des_encrypt1(&data[0],key,1); |
49 | GetTSC(s1); | 49 | GetTSC(s1); |
50 | des_encrypt(&data[0],key,1); | 50 | des_encrypt1(&data[0],key,1); |
51 | des_encrypt(&data[0],key,1); | 51 | des_encrypt1(&data[0],key,1); |
52 | des_encrypt(&data[0],key,1); | 52 | des_encrypt1(&data[0],key,1); |
53 | GetTSC(e1); | 53 | GetTSC(e1); |
54 | GetTSC(s2); | 54 | GetTSC(s2); |
55 | des_encrypt(&data[0],key,1); | 55 | des_encrypt1(&data[0],key,1); |
56 | des_encrypt(&data[0],key,1); | 56 | des_encrypt1(&data[0],key,1); |
57 | des_encrypt(&data[0],key,1); | 57 | des_encrypt1(&data[0],key,1); |
58 | des_encrypt(&data[0],key,1); | 58 | des_encrypt1(&data[0],key,1); |
59 | GetTSC(e2); | 59 | GetTSC(e2); |
60 | des_encrypt(&data[0],key,1); | 60 | des_encrypt1(&data[0],key,1); |
61 | } | 61 | } |
62 | 62 | ||
63 | printf("des %d %d (%d)\n", | 63 | printf("des %d %d (%d)\n", |
diff --git a/src/lib/libcrypto/des/destest.c b/src/lib/libcrypto/des/destest.c index 620c13ba6f..58e8c35dcb 100644 --- a/src/lib/libcrypto/des/destest.c +++ b/src/lib/libcrypto/des/destest.c | |||
@@ -56,21 +56,37 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #if defined(WIN32) || defined(WIN16) || defined(WINDOWS) | 59 | #include <stdio.h> |
60 | #ifndef MSDOS | 60 | #include <stdlib.h> |
61 | #define MSDOS | 61 | |
62 | #include <openssl/e_os2.h> | ||
63 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_WINDOWS) | ||
64 | #ifndef OPENSSL_SYS_MSDOS | ||
65 | #define OPENSSL_SYS_MSDOS | ||
62 | #endif | 66 | #endif |
63 | #endif | 67 | #endif |
64 | 68 | ||
65 | #include <stdio.h> | 69 | #ifndef OPENSSL_SYS_MSDOS |
66 | #include <stdlib.h> | 70 | #if !defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_VMS_DECC) |
67 | #ifndef MSDOS | 71 | #include OPENSSL_UNISTD |
68 | #include <unistd.h> | 72 | #endif |
69 | #else | 73 | #else |
70 | #include <io.h> | 74 | #include <io.h> |
71 | #endif | 75 | #endif |
72 | #include <string.h> | 76 | #include <string.h> |
73 | #include "des.h" | 77 | |
78 | #ifdef OPENSSL_NO_DES | ||
79 | int main(int argc, char *argv[]) | ||
80 | { | ||
81 | printf("No DES support\n"); | ||
82 | return(0); | ||
83 | } | ||
84 | #else | ||
85 | #include <openssl/des.h> | ||
86 | |||
87 | #if defined(PERL5) || defined(__FreeBSD__) || defined(NeXT) | ||
88 | #define crypt(c,s) (des_crypt((c),(s))) | ||
89 | #endif | ||
74 | 90 | ||
75 | /* tisk tisk - the test keys don't all have odd parity :-( */ | 91 | /* tisk tisk - the test keys don't all have odd parity :-( */ |
76 | /* test data */ | 92 | /* test data */ |
@@ -219,13 +235,13 @@ static unsigned char cipher_ecb2[NUM_TESTS-1][8]={ | |||
219 | {0x08,0xD7,0xB4,0xFB,0x62,0x9D,0x08,0x85}}; | 235 | {0x08,0xD7,0xB4,0xFB,0x62,0x9D,0x08,0x85}}; |
220 | 236 | ||
221 | static unsigned char cbc_key [8]={0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}; | 237 | static unsigned char cbc_key [8]={0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}; |
222 | static unsigned char cbc2_key[8]={0xf0,0xe1,0xd2,0xc3,0xb4,0xa5,0x96,0x87}; | 238 | static unsigned char cbc2_key[8]={0xf1,0xe0,0xd3,0xc2,0xb5,0xa4,0x97,0x86}; |
223 | static unsigned char cbc3_key[8]={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; | 239 | static unsigned char cbc3_key[8]={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; |
224 | static unsigned char cbc_iv [8]={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; | 240 | static unsigned char cbc_iv [8]={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; |
225 | /* Changed the following text constant to binary so it will work on ebcdic | 241 | /* Changed the following text constant to binary so it will work on ebcdic |
226 | * machines :-) */ | 242 | * machines :-) */ |
227 | /* static char cbc_data[40]="7654321 Now is the time for \0001"; */ | 243 | /* static char cbc_data[40]="7654321 Now is the time for \0001"; */ |
228 | static char cbc_data[40]={ | 244 | static unsigned char cbc_data[40]={ |
229 | 0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x20, | 245 | 0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x20, |
230 | 0x4E,0x6F,0x77,0x20,0x69,0x73,0x20,0x74, | 246 | 0x4E,0x6F,0x77,0x20,0x69,0x73,0x20,0x74, |
231 | 0x68,0x65,0x20,0x74,0x69,0x6D,0x65,0x20, | 247 | 0x68,0x65,0x20,0x74,0x69,0x6D,0x65,0x20, |
@@ -239,12 +255,24 @@ static unsigned char cbc_ok[32]={ | |||
239 | 0x46,0x8e,0x91,0x15,0x78,0x88,0xba,0x68, | 255 | 0x46,0x8e,0x91,0x15,0x78,0x88,0xba,0x68, |
240 | 0x1d,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4}; | 256 | 0x1d,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4}; |
241 | 257 | ||
258 | #ifdef SCREW_THE_PARITY | ||
259 | #error "SCREW_THE_PARITY is not ment to be defined." | ||
260 | #error "Original vectors are preserved for reference only." | ||
261 | static unsigned char cbc2_key[8]={0xf0,0xe1,0xd2,0xc3,0xb4,0xa5,0x96,0x87}; | ||
242 | static unsigned char xcbc_ok[32]={ | 262 | static unsigned char xcbc_ok[32]={ |
243 | 0x86,0x74,0x81,0x0D,0x61,0xA4,0xA5,0x48, | 263 | 0x86,0x74,0x81,0x0D,0x61,0xA4,0xA5,0x48, |
244 | 0xB9,0x93,0x03,0xE1,0xB8,0xBB,0xBD,0xBD, | 264 | 0xB9,0x93,0x03,0xE1,0xB8,0xBB,0xBD,0xBD, |
245 | 0x64,0x30,0x0B,0xB9,0x06,0x65,0x81,0x76, | 265 | 0x64,0x30,0x0B,0xB9,0x06,0x65,0x81,0x76, |
246 | 0x04,0x1D,0x77,0x62,0x17,0xCA,0x2B,0xD2, | 266 | 0x04,0x1D,0x77,0x62,0x17,0xCA,0x2B,0xD2, |
247 | }; | 267 | }; |
268 | #else | ||
269 | static unsigned char xcbc_ok[32]={ | ||
270 | 0x84,0x6B,0x29,0x14,0x85,0x1E,0x9A,0x29, | ||
271 | 0x54,0x73,0x2F,0x8A,0xA0,0xA6,0x11,0xC1, | ||
272 | 0x15,0xCD,0xC2,0xD7,0x95,0x1B,0x10,0x53, | ||
273 | 0xA6,0x3C,0x5E,0x03,0xB2,0x1A,0xA3,0xC4, | ||
274 | }; | ||
275 | #endif | ||
248 | 276 | ||
249 | static unsigned char cbc3_ok[32]={ | 277 | static unsigned char cbc3_ok[32]={ |
250 | 0x3F,0xE3,0x01,0xC9,0x62,0xAC,0x01,0xD0, | 278 | 0x3F,0xE3,0x01,0xC9,0x62,0xAC,0x01,0xD0, |
@@ -294,49 +322,95 @@ static unsigned char ofb_cipher[24]= | |||
294 | 0x3d,0x6d,0x5b,0xe3,0x25,0x5a,0xf8,0xc3 | 322 | 0x3d,0x6d,0x5b,0xe3,0x25,0x5a,0xf8,0xc3 |
295 | }; | 323 | }; |
296 | 324 | ||
297 | DES_LONG cbc_cksum_ret=0xB462FEF7L; | 325 | static DES_LONG cbc_cksum_ret=0xB462FEF7L; |
298 | unsigned char cbc_cksum_data[8]={0x1D,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4}; | 326 | static unsigned char cbc_cksum_data[8]={0x1D,0x26,0x93,0x97,0xf7,0xfe,0x62,0xb4}; |
299 | 327 | ||
300 | #ifndef NOPROTO | ||
301 | static char *pt(unsigned char *p); | 328 | static char *pt(unsigned char *p); |
302 | static int cfb_test(int bits, unsigned char *cfb_cipher); | 329 | static int cfb_test(int bits, unsigned char *cfb_cipher); |
303 | static int cfb64_test(unsigned char *cfb_cipher); | 330 | static int cfb64_test(unsigned char *cfb_cipher); |
304 | static int ede_cfb64_test(unsigned char *cfb_cipher); | 331 | static int ede_cfb64_test(unsigned char *cfb_cipher); |
305 | #else | 332 | int main(int argc, char *argv[]) |
306 | static char *pt(); | ||
307 | static int cfb_test(); | ||
308 | static int cfb64_test(); | ||
309 | static int ede_cfb64_test(); | ||
310 | #endif | ||
311 | |||
312 | int main(argc,argv) | ||
313 | int argc; | ||
314 | char *argv[]; | ||
315 | { | 333 | { |
316 | int i,j,err=0; | 334 | int i,j,err=0; |
317 | des_cblock in,out,outin,iv3; | 335 | des_cblock in,out,outin,iv3,iv2; |
318 | des_key_schedule ks,ks2,ks3; | 336 | des_key_schedule ks,ks2,ks3; |
319 | unsigned char cbc_in[40]; | 337 | unsigned char cbc_in[40]; |
320 | unsigned char cbc_out[40]; | 338 | unsigned char cbc_out[40]; |
321 | DES_LONG cs; | 339 | DES_LONG cs; |
322 | unsigned char qret[4][4],cret[8]; | 340 | unsigned char cret[8]; |
323 | DES_LONG lqret[4]; | 341 | #ifdef _CRAY |
342 | struct { | ||
343 | int a:32; | ||
344 | int b:32; | ||
345 | } lqret[2]; | ||
346 | #else | ||
347 | DES_LONG lqret[4]; | ||
348 | #endif | ||
324 | int num; | 349 | int num; |
325 | char *str; | 350 | char *str; |
326 | 351 | ||
352 | #ifndef OPENSSL_NO_DESCBCM | ||
353 | printf("Doing cbcm\n"); | ||
354 | if ((j=DES_set_key_checked(&cbc_key,&ks)) != 0) | ||
355 | { | ||
356 | printf("Key error %d\n",j); | ||
357 | err=1; | ||
358 | } | ||
359 | if ((j=DES_set_key_checked(&cbc2_key,&ks2)) != 0) | ||
360 | { | ||
361 | printf("Key error %d\n",j); | ||
362 | err=1; | ||
363 | } | ||
364 | if ((j=DES_set_key_checked(&cbc3_key,&ks3)) != 0) | ||
365 | { | ||
366 | printf("Key error %d\n",j); | ||
367 | err=1; | ||
368 | } | ||
369 | memset(cbc_out,0,40); | ||
370 | memset(cbc_in,0,40); | ||
371 | i=strlen((char *)cbc_data)+1; | ||
372 | /* i=((i+7)/8)*8; */ | ||
373 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | ||
374 | memset(iv2,'\0',sizeof iv2); | ||
375 | |||
376 | DES_ede3_cbcm_encrypt(cbc_data,cbc_out,16L,&ks,&ks2,&ks3,&iv3,&iv2, | ||
377 | DES_ENCRYPT); | ||
378 | DES_ede3_cbcm_encrypt(&cbc_data[16],&cbc_out[16],i-16,&ks,&ks2,&ks3, | ||
379 | &iv3,&iv2,DES_ENCRYPT); | ||
380 | /* if (memcmp(cbc_out,cbc3_ok, | ||
381 | (unsigned int)(strlen((char *)cbc_data)+1+7)/8*8) != 0) | ||
382 | { | ||
383 | printf("des_ede3_cbc_encrypt encrypt error\n"); | ||
384 | err=1; | ||
385 | } | ||
386 | */ | ||
387 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | ||
388 | memset(iv2,'\0',sizeof iv2); | ||
389 | DES_ede3_cbcm_encrypt(cbc_out,cbc_in,i,&ks,&ks2,&ks3,&iv3,&iv2,DES_DECRYPT); | ||
390 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0) | ||
391 | { | ||
392 | int n; | ||
393 | |||
394 | printf("des_ede3_cbcm_encrypt decrypt error\n"); | ||
395 | for(n=0 ; n < i ; ++n) | ||
396 | printf(" %02x",cbc_data[n]); | ||
397 | printf("\n"); | ||
398 | for(n=0 ; n < i ; ++n) | ||
399 | printf(" %02x",cbc_in[n]); | ||
400 | printf("\n"); | ||
401 | err=1; | ||
402 | } | ||
403 | #endif | ||
404 | |||
327 | printf("Doing ecb\n"); | 405 | printf("Doing ecb\n"); |
328 | for (i=0; i<NUM_TESTS; i++) | 406 | for (i=0; i<NUM_TESTS; i++) |
329 | { | 407 | { |
330 | if ((j=des_key_sched((C_Block *)(key_data[i]),ks)) != 0) | 408 | DES_set_key_unchecked(&key_data[i],&ks); |
331 | { | ||
332 | printf("Key error %2d:%d\n",i+1,j); | ||
333 | err=1; | ||
334 | } | ||
335 | memcpy(in,plain_data[i],8); | 409 | memcpy(in,plain_data[i],8); |
336 | memset(out,0,8); | 410 | memset(out,0,8); |
337 | memset(outin,0,8); | 411 | memset(outin,0,8); |
338 | des_ecb_encrypt((C_Block *)in,(C_Block *)out,ks,DES_ENCRYPT); | 412 | des_ecb_encrypt(&in,&out,ks,DES_ENCRYPT); |
339 | des_ecb_encrypt((C_Block *)out,(C_Block *)outin,ks,DES_DECRYPT); | 413 | des_ecb_encrypt(&out,&outin,ks,DES_DECRYPT); |
340 | 414 | ||
341 | if (memcmp(out,cipher_data[i],8) != 0) | 415 | if (memcmp(out,cipher_data[i],8) != 0) |
342 | { | 416 | { |
@@ -357,28 +431,14 @@ char *argv[]; | |||
357 | printf("Doing ede ecb\n"); | 431 | printf("Doing ede ecb\n"); |
358 | for (i=0; i<(NUM_TESTS-1); i++) | 432 | for (i=0; i<(NUM_TESTS-1); i++) |
359 | { | 433 | { |
360 | if ((j=des_key_sched((C_Block *)(key_data[i]),ks)) != 0) | 434 | DES_set_key_unchecked(&key_data[i],&ks); |
361 | { | 435 | DES_set_key_unchecked(&key_data[i+1],&ks2); |
362 | err=1; | 436 | DES_set_key_unchecked(&key_data[i+2],&ks3); |
363 | printf("Key error %2d:%d\n",i+1,j); | ||
364 | } | ||
365 | if ((j=des_key_sched((C_Block *)(key_data[i+1]),ks2)) != 0) | ||
366 | { | ||
367 | printf("Key error %2d:%d\n",i+2,j); | ||
368 | err=1; | ||
369 | } | ||
370 | if ((j=des_key_sched((C_Block *)(key_data[i+2]),ks3)) != 0) | ||
371 | { | ||
372 | printf("Key error %2d:%d\n",i+3,j); | ||
373 | err=1; | ||
374 | } | ||
375 | memcpy(in,plain_data[i],8); | 437 | memcpy(in,plain_data[i],8); |
376 | memset(out,0,8); | 438 | memset(out,0,8); |
377 | memset(outin,0,8); | 439 | memset(outin,0,8); |
378 | des_ecb2_encrypt((C_Block *)in,(C_Block *)out,ks,ks2, | 440 | des_ecb2_encrypt(&in,&out,ks,ks2,DES_ENCRYPT); |
379 | DES_ENCRYPT); | 441 | des_ecb2_encrypt(&out,&outin,ks,ks2,DES_DECRYPT); |
380 | des_ecb2_encrypt((C_Block *)out,(C_Block *)outin,ks,ks2, | ||
381 | DES_DECRYPT); | ||
382 | 442 | ||
383 | if (memcmp(out,cipher_ecb2[i],8) != 0) | 443 | if (memcmp(out,cipher_ecb2[i],8) != 0) |
384 | { | 444 | { |
@@ -397,7 +457,7 @@ char *argv[]; | |||
397 | #endif | 457 | #endif |
398 | 458 | ||
399 | printf("Doing cbc\n"); | 459 | printf("Doing cbc\n"); |
400 | if ((j=des_key_sched((C_Block *)cbc_key,ks)) != 0) | 460 | if ((j=DES_set_key_checked(&cbc_key,&ks)) != 0) |
401 | { | 461 | { |
402 | printf("Key error %d\n",j); | 462 | printf("Key error %d\n",j); |
403 | err=1; | 463 | err=1; |
@@ -405,16 +465,17 @@ char *argv[]; | |||
405 | memset(cbc_out,0,40); | 465 | memset(cbc_out,0,40); |
406 | memset(cbc_in,0,40); | 466 | memset(cbc_in,0,40); |
407 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 467 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
408 | des_ncbc_encrypt((C_Block *)cbc_data,(C_Block *)cbc_out, | 468 | des_ncbc_encrypt(cbc_data,cbc_out,strlen((char *)cbc_data)+1,ks, |
409 | (long)strlen((char *)cbc_data)+1,ks, | 469 | &iv3,DES_ENCRYPT); |
410 | (C_Block *)iv3,DES_ENCRYPT); | ||
411 | if (memcmp(cbc_out,cbc_ok,32) != 0) | 470 | if (memcmp(cbc_out,cbc_ok,32) != 0) |
471 | { | ||
412 | printf("cbc_encrypt encrypt error\n"); | 472 | printf("cbc_encrypt encrypt error\n"); |
473 | err=1; | ||
474 | } | ||
413 | 475 | ||
414 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 476 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
415 | des_ncbc_encrypt((C_Block *)cbc_out,(C_Block *)cbc_in, | 477 | des_ncbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks, |
416 | (long)strlen((char *)cbc_data)+1,ks, | 478 | &iv3,DES_DECRYPT); |
417 | (C_Block *)iv3,DES_DECRYPT); | ||
418 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)) != 0) | 479 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)) != 0) |
419 | { | 480 | { |
420 | printf("cbc_encrypt decrypt error\n"); | 481 | printf("cbc_encrypt decrypt error\n"); |
@@ -423,7 +484,7 @@ char *argv[]; | |||
423 | 484 | ||
424 | #ifndef LIBDES_LIT | 485 | #ifndef LIBDES_LIT |
425 | printf("Doing desx cbc\n"); | 486 | printf("Doing desx cbc\n"); |
426 | if ((j=des_key_sched((C_Block *)cbc_key,ks)) != 0) | 487 | if ((j=DES_set_key_checked(&cbc_key,&ks)) != 0) |
427 | { | 488 | { |
428 | printf("Key error %d\n",j); | 489 | printf("Key error %d\n",j); |
429 | err=1; | 490 | err=1; |
@@ -431,19 +492,16 @@ char *argv[]; | |||
431 | memset(cbc_out,0,40); | 492 | memset(cbc_out,0,40); |
432 | memset(cbc_in,0,40); | 493 | memset(cbc_in,0,40); |
433 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 494 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
434 | des_xcbc_encrypt((C_Block *)cbc_data,(C_Block *)cbc_out, | 495 | des_xcbc_encrypt(cbc_data,cbc_out,strlen((char *)cbc_data)+1,ks, |
435 | (long)strlen((char *)cbc_data)+1,ks, | 496 | &iv3,&cbc2_key,&cbc3_key, DES_ENCRYPT); |
436 | (C_Block *)iv3, | ||
437 | (C_Block *)cbc2_key, (C_Block *)cbc3_key, DES_ENCRYPT); | ||
438 | if (memcmp(cbc_out,xcbc_ok,32) != 0) | 497 | if (memcmp(cbc_out,xcbc_ok,32) != 0) |
439 | { | 498 | { |
440 | printf("des_xcbc_encrypt encrypt error\n"); | 499 | printf("des_xcbc_encrypt encrypt error\n"); |
500 | err=1; | ||
441 | } | 501 | } |
442 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 502 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
443 | des_xcbc_encrypt((C_Block *)cbc_out,(C_Block *)cbc_in, | 503 | des_xcbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks, |
444 | (long)strlen((char *)cbc_data)+1,ks, | 504 | &iv3,&cbc2_key,&cbc3_key, DES_DECRYPT); |
445 | (C_Block *)iv3, | ||
446 | (C_Block *)cbc2_key, (C_Block *)cbc3_key, DES_DECRYPT); | ||
447 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0) | 505 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0) |
448 | { | 506 | { |
449 | printf("des_xcbc_encrypt decrypt error\n"); | 507 | printf("des_xcbc_encrypt decrypt error\n"); |
@@ -452,17 +510,17 @@ char *argv[]; | |||
452 | #endif | 510 | #endif |
453 | 511 | ||
454 | printf("Doing ede cbc\n"); | 512 | printf("Doing ede cbc\n"); |
455 | if ((j=des_key_sched((C_Block *)cbc_key,ks)) != 0) | 513 | if ((j=DES_set_key_checked(&cbc_key,&ks)) != 0) |
456 | { | 514 | { |
457 | printf("Key error %d\n",j); | 515 | printf("Key error %d\n",j); |
458 | err=1; | 516 | err=1; |
459 | } | 517 | } |
460 | if ((j=des_key_sched((C_Block *)cbc2_key,ks2)) != 0) | 518 | if ((j=DES_set_key_checked(&cbc2_key,&ks2)) != 0) |
461 | { | 519 | { |
462 | printf("Key error %d\n",j); | 520 | printf("Key error %d\n",j); |
463 | err=1; | 521 | err=1; |
464 | } | 522 | } |
465 | if ((j=des_key_sched((C_Block *)cbc3_key,ks3)) != 0) | 523 | if ((j=DES_set_key_checked(&cbc3_key,&ks3)) != 0) |
466 | { | 524 | { |
467 | printf("Key error %d\n",j); | 525 | printf("Key error %d\n",j); |
468 | err=1; | 526 | err=1; |
@@ -473,46 +531,60 @@ char *argv[]; | |||
473 | /* i=((i+7)/8)*8; */ | 531 | /* i=((i+7)/8)*8; */ |
474 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 532 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
475 | 533 | ||
476 | des_ede3_cbc_encrypt((C_Block *)cbc_data,(C_Block *)cbc_out, | 534 | des_ede3_cbc_encrypt(cbc_data,cbc_out,16L,ks,ks2,ks3,&iv3, |
477 | 16L,ks,ks2,ks3,(C_Block *)iv3,DES_ENCRYPT); | 535 | DES_ENCRYPT); |
478 | des_ede3_cbc_encrypt((C_Block *)&(cbc_data[16]), | 536 | des_ede3_cbc_encrypt(&(cbc_data[16]),&(cbc_out[16]),i-16,ks,ks2,ks3, |
479 | (C_Block *)&(cbc_out[16]), | 537 | &iv3,DES_ENCRYPT); |
480 | (long)i-16,ks,ks2,ks3,(C_Block *)iv3,DES_ENCRYPT); | ||
481 | if (memcmp(cbc_out,cbc3_ok, | 538 | if (memcmp(cbc_out,cbc3_ok, |
482 | (unsigned int)(strlen((char *)cbc_data)+1+7)/8*8) != 0) | 539 | (unsigned int)(strlen((char *)cbc_data)+1+7)/8*8) != 0) |
483 | { | 540 | { |
541 | int n; | ||
542 | |||
484 | printf("des_ede3_cbc_encrypt encrypt error\n"); | 543 | printf("des_ede3_cbc_encrypt encrypt error\n"); |
544 | for(n=0 ; n < i ; ++n) | ||
545 | printf(" %02x",cbc_out[n]); | ||
546 | printf("\n"); | ||
547 | for(n=0 ; n < i ; ++n) | ||
548 | printf(" %02x",cbc3_ok[n]); | ||
549 | printf("\n"); | ||
485 | err=1; | 550 | err=1; |
486 | } | 551 | } |
487 | 552 | ||
488 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); | 553 | memcpy(iv3,cbc_iv,sizeof(cbc_iv)); |
489 | des_ede3_cbc_encrypt((C_Block *)cbc_out,(C_Block *)cbc_in, | 554 | des_ede3_cbc_encrypt(cbc_out,cbc_in,i,ks,ks2,ks3,&iv3,DES_DECRYPT); |
490 | (long)i,ks,ks2,ks3,(C_Block *)iv3,DES_DECRYPT); | 555 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0) |
491 | if (memcmp(cbc_in,cbc_data,strlen(cbc_data)+1) != 0) | ||
492 | { | 556 | { |
557 | int n; | ||
558 | |||
493 | printf("des_ede3_cbc_encrypt decrypt error\n"); | 559 | printf("des_ede3_cbc_encrypt decrypt error\n"); |
560 | for(n=0 ; n < i ; ++n) | ||
561 | printf(" %02x",cbc_data[n]); | ||
562 | printf("\n"); | ||
563 | for(n=0 ; n < i ; ++n) | ||
564 | printf(" %02x",cbc_in[n]); | ||
565 | printf("\n"); | ||
494 | err=1; | 566 | err=1; |
495 | } | 567 | } |
496 | 568 | ||
497 | #ifndef LIBDES_LIT | 569 | #ifndef LIBDES_LIT |
498 | printf("Doing pcbc\n"); | 570 | printf("Doing pcbc\n"); |
499 | if ((j=des_key_sched((C_Block *)cbc_key,ks)) != 0) | 571 | if ((j=DES_set_key_checked(&cbc_key,&ks)) != 0) |
500 | { | 572 | { |
501 | printf("Key error %d\n",j); | 573 | printf("Key error %d\n",j); |
502 | err=1; | 574 | err=1; |
503 | } | 575 | } |
504 | memset(cbc_out,0,40); | 576 | memset(cbc_out,0,40); |
505 | memset(cbc_in,0,40); | 577 | memset(cbc_in,0,40); |
506 | des_pcbc_encrypt((C_Block *)cbc_data,(C_Block *)cbc_out, | 578 | des_pcbc_encrypt(cbc_data,cbc_out,strlen((char *)cbc_data)+1,ks, |
507 | (long)strlen(cbc_data)+1,ks,(C_Block *)cbc_iv,DES_ENCRYPT); | 579 | &cbc_iv,DES_ENCRYPT); |
508 | if (memcmp(cbc_out,pcbc_ok,32) != 0) | 580 | if (memcmp(cbc_out,pcbc_ok,32) != 0) |
509 | { | 581 | { |
510 | printf("pcbc_encrypt encrypt error\n"); | 582 | printf("pcbc_encrypt encrypt error\n"); |
511 | err=1; | 583 | err=1; |
512 | } | 584 | } |
513 | des_pcbc_encrypt((C_Block *)cbc_out,(C_Block *)cbc_in, | 585 | des_pcbc_encrypt(cbc_out,cbc_in,strlen((char *)cbc_data)+1,ks,&cbc_iv, |
514 | (long)strlen(cbc_data)+1,ks,(C_Block *)cbc_iv,DES_DECRYPT); | 586 | DES_DECRYPT); |
515 | if (memcmp(cbc_in,cbc_data,strlen(cbc_data)+1) != 0) | 587 | if (memcmp(cbc_in,cbc_data,strlen((char *)cbc_data)+1) != 0) |
516 | { | 588 | { |
517 | printf("pcbc_encrypt decrypt error\n"); | 589 | printf("pcbc_encrypt decrypt error\n"); |
518 | err=1; | 590 | err=1; |
@@ -536,7 +608,7 @@ char *argv[]; | |||
536 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 608 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
537 | for (i=0; i<sizeof(plain); i++) | 609 | for (i=0; i<sizeof(plain); i++) |
538 | des_cfb_encrypt(&(plain[i]),&(cfb_buf1[i]), | 610 | des_cfb_encrypt(&(plain[i]),&(cfb_buf1[i]), |
539 | 8,(long)1,ks,(C_Block *)cfb_tmp,DES_ENCRYPT); | 611 | 8,1,ks,&cfb_tmp,DES_ENCRYPT); |
540 | if (memcmp(cfb_cipher8,cfb_buf1,sizeof(plain)) != 0) | 612 | if (memcmp(cfb_cipher8,cfb_buf1,sizeof(plain)) != 0) |
541 | { | 613 | { |
542 | printf("cfb_encrypt small encrypt error\n"); | 614 | printf("cfb_encrypt small encrypt error\n"); |
@@ -546,7 +618,7 @@ char *argv[]; | |||
546 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 618 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
547 | for (i=0; i<sizeof(plain); i++) | 619 | for (i=0; i<sizeof(plain); i++) |
548 | des_cfb_encrypt(&(cfb_buf1[i]),&(cfb_buf2[i]), | 620 | des_cfb_encrypt(&(cfb_buf1[i]),&(cfb_buf2[i]), |
549 | 8,(long)1,ks,(C_Block *)cfb_tmp,DES_DECRYPT); | 621 | 8,1,ks,&cfb_tmp,DES_DECRYPT); |
550 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) | 622 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) |
551 | { | 623 | { |
552 | printf("cfb_encrypt small decrypt error\n"); | 624 | printf("cfb_encrypt small decrypt error\n"); |
@@ -559,10 +631,9 @@ char *argv[]; | |||
559 | printf("done\n"); | 631 | printf("done\n"); |
560 | 632 | ||
561 | printf("Doing ofb\n"); | 633 | printf("Doing ofb\n"); |
562 | des_key_sched((C_Block *)ofb_key,ks); | 634 | DES_set_key_checked(&ofb_key,&ks); |
563 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 635 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
564 | des_ofb_encrypt(plain,ofb_buf1,64,(long)sizeof(plain)/8,ks, | 636 | des_ofb_encrypt(plain,ofb_buf1,64,sizeof(plain)/8,ks,&ofb_tmp); |
565 | (C_Block *)ofb_tmp); | ||
566 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) | 637 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) |
567 | { | 638 | { |
568 | printf("ofb_encrypt encrypt error\n"); | 639 | printf("ofb_encrypt encrypt error\n"); |
@@ -575,8 +646,7 @@ ofb_buf1[8+4], ofb_cipher[8+5], ofb_cipher[8+6], ofb_cipher[8+7]); | |||
575 | err=1; | 646 | err=1; |
576 | } | 647 | } |
577 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 648 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
578 | des_ofb_encrypt(ofb_buf1,ofb_buf2,64,(long)sizeof(ofb_buf1)/8,ks, | 649 | des_ofb_encrypt(ofb_buf1,ofb_buf2,64,sizeof(ofb_buf1)/8,ks,&ofb_tmp); |
579 | (C_Block *)ofb_tmp); | ||
580 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) | 650 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) |
581 | { | 651 | { |
582 | printf("ofb_encrypt decrypt error\n"); | 652 | printf("ofb_encrypt decrypt error\n"); |
@@ -590,15 +660,15 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
590 | } | 660 | } |
591 | 661 | ||
592 | printf("Doing ofb64\n"); | 662 | printf("Doing ofb64\n"); |
593 | des_key_sched((C_Block *)ofb_key,ks); | 663 | DES_set_key_checked(&ofb_key,&ks); |
594 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 664 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
595 | memset(ofb_buf1,0,sizeof(ofb_buf1)); | 665 | memset(ofb_buf1,0,sizeof(ofb_buf1)); |
596 | memset(ofb_buf2,0,sizeof(ofb_buf1)); | 666 | memset(ofb_buf2,0,sizeof(ofb_buf1)); |
597 | num=0; | 667 | num=0; |
598 | for (i=0; i<sizeof(plain); i++) | 668 | for (i=0; i<sizeof(plain); i++) |
599 | { | 669 | { |
600 | des_ofb64_encrypt(&(plain[i]),&(ofb_buf1[i]),1,ks, | 670 | des_ofb64_encrypt(&(plain[i]),&(ofb_buf1[i]),1,ks,&ofb_tmp, |
601 | (C_Block *)ofb_tmp,&num); | 671 | &num); |
602 | } | 672 | } |
603 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) | 673 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) |
604 | { | 674 | { |
@@ -607,8 +677,8 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
607 | } | 677 | } |
608 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 678 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
609 | num=0; | 679 | num=0; |
610 | des_ofb64_encrypt(ofb_buf1,ofb_buf2,(long)sizeof(ofb_buf1),ks, | 680 | des_ofb64_encrypt(ofb_buf1,ofb_buf2,sizeof(ofb_buf1),ks,&ofb_tmp, |
611 | (C_Block *)ofb_tmp,&num); | 681 | &num); |
612 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) | 682 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) |
613 | { | 683 | { |
614 | printf("ofb64_encrypt decrypt error\n"); | 684 | printf("ofb64_encrypt decrypt error\n"); |
@@ -616,15 +686,15 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
616 | } | 686 | } |
617 | 687 | ||
618 | printf("Doing ede_ofb64\n"); | 688 | printf("Doing ede_ofb64\n"); |
619 | des_key_sched((C_Block *)ofb_key,ks); | 689 | DES_set_key_checked(&ofb_key,&ks); |
620 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 690 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
621 | memset(ofb_buf1,0,sizeof(ofb_buf1)); | 691 | memset(ofb_buf1,0,sizeof(ofb_buf1)); |
622 | memset(ofb_buf2,0,sizeof(ofb_buf1)); | 692 | memset(ofb_buf2,0,sizeof(ofb_buf1)); |
623 | num=0; | 693 | num=0; |
624 | for (i=0; i<sizeof(plain); i++) | 694 | for (i=0; i<sizeof(plain); i++) |
625 | { | 695 | { |
626 | des_ede3_ofb64_encrypt(&(plain[i]),&(ofb_buf1[i]),1,ks,ks,ks, | 696 | des_ede3_ofb64_encrypt(&(plain[i]),&(ofb_buf1[i]),1,ks,ks, |
627 | (C_Block *)ofb_tmp,&num); | 697 | ks,&ofb_tmp,&num); |
628 | } | 698 | } |
629 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) | 699 | if (memcmp(ofb_cipher,ofb_buf1,sizeof(ofb_buf1)) != 0) |
630 | { | 700 | { |
@@ -633,8 +703,8 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
633 | } | 703 | } |
634 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); | 704 | memcpy(ofb_tmp,ofb_iv,sizeof(ofb_iv)); |
635 | num=0; | 705 | num=0; |
636 | des_ede3_ofb64_encrypt(ofb_buf1,ofb_buf2,(long)sizeof(ofb_buf1),ks, | 706 | des_ede3_ofb64_encrypt(ofb_buf1,ofb_buf2,sizeof(ofb_buf1),ks,ks,ks, |
637 | ks,ks,(C_Block *)ofb_tmp,&num); | 707 | &ofb_tmp,&num); |
638 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) | 708 | if (memcmp(plain,ofb_buf2,sizeof(ofb_buf2)) != 0) |
639 | { | 709 | { |
640 | printf("ede_ofb64_encrypt decrypt error\n"); | 710 | printf("ede_ofb64_encrypt decrypt error\n"); |
@@ -642,9 +712,8 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
642 | } | 712 | } |
643 | 713 | ||
644 | printf("Doing cbc_cksum\n"); | 714 | printf("Doing cbc_cksum\n"); |
645 | des_key_sched((C_Block *)cbc_key,ks); | 715 | DES_set_key_checked(&cbc_key,&ks); |
646 | cs=des_cbc_cksum((C_Block *)cbc_data,(C_Block *)cret, | 716 | cs=des_cbc_cksum(cbc_data,&cret,strlen((char *)cbc_data),ks,&cbc_iv); |
647 | (long)strlen(cbc_data),ks,(C_Block *)cbc_iv); | ||
648 | if (cs != cbc_cksum_ret) | 717 | if (cs != cbc_cksum_ret) |
649 | { | 718 | { |
650 | printf("bad return value (%08lX), should be %08lX\n", | 719 | printf("bad return value (%08lX), should be %08lX\n", |
@@ -658,77 +727,82 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
658 | } | 727 | } |
659 | 728 | ||
660 | printf("Doing quad_cksum\n"); | 729 | printf("Doing quad_cksum\n"); |
661 | cs=quad_cksum((C_Block *)cbc_data,(C_Block *)qret, | 730 | cs=des_quad_cksum(cbc_data,(des_cblock *)lqret, |
662 | (long)strlen(cbc_data),2,(C_Block *)cbc_iv); | 731 | (long)strlen((char *)cbc_data),2,(des_cblock *)cbc_iv); |
663 | j=sizeof(lqret[0])-4; | 732 | if (cs != 0x70d7a63aL) |
664 | for (i=0; i<4; i++) | 733 | { |
734 | printf("quad_cksum error, ret %08lx should be 70d7a63a\n", | ||
735 | (unsigned long)cs); | ||
736 | err=1; | ||
737 | } | ||
738 | #ifdef _CRAY | ||
739 | if (lqret[0].a != 0x327eba8dL) | ||
665 | { | 740 | { |
666 | lqret[i]=0; | 741 | printf("quad_cksum error, out[0] %08lx is not %08lx\n", |
667 | memcpy(&(lqret[i]),&(qret[i][0]),4); | 742 | (unsigned long)lqret[0].a,0x327eba8dUL); |
668 | if (j > 0) lqret[i]=lqret[i]>>(j*8); /* For Cray */ | 743 | err=1; |
669 | } | 744 | } |
670 | { /* Big-endian fix */ | 745 | if (lqret[0].b != 0x201a49ccL) |
671 | static DES_LONG l=1; | ||
672 | static unsigned char *c=(unsigned char *)&l; | ||
673 | DES_LONG ll; | ||
674 | |||
675 | if (!c[0]) | ||
676 | { | 746 | { |
677 | ll=lqret[0]^lqret[3]; | 747 | printf("quad_cksum error, out[1] %08lx is not %08lx\n", |
678 | lqret[0]^=ll; | 748 | (unsigned long)lqret[0].b,0x201a49ccUL); |
679 | lqret[3]^=ll; | 749 | err=1; |
680 | ll=lqret[1]^lqret[2]; | ||
681 | lqret[1]^=ll; | ||
682 | lqret[2]^=ll; | ||
683 | } | 750 | } |
684 | } | 751 | if (lqret[1].a != 0x70d7a63aL) |
685 | if (cs != 0x70d7a63aL) | ||
686 | { | 752 | { |
687 | printf("quad_cksum error, ret %08lx should be 70d7a63a\n", | 753 | printf("quad_cksum error, out[2] %08lx is not %08lx\n", |
688 | (unsigned long)cs); | 754 | (unsigned long)lqret[1].a,0x70d7a63aUL); |
689 | err=1; | 755 | err=1; |
690 | } | 756 | } |
757 | if (lqret[1].b != 0x501c2c26L) | ||
758 | { | ||
759 | printf("quad_cksum error, out[3] %08lx is not %08lx\n", | ||
760 | (unsigned long)lqret[1].b,0x501c2c26UL); | ||
761 | err=1; | ||
762 | } | ||
763 | #else | ||
691 | if (lqret[0] != 0x327eba8dL) | 764 | if (lqret[0] != 0x327eba8dL) |
692 | { | 765 | { |
693 | printf("quad_cksum error, out[0] %08lx is not %08lx\n", | 766 | printf("quad_cksum error, out[0] %08lx is not %08lx\n", |
694 | (unsigned long)lqret[0],0x327eba8dL); | 767 | (unsigned long)lqret[0],0x327eba8dUL); |
695 | err=1; | 768 | err=1; |
696 | } | 769 | } |
697 | if (lqret[1] != 0x201a49ccL) | 770 | if (lqret[1] != 0x201a49ccL) |
698 | { | 771 | { |
699 | printf("quad_cksum error, out[1] %08lx is not %08lx\n", | 772 | printf("quad_cksum error, out[1] %08lx is not %08lx\n", |
700 | (unsigned long)lqret[1],0x201a49ccL); | 773 | (unsigned long)lqret[1],0x201a49ccUL); |
701 | err=1; | 774 | err=1; |
702 | } | 775 | } |
703 | if (lqret[2] != 0x70d7a63aL) | 776 | if (lqret[2] != 0x70d7a63aL) |
704 | { | 777 | { |
705 | printf("quad_cksum error, out[2] %08lx is not %08lx\n", | 778 | printf("quad_cksum error, out[2] %08lx is not %08lx\n", |
706 | (unsigned long)lqret[2],0x70d7a63aL); | 779 | (unsigned long)lqret[2],0x70d7a63aUL); |
707 | err=1; | 780 | err=1; |
708 | } | 781 | } |
709 | if (lqret[3] != 0x501c2c26L) | 782 | if (lqret[3] != 0x501c2c26L) |
710 | { | 783 | { |
711 | printf("quad_cksum error, out[3] %08lx is not %08lx\n", | 784 | printf("quad_cksum error, out[3] %08lx is not %08lx\n", |
712 | (unsigned long)lqret[3],0x501c2c26L); | 785 | (unsigned long)lqret[3],0x501c2c26UL); |
713 | err=1; | 786 | err=1; |
714 | } | 787 | } |
715 | #endif | 788 | #endif |
789 | #endif | ||
716 | 790 | ||
717 | printf("input word alignment test"); | 791 | printf("input word alignment test"); |
718 | for (i=0; i<4; i++) | 792 | for (i=0; i<4; i++) |
719 | { | 793 | { |
720 | printf(" %d",i); | 794 | printf(" %d",i); |
721 | des_ncbc_encrypt((C_Block *)&(cbc_out[i]),(C_Block *)cbc_in, | 795 | des_ncbc_encrypt(&(cbc_out[i]),cbc_in, |
722 | (long)strlen(cbc_data)+1,ks,(C_Block *)cbc_iv, | 796 | strlen((char *)cbc_data)+1,ks, |
723 | DES_ENCRYPT); | 797 | &cbc_iv,DES_ENCRYPT); |
724 | } | 798 | } |
725 | printf("\noutput word alignment test"); | 799 | printf("\noutput word alignment test"); |
726 | for (i=0; i<4; i++) | 800 | for (i=0; i<4; i++) |
727 | { | 801 | { |
728 | printf(" %d",i); | 802 | printf(" %d",i); |
729 | des_ncbc_encrypt((C_Block *)cbc_out,(C_Block *)&(cbc_in[i]), | 803 | des_ncbc_encrypt(cbc_out,&(cbc_in[i]), |
730 | (long)strlen(cbc_data)+1,ks,(C_Block *)cbc_iv, | 804 | strlen((char *)cbc_data)+1,ks, |
731 | DES_ENCRYPT); | 805 | &cbc_iv,DES_ENCRYPT); |
732 | } | 806 | } |
733 | printf("\n"); | 807 | printf("\n"); |
734 | printf("fast crypt test "); | 808 | printf("fast crypt test "); |
@@ -745,12 +819,10 @@ plain[8+4], plain[8+5], plain[8+6], plain[8+7]); | |||
745 | err=1; | 819 | err=1; |
746 | } | 820 | } |
747 | printf("\n"); | 821 | printf("\n"); |
748 | exit(err); | 822 | return(err); |
749 | return(0); | ||
750 | } | 823 | } |
751 | 824 | ||
752 | static char *pt(p) | 825 | static char *pt(unsigned char *p) |
753 | unsigned char *p; | ||
754 | { | 826 | { |
755 | static char bufs[10][20]; | 827 | static char bufs[10][20]; |
756 | static int bnum=0; | 828 | static int bnum=0; |
@@ -771,17 +843,15 @@ unsigned char *p; | |||
771 | 843 | ||
772 | #ifndef LIBDES_LIT | 844 | #ifndef LIBDES_LIT |
773 | 845 | ||
774 | static int cfb_test(bits, cfb_cipher) | 846 | static int cfb_test(int bits, unsigned char *cfb_cipher) |
775 | int bits; | ||
776 | unsigned char *cfb_cipher; | ||
777 | { | 847 | { |
778 | des_key_schedule ks; | 848 | des_key_schedule ks; |
779 | int i,err=0; | 849 | int i,err=0; |
780 | 850 | ||
781 | des_key_sched((C_Block *)cfb_key,ks); | 851 | DES_set_key_checked(&cfb_key,&ks); |
782 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 852 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
783 | des_cfb_encrypt(plain,cfb_buf1,bits,(long)sizeof(plain),ks, | 853 | des_cfb_encrypt(plain,cfb_buf1,bits,sizeof(plain),ks,&cfb_tmp, |
784 | (C_Block *)cfb_tmp,DES_ENCRYPT); | 854 | DES_ENCRYPT); |
785 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) | 855 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) |
786 | { | 856 | { |
787 | err=1; | 857 | err=1; |
@@ -790,8 +860,8 @@ unsigned char *cfb_cipher; | |||
790 | printf("%s\n",pt(&(cfb_buf1[i]))); | 860 | printf("%s\n",pt(&(cfb_buf1[i]))); |
791 | } | 861 | } |
792 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 862 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
793 | des_cfb_encrypt(cfb_buf1,cfb_buf2,bits,(long)sizeof(plain),ks, | 863 | des_cfb_encrypt(cfb_buf1,cfb_buf2,bits,sizeof(plain),ks,&cfb_tmp, |
794 | (C_Block *)cfb_tmp,DES_DECRYPT); | 864 | DES_DECRYPT); |
795 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) | 865 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) |
796 | { | 866 | { |
797 | err=1; | 867 | err=1; |
@@ -802,20 +872,17 @@ unsigned char *cfb_cipher; | |||
802 | return(err); | 872 | return(err); |
803 | } | 873 | } |
804 | 874 | ||
805 | static int cfb64_test(cfb_cipher) | 875 | static int cfb64_test(unsigned char *cfb_cipher) |
806 | unsigned char *cfb_cipher; | ||
807 | { | 876 | { |
808 | des_key_schedule ks; | 877 | des_key_schedule ks; |
809 | int err=0,i,n; | 878 | int err=0,i,n; |
810 | 879 | ||
811 | des_key_sched((C_Block *)cfb_key,ks); | 880 | DES_set_key_checked(&cfb_key,&ks); |
812 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 881 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
813 | n=0; | 882 | n=0; |
814 | des_cfb64_encrypt(plain,cfb_buf1,(long)12,ks, | 883 | des_cfb64_encrypt(plain,cfb_buf1,12,ks,&cfb_tmp,&n,DES_ENCRYPT); |
815 | (C_Block *)cfb_tmp,&n,DES_ENCRYPT); | 884 | des_cfb64_encrypt(&(plain[12]),&(cfb_buf1[12]),sizeof(plain)-12,ks, |
816 | des_cfb64_encrypt(&(plain[12]),&(cfb_buf1[12]), | 885 | &cfb_tmp,&n,DES_ENCRYPT); |
817 | (long)sizeof(plain)-12,ks, | ||
818 | (C_Block *)cfb_tmp,&n,DES_ENCRYPT); | ||
819 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) | 886 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) |
820 | { | 887 | { |
821 | err=1; | 888 | err=1; |
@@ -825,11 +892,9 @@ unsigned char *cfb_cipher; | |||
825 | } | 892 | } |
826 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 893 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
827 | n=0; | 894 | n=0; |
828 | des_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,ks, | 895 | des_cfb64_encrypt(cfb_buf1,cfb_buf2,17,ks,&cfb_tmp,&n,DES_DECRYPT); |
829 | (C_Block *)cfb_tmp,&n,DES_DECRYPT); | ||
830 | des_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), | 896 | des_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), |
831 | (long)sizeof(plain)-17,ks, | 897 | sizeof(plain)-17,ks,&cfb_tmp,&n,DES_DECRYPT); |
832 | (C_Block *)cfb_tmp,&n,DES_DECRYPT); | ||
833 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) | 898 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) |
834 | { | 899 | { |
835 | err=1; | 900 | err=1; |
@@ -840,20 +905,19 @@ unsigned char *cfb_cipher; | |||
840 | return(err); | 905 | return(err); |
841 | } | 906 | } |
842 | 907 | ||
843 | static int ede_cfb64_test(cfb_cipher) | 908 | static int ede_cfb64_test(unsigned char *cfb_cipher) |
844 | unsigned char *cfb_cipher; | ||
845 | { | 909 | { |
846 | des_key_schedule ks; | 910 | des_key_schedule ks; |
847 | int err=0,i,n; | 911 | int err=0,i,n; |
848 | 912 | ||
849 | des_key_sched((C_Block *)cfb_key,ks); | 913 | DES_set_key_checked(&cfb_key,&ks); |
850 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 914 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
851 | n=0; | 915 | n=0; |
852 | des_ede3_cfb64_encrypt(plain,cfb_buf1,(long)12,ks,ks,ks, | 916 | des_ede3_cfb64_encrypt(plain,cfb_buf1,12,ks,ks,ks,&cfb_tmp,&n, |
853 | (C_Block *)cfb_tmp,&n,DES_ENCRYPT); | 917 | DES_ENCRYPT); |
854 | des_ede3_cfb64_encrypt(&(plain[12]),&(cfb_buf1[12]), | 918 | des_ede3_cfb64_encrypt(&(plain[12]),&(cfb_buf1[12]), |
855 | (long)sizeof(plain)-12,ks,ks,ks, | 919 | sizeof(plain)-12,ks,ks,ks, |
856 | (C_Block *)cfb_tmp,&n,DES_ENCRYPT); | 920 | &cfb_tmp,&n,DES_ENCRYPT); |
857 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) | 921 | if (memcmp(cfb_cipher,cfb_buf1,sizeof(plain)) != 0) |
858 | { | 922 | { |
859 | err=1; | 923 | err=1; |
@@ -864,10 +928,10 @@ unsigned char *cfb_cipher; | |||
864 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); | 928 | memcpy(cfb_tmp,cfb_iv,sizeof(cfb_iv)); |
865 | n=0; | 929 | n=0; |
866 | des_ede3_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,ks,ks,ks, | 930 | des_ede3_cfb64_encrypt(cfb_buf1,cfb_buf2,(long)17,ks,ks,ks, |
867 | (C_Block *)cfb_tmp,&n,DES_DECRYPT); | 931 | &cfb_tmp,&n,DES_DECRYPT); |
868 | des_ede3_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), | 932 | des_ede3_cfb64_encrypt(&(cfb_buf1[17]),&(cfb_buf2[17]), |
869 | (long)sizeof(plain)-17,ks,ks,ks, | 933 | sizeof(plain)-17,ks,ks,ks, |
870 | (C_Block *)cfb_tmp,&n,DES_DECRYPT); | 934 | &cfb_tmp,&n,DES_DECRYPT); |
871 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) | 935 | if (memcmp(plain,cfb_buf2,sizeof(plain)) != 0) |
872 | { | 936 | { |
873 | err=1; | 937 | err=1; |
@@ -879,4 +943,4 @@ unsigned char *cfb_cipher; | |||
879 | } | 943 | } |
880 | 944 | ||
881 | #endif | 945 | #endif |
882 | 946 | #endif | |
diff --git a/src/lib/libcrypto/des/read2pwd.c b/src/lib/libcrypto/des/read2pwd.c index a0d53793e4..b4720c3a98 100644 --- a/src/lib/libcrypto/des/read2pwd.c +++ b/src/lib/libcrypto/des/read2pwd.c | |||
@@ -1,4 +1,57 @@ | |||
1 | /* crypto/des/read2pwd.c */ | 1 | /* crypto/des/read2pwd.c */ |
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | * This product includes cryptographic software written by Eric Young | ||
51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
52 | * Hudson (tjh@cryptsoft.com). | ||
53 | * | ||
54 | */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 55 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 56 | * All rights reserved. |
4 | * | 57 | * |
@@ -56,34 +109,30 @@ | |||
56 | * [including the GNU Public Licence.] | 109 | * [including the GNU Public Licence.] |
57 | */ | 110 | */ |
58 | 111 | ||
59 | #include "des_locl.h" | 112 | #include <string.h> |
113 | #include <openssl/des.h> | ||
114 | #include <openssl/ui.h> | ||
60 | 115 | ||
61 | int des_read_password(key, prompt, verify) | 116 | int DES_read_password(DES_cblock *key, const char *prompt, int verify) |
62 | des_cblock (*key); | ||
63 | char *prompt; | ||
64 | int verify; | ||
65 | { | 117 | { |
66 | int ok; | 118 | int ok; |
67 | char buf[BUFSIZ],buff[BUFSIZ]; | 119 | char buf[BUFSIZ],buff[BUFSIZ]; |
68 | 120 | ||
69 | if ((ok=des_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | 121 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) |
70 | des_string_to_key(buf,key); | 122 | DES_string_to_key(buf,key); |
71 | memset(buf,0,BUFSIZ); | 123 | memset(buf,0,BUFSIZ); |
72 | memset(buff,0,BUFSIZ); | 124 | memset(buff,0,BUFSIZ); |
73 | return(ok); | 125 | return(ok); |
74 | } | 126 | } |
75 | 127 | ||
76 | int des_read_2passwords(key1, key2, prompt, verify) | 128 | int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, |
77 | des_cblock (*key1); | 129 | int verify) |
78 | des_cblock (*key2); | ||
79 | char *prompt; | ||
80 | int verify; | ||
81 | { | 130 | { |
82 | int ok; | 131 | int ok; |
83 | char buf[BUFSIZ],buff[BUFSIZ]; | 132 | char buf[BUFSIZ],buff[BUFSIZ]; |
84 | 133 | ||
85 | if ((ok=des_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | 134 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) |
86 | des_string_to_2keys(buf,key1,key2); | 135 | DES_string_to_2keys(buf,key1,key2); |
87 | memset(buf,0,BUFSIZ); | 136 | memset(buf,0,BUFSIZ); |
88 | memset(buff,0,BUFSIZ); | 137 | memset(buff,0,BUFSIZ); |
89 | return(ok); | 138 | return(ok); |
diff --git a/src/lib/libcrypto/des/read_pwd.c b/src/lib/libcrypto/des/read_pwd.c index 99920f2f86..00000190f8 100644 --- a/src/lib/libcrypto/des/read_pwd.c +++ b/src/lib/libcrypto/des/read_pwd.c | |||
@@ -56,20 +56,55 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/e_os2.h> | ||
60 | #if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WIN32) | ||
61 | #ifdef OPENSSL_UNISTD | ||
62 | # include OPENSSL_UNISTD | ||
63 | #else | ||
64 | # include <unistd.h> | ||
65 | #endif | ||
66 | /* If unistd.h defines _POSIX_VERSION, we conclude that we | ||
67 | * are on a POSIX system and have sigaction and termios. */ | ||
68 | #if defined(_POSIX_VERSION) | ||
69 | |||
70 | # define SIGACTION | ||
71 | # if !defined(TERMIOS) && !defined(TERMIO) && !defined(SGTTY) | ||
72 | # define TERMIOS | ||
73 | # endif | ||
74 | |||
75 | #endif | ||
76 | #endif | ||
77 | |||
59 | /* #define SIGACTION */ /* Define this if you have sigaction() */ | 78 | /* #define SIGACTION */ /* Define this if you have sigaction() */ |
79 | |||
60 | #ifdef WIN16TTY | 80 | #ifdef WIN16TTY |
61 | #undef WIN16 | 81 | #undef OPENSSL_SYS_WIN16 |
62 | #undef _WINDOWS | 82 | #undef _WINDOWS |
63 | #include <graph.h> | 83 | #include <graph.h> |
64 | #endif | 84 | #endif |
65 | 85 | ||
66 | /* 06-Apr-92 Luke Brennan Support for VMS */ | 86 | /* 06-Apr-92 Luke Brennan Support for VMS */ |
67 | #include "des_locl.h" | 87 | #include "des_locl.h" |
88 | #include "cryptlib.h" | ||
68 | #include <signal.h> | 89 | #include <signal.h> |
90 | #include <stdio.h> | ||
69 | #include <string.h> | 91 | #include <string.h> |
70 | #include <setjmp.h> | 92 | #include <setjmp.h> |
71 | #include <errno.h> | 93 | #include <errno.h> |
72 | 94 | ||
95 | #ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */ | ||
96 | #include <starlet.h> | ||
97 | #ifdef __DECC | ||
98 | #pragma message disable DOLLARID | ||
99 | #endif | ||
100 | #endif | ||
101 | |||
102 | #ifdef WIN_CONSOLE_BUG | ||
103 | #include <windows.h> | ||
104 | #include <wincon.h> | ||
105 | #endif | ||
106 | |||
107 | |||
73 | /* There are 5 types of terminal interface supported, | 108 | /* There are 5 types of terminal interface supported, |
74 | * TERMIO, TERMIOS, VMS, MSDOS and SGTTY | 109 | * TERMIO, TERMIOS, VMS, MSDOS and SGTTY |
75 | */ | 110 | */ |
@@ -92,12 +127,18 @@ | |||
92 | #undef SGTTY | 127 | #undef SGTTY |
93 | #endif | 128 | #endif |
94 | 129 | ||
95 | #if !defined(TERMIO) && !defined(TERMIOS) && !defined(VMS) && !defined(MSDOS) | 130 | #if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE) |
96 | #undef TERMIOS | 131 | #undef TERMIOS |
97 | #undef TERMIO | 132 | #undef TERMIO |
98 | #define SGTTY | 133 | #define SGTTY |
99 | #endif | 134 | #endif |
100 | 135 | ||
136 | #if defined(OPENSSL_SYS_VSWORKS) | ||
137 | #undef TERMIOS | ||
138 | #undef TERMIO | ||
139 | #undef SGTTY | ||
140 | #endif | ||
141 | |||
101 | #ifdef TERMIOS | 142 | #ifdef TERMIOS |
102 | #include <termios.h> | 143 | #include <termios.h> |
103 | #define TTY_STRUCT struct termios | 144 | #define TTY_STRUCT struct termios |
@@ -122,16 +163,16 @@ | |||
122 | #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data) | 163 | #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data) |
123 | #endif | 164 | #endif |
124 | 165 | ||
125 | #if !defined(_LIBC) && !defined(MSDOS) && !defined(VMS) | 166 | #if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(MAC_OS_pre_X) |
126 | #include <sys/ioctl.h> | 167 | #include <sys/ioctl.h> |
127 | #endif | 168 | #endif |
128 | 169 | ||
129 | #ifdef MSDOS | 170 | #if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__) |
130 | #include <conio.h> | 171 | #include <conio.h> |
131 | #define fgets(a,b,c) noecho_fgets(a,b,c) | 172 | #define fgets(a,b,c) noecho_fgets(a,b,c) |
132 | #endif | 173 | #endif |
133 | 174 | ||
134 | #ifdef VMS | 175 | #ifdef OPENSSL_SYS_VMS |
135 | #include <ssdef.h> | 176 | #include <ssdef.h> |
136 | #include <iodef.h> | 177 | #include <iodef.h> |
137 | #include <ttdef.h> | 178 | #include <ttdef.h> |
@@ -143,44 +184,35 @@ struct IOSB { | |||
143 | }; | 184 | }; |
144 | #endif | 185 | #endif |
145 | 186 | ||
187 | #if defined(MAC_OS_pre_X) || defined(MAC_OS_GUSI_SOURCE) | ||
188 | /* | ||
189 | * This one needs work. As a matter of fact the code is unoperational | ||
190 | * and this is only a trick to get it compiled. | ||
191 | * <appro@fy.chalmers.se> | ||
192 | */ | ||
193 | #define TTY_STRUCT int | ||
194 | #endif | ||
195 | |||
146 | #ifndef NX509_SIG | 196 | #ifndef NX509_SIG |
147 | #define NX509_SIG 32 | 197 | #define NX509_SIG 32 |
148 | #endif | 198 | #endif |
149 | 199 | ||
150 | #ifndef NOPROTO | ||
151 | static void read_till_nl(FILE *); | 200 | static void read_till_nl(FILE *); |
152 | static void recsig(int); | 201 | static void recsig(int); |
153 | static void pushsig(void); | 202 | static void pushsig(void); |
154 | static void popsig(void); | 203 | static void popsig(void); |
155 | #if defined(MSDOS) && !defined(WIN16) | 204 | #if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16) |
156 | static int noecho_fgets(char *buf, int size, FILE *tty); | 205 | static int noecho_fgets(char *buf, int size, FILE *tty); |
157 | #endif | 206 | #endif |
158 | #else | ||
159 | static void read_till_nl(); | ||
160 | static void recsig(); | ||
161 | static void pushsig(); | ||
162 | static void popsig(); | ||
163 | #if defined(MSDOS) && !defined(WIN16) | ||
164 | static int noecho_fgets(); | ||
165 | #endif | ||
166 | #endif | ||
167 | |||
168 | #ifdef SIGACTION | 207 | #ifdef SIGACTION |
169 | static struct sigaction savsig[NX509_SIG]; | 208 | static struct sigaction savsig[NX509_SIG]; |
170 | #else | 209 | #else |
171 | # ifndef NOPROTO | ||
172 | static void (*savsig[NX509_SIG])(int ); | 210 | static void (*savsig[NX509_SIG])(int ); |
173 | # else | ||
174 | static void (*savsig[NX509_SIG])(); | ||
175 | # endif | ||
176 | #endif | 211 | #endif |
177 | static jmp_buf save; | 212 | static jmp_buf save; |
178 | 213 | ||
179 | int des_read_pw_string(buf, length, prompt, verify) | 214 | int des_read_pw_string(char *buf, int length, const char *prompt, |
180 | char *buf; | 215 | int verify) |
181 | int length; | ||
182 | char *prompt; | ||
183 | int verify; | ||
184 | { | 216 | { |
185 | char buff[BUFSIZ]; | 217 | char buff[BUFSIZ]; |
186 | int ret; | 218 | int ret; |
@@ -190,10 +222,9 @@ int verify; | |||
190 | return(ret); | 222 | return(ret); |
191 | } | 223 | } |
192 | 224 | ||
193 | #ifndef WIN16 | 225 | #ifndef OPENSSL_SYS_WIN16 |
194 | 226 | ||
195 | static void read_till_nl(in) | 227 | static void read_till_nl(FILE *in) |
196 | FILE *in; | ||
197 | { | 228 | { |
198 | #define SIZE 4 | 229 | #define SIZE 4 |
199 | char buf[SIZE+1]; | 230 | char buf[SIZE+1]; |
@@ -205,41 +236,54 @@ FILE *in; | |||
205 | 236 | ||
206 | 237 | ||
207 | /* return 0 if ok, 1 (or -1) otherwise */ | 238 | /* return 0 if ok, 1 (or -1) otherwise */ |
208 | int des_read_pw(buf, buff, size, prompt, verify) | 239 | int des_read_pw(char *buf, char *buff, int size, const char *prompt, |
209 | char *buf; | 240 | int verify) |
210 | char *buff; | ||
211 | int size; | ||
212 | char *prompt; | ||
213 | int verify; | ||
214 | { | 241 | { |
215 | #ifdef VMS | 242 | #ifdef OPENSSL_SYS_VMS |
216 | struct IOSB iosb; | 243 | struct IOSB iosb; |
217 | $DESCRIPTOR(terminal,"TT"); | 244 | $DESCRIPTOR(terminal,"TT"); |
218 | long tty_orig[3], tty_new[3]; | 245 | long tty_orig[3], tty_new[3]; |
219 | long status; | 246 | long status; |
220 | unsigned short channel = 0; | 247 | unsigned short channel = 0; |
221 | #else | 248 | #else |
222 | #ifndef MSDOS | 249 | #ifndef OPENSSL_SYS_MSDOS |
223 | TTY_STRUCT tty_orig,tty_new; | 250 | TTY_STRUCT tty_orig,tty_new; |
224 | #endif | 251 | #endif |
225 | #endif | 252 | #endif |
226 | int number=5; | 253 | int number; |
227 | int ok=0; | 254 | int ok; |
228 | int ps=0; | 255 | /* statics are simply to avoid warnings about longjmp clobbering |
229 | int is_a_tty=1; | 256 | things */ |
230 | 257 | static int ps; | |
231 | FILE *tty=NULL; | 258 | int is_a_tty; |
259 | static FILE *tty; | ||
232 | char *p; | 260 | char *p; |
233 | 261 | ||
234 | #ifndef MSDOS | 262 | if (setjmp(save)) |
235 | if ((tty=fopen("/dev/tty","r")) == NULL) | 263 | { |
236 | tty=stdin; | 264 | ok=0; |
237 | #else /* MSDOS */ | 265 | goto error; |
266 | } | ||
267 | |||
268 | number=5; | ||
269 | ok=0; | ||
270 | ps=0; | ||
271 | is_a_tty=1; | ||
272 | tty=NULL; | ||
273 | |||
274 | #ifdef OPENSSL_SYS_MSDOS | ||
238 | if ((tty=fopen("con","r")) == NULL) | 275 | if ((tty=fopen("con","r")) == NULL) |
239 | tty=stdin; | 276 | tty=stdin; |
240 | #endif /* MSDOS */ | 277 | #elif defined(MAC_OS_pre_X) || defined(OPENSSL_SYS_VSWORKS) |
278 | tty=stdin; | ||
279 | #else | ||
280 | #ifndef OPENSSL_SYS_MPE | ||
281 | if ((tty=fopen("/dev/tty","r")) == NULL) | ||
282 | #endif | ||
283 | tty=stdin; | ||
284 | #endif | ||
241 | 285 | ||
242 | #if defined(TTY_get) && !defined(VMS) | 286 | #if defined(TTY_get) && !defined(OPENSSL_SYS_VMS) |
243 | if (TTY_get(fileno(tty),&tty_orig) == -1) | 287 | if (TTY_get(fileno(tty),&tty_orig) == -1) |
244 | { | 288 | { |
245 | #ifdef ENOTTY | 289 | #ifdef ENOTTY |
@@ -258,20 +302,15 @@ int verify; | |||
258 | } | 302 | } |
259 | memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig)); | 303 | memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig)); |
260 | #endif | 304 | #endif |
261 | #ifdef VMS | 305 | #ifdef OPENSSL_SYS_VMS |
262 | status = SYS$ASSIGN(&terminal,&channel,0,0); | 306 | status = sys$assign(&terminal,&channel,0,0); |
263 | if (status != SS$_NORMAL) | 307 | if (status != SS$_NORMAL) |
264 | return(-1); | 308 | return(-1); |
265 | status=SYS$QIOW(0,channel,IO$_SENSEMODE,&iosb,0,0,tty_orig,12,0,0,0,0); | 309 | status=sys$qiow(0,channel,IO$_SENSEMODE,&iosb,0,0,tty_orig,12,0,0,0,0); |
266 | if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) | 310 | if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) |
267 | return(-1); | 311 | return(-1); |
268 | #endif | 312 | #endif |
269 | 313 | ||
270 | if (setjmp(save)) | ||
271 | { | ||
272 | ok=0; | ||
273 | goto error; | ||
274 | } | ||
275 | pushsig(); | 314 | pushsig(); |
276 | ps=1; | 315 | ps=1; |
277 | 316 | ||
@@ -279,15 +318,19 @@ int verify; | |||
279 | tty_new.TTY_FLAGS &= ~ECHO; | 318 | tty_new.TTY_FLAGS &= ~ECHO; |
280 | #endif | 319 | #endif |
281 | 320 | ||
282 | #if defined(TTY_set) && !defined(VMS) | 321 | #if defined(TTY_set) && !defined(OPENSSL_SYS_VMS) |
283 | if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1)) | 322 | if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1)) |
323 | #ifdef OPENSSL_SYS_MPE | ||
324 | ; /* MPE lies -- echo really has been disabled */ | ||
325 | #else | ||
284 | return(-1); | 326 | return(-1); |
285 | #endif | 327 | #endif |
286 | #ifdef VMS | 328 | #endif |
329 | #ifdef OPENSSL_SYS_VMS | ||
287 | tty_new[0] = tty_orig[0]; | 330 | tty_new[0] = tty_orig[0]; |
288 | tty_new[1] = tty_orig[1] | TT$M_NOECHO; | 331 | tty_new[1] = tty_orig[1] | TT$M_NOECHO; |
289 | tty_new[2] = tty_orig[2]; | 332 | tty_new[2] = tty_orig[2]; |
290 | status = SYS$QIOW(0,channel,IO$_SETMODE,&iosb,0,0,tty_new,12,0,0,0,0); | 333 | status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0,tty_new,12,0,0,0,0); |
291 | if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) | 334 | if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) |
292 | return(-1); | 335 | return(-1); |
293 | #endif | 336 | #endif |
@@ -329,35 +372,30 @@ int verify; | |||
329 | 372 | ||
330 | error: | 373 | error: |
331 | fprintf(stderr,"\n"); | 374 | fprintf(stderr,"\n"); |
332 | #ifdef DEBUG | 375 | #if 0 |
333 | perror("fgets(tty)"); | 376 | perror("fgets(tty)"); |
334 | #endif | 377 | #endif |
335 | /* What can we do if there is an error? */ | 378 | /* What can we do if there is an error? */ |
336 | #if defined(TTY_set) && !defined(VMS) | 379 | #if defined(TTY_set) && !defined(OPENSSL_SYS_VMS) |
337 | if (ps >= 2) TTY_set(fileno(tty),&tty_orig); | 380 | if (ps >= 2) TTY_set(fileno(tty),&tty_orig); |
338 | #endif | 381 | #endif |
339 | #ifdef VMS | 382 | #ifdef OPENSSL_SYS_VMS |
340 | if (ps >= 2) | 383 | if (ps >= 2) |
341 | status = SYS$QIOW(0,channel,IO$_SETMODE,&iosb,0,0 | 384 | status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0 |
342 | ,tty_orig,12,0,0,0,0); | 385 | ,tty_orig,12,0,0,0,0); |
343 | #endif | 386 | #endif |
344 | 387 | ||
345 | if (ps >= 1) popsig(); | 388 | if (ps >= 1) popsig(); |
346 | if (stdin != tty) fclose(tty); | 389 | if (stdin != tty) fclose(tty); |
347 | #ifdef VMS | 390 | #ifdef OPENSSL_SYS_VMS |
348 | status = SYS$DASSGN(channel); | 391 | status = sys$dassgn(channel); |
349 | #endif | 392 | #endif |
350 | return(!ok); | 393 | return(!ok); |
351 | } | 394 | } |
352 | 395 | ||
353 | #else /* WIN16 */ | 396 | #else /* OPENSSL_SYS_WIN16 */ |
354 | 397 | ||
355 | int des_read_pw(buf, buff, size, prompt, verify) | 398 | int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify) |
356 | char *buf; | ||
357 | char *buff; | ||
358 | int size; | ||
359 | char *prompt; | ||
360 | int verify; | ||
361 | { | 399 | { |
362 | memset(buf,0,size); | 400 | memset(buf,0,size); |
363 | memset(buff,0,size); | 401 | memset(buff,0,size); |
@@ -366,9 +404,15 @@ int verify; | |||
366 | 404 | ||
367 | #endif | 405 | #endif |
368 | 406 | ||
369 | static void pushsig() | 407 | static void pushsig(void) |
370 | { | 408 | { |
371 | int i; | 409 | int i; |
410 | #ifdef SIGACTION | ||
411 | struct sigaction sa; | ||
412 | |||
413 | memset(&sa,0,sizeof sa); | ||
414 | sa.sa_handler=recsig; | ||
415 | #endif | ||
372 | 416 | ||
373 | for (i=1; i<NX509_SIG; i++) | 417 | for (i=1; i<NX509_SIG; i++) |
374 | { | 418 | { |
@@ -381,7 +425,7 @@ static void pushsig() | |||
381 | continue; | 425 | continue; |
382 | #endif | 426 | #endif |
383 | #ifdef SIGACTION | 427 | #ifdef SIGACTION |
384 | sigaction(i,NULL,&savsig[i]); | 428 | sigaction(i,&sa,&savsig[i]); |
385 | #else | 429 | #else |
386 | savsig[i]=signal(i,recsig); | 430 | savsig[i]=signal(i,recsig); |
387 | #endif | 431 | #endif |
@@ -392,7 +436,7 @@ static void pushsig() | |||
392 | #endif | 436 | #endif |
393 | } | 437 | } |
394 | 438 | ||
395 | static void popsig() | 439 | static void popsig(void) |
396 | { | 440 | { |
397 | int i; | 441 | int i; |
398 | 442 | ||
@@ -414,8 +458,7 @@ static void popsig() | |||
414 | } | 458 | } |
415 | } | 459 | } |
416 | 460 | ||
417 | static void recsig(i) | 461 | static void recsig(int i) |
418 | int i; | ||
419 | { | 462 | { |
420 | longjmp(save,1); | 463 | longjmp(save,1); |
421 | #ifdef LINT | 464 | #ifdef LINT |
@@ -423,11 +466,8 @@ int i; | |||
423 | #endif | 466 | #endif |
424 | } | 467 | } |
425 | 468 | ||
426 | #if defined(MSDOS) && !defined(WIN16) | 469 | #if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16) |
427 | static int noecho_fgets(buf,size,tty) | 470 | static int noecho_fgets(char *buf, int size, FILE *tty) |
428 | char *buf; | ||
429 | int size; | ||
430 | FILE *tty; | ||
431 | { | 471 | { |
432 | int i; | 472 | int i; |
433 | char *p; | 473 | char *p; |
@@ -454,6 +494,18 @@ FILE *tty; | |||
454 | break; | 494 | break; |
455 | } | 495 | } |
456 | } | 496 | } |
497 | #ifdef WIN_CONSOLE_BUG | ||
498 | /* Win95 has several evil console bugs: one of these is that the | ||
499 | * last character read using getch() is passed to the next read: this is | ||
500 | * usually a CR so this can be trouble. No STDIO fix seems to work but | ||
501 | * flushing the console appears to do the trick. | ||
502 | */ | ||
503 | { | ||
504 | HANDLE inh; | ||
505 | inh = GetStdHandle(STD_INPUT_HANDLE); | ||
506 | FlushConsoleInputBuffer(inh); | ||
507 | } | ||
508 | #endif | ||
457 | return(strlen(buf)); | 509 | return(strlen(buf)); |
458 | } | 510 | } |
459 | #endif | 511 | #endif |
diff --git a/src/lib/libcrypto/des/rpc_enc.c b/src/lib/libcrypto/des/rpc_enc.c index 7c1da1f538..d937d08da5 100644 --- a/src/lib/libcrypto/des/rpc_enc.c +++ b/src/lib/libcrypto/des/rpc_enc.c | |||
@@ -60,32 +60,23 @@ | |||
60 | #include "des_locl.h" | 60 | #include "des_locl.h" |
61 | #include "des_ver.h" | 61 | #include "des_ver.h" |
62 | 62 | ||
63 | #ifndef NOPROTO | ||
64 | int _des_crypt(char *buf,int len,struct desparams *desp); | 63 | int _des_crypt(char *buf,int len,struct desparams *desp); |
65 | #else | 64 | int _des_crypt(char *buf, int len, struct desparams *desp) |
66 | int _des_crypt(); | ||
67 | #endif | ||
68 | |||
69 | int _des_crypt(buf, len, desp) | ||
70 | char *buf; | ||
71 | int len; | ||
72 | struct desparams *desp; | ||
73 | { | 65 | { |
74 | des_key_schedule ks; | 66 | DES_key_schedule ks; |
75 | int enc; | 67 | int enc; |
76 | 68 | ||
77 | des_set_key((des_cblock *)desp->des_key,ks); | 69 | DES_set_key_unchecked(&desp->des_key,&ks); |
78 | enc=(desp->des_dir == ENCRYPT)?DES_ENCRYPT:DES_DECRYPT; | 70 | enc=(desp->des_dir == ENCRYPT)?DES_ENCRYPT:DES_DECRYPT; |
79 | 71 | ||
80 | if (desp->des_mode == CBC) | 72 | if (desp->des_mode == CBC) |
81 | des_ecb_encrypt((des_cblock *)desp->UDES.UDES_buf, | 73 | DES_ecb_encrypt((const_DES_cblock *)desp->UDES.UDES_buf, |
82 | (des_cblock *)desp->UDES.UDES_buf,ks,enc); | 74 | (DES_cblock *)desp->UDES.UDES_buf,&ks, |
75 | enc); | ||
83 | else | 76 | else |
84 | { | 77 | { |
85 | des_ncbc_encrypt((des_cblock *)desp->UDES.UDES_buf, | 78 | DES_ncbc_encrypt(desp->UDES.UDES_buf,desp->UDES.UDES_buf, |
86 | (des_cblock *)desp->UDES.UDES_buf, | 79 | len,&ks,&desp->des_ivec,enc); |
87 | (long)len,ks, | ||
88 | (des_cblock *)desp->des_ivec,enc); | ||
89 | #ifdef undef | 80 | #ifdef undef |
90 | /* len will always be %8 if called from common_crypt | 81 | /* len will always be %8 if called from common_crypt |
91 | * in secure_rpc. | 82 | * in secure_rpc. |
diff --git a/src/lib/libcrypto/des/rpw.c b/src/lib/libcrypto/des/rpw.c index 6447ed9cf0..8a9473c4f9 100644 --- a/src/lib/libcrypto/des/rpw.c +++ b/src/lib/libcrypto/des/rpw.c | |||
@@ -57,17 +57,15 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "des.h" | 60 | #include <openssl/des.h> |
61 | 61 | ||
62 | int main(argc,argv) | 62 | int main(int argc, char *argv[]) |
63 | int argc; | ||
64 | char *argv[]; | ||
65 | { | 63 | { |
66 | des_cblock k,k1; | 64 | DES_cblock k,k1; |
67 | int i; | 65 | int i; |
68 | 66 | ||
69 | printf("read passwd\n"); | 67 | printf("read passwd\n"); |
70 | if ((i=des_read_password((C_Block *)k,"Enter password:",0)) == 0) | 68 | if ((i=des_read_password(&k,"Enter password:",0)) == 0) |
71 | { | 69 | { |
72 | printf("password = "); | 70 | printf("password = "); |
73 | for (i=0; i<8; i++) | 71 | for (i=0; i<8; i++) |
@@ -77,7 +75,7 @@ char *argv[]; | |||
77 | printf("error %d\n",i); | 75 | printf("error %d\n",i); |
78 | printf("\n"); | 76 | printf("\n"); |
79 | printf("read 2passwds and verify\n"); | 77 | printf("read 2passwds and verify\n"); |
80 | if ((i=des_read_2passwords((C_Block *)k,(C_Block *)k1, | 78 | if ((i=des_read_2passwords(&k,&k1, |
81 | "Enter verified password:",1)) == 0) | 79 | "Enter verified password:",1)) == 0) |
82 | { | 80 | { |
83 | printf("password1 = "); | 81 | printf("password1 = "); |
diff --git a/src/lib/libcrypto/des/speed.c b/src/lib/libcrypto/des/speed.c index 5bbe8b01d6..48fc1d49fc 100644 --- a/src/lib/libcrypto/des/speed.c +++ b/src/lib/libcrypto/des/speed.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,35 +77,32 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "des.h" | 99 | #include <openssl/des.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | # ifndef CLK_TCK | 103 | # ifndef CLK_TCK |
105 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ | 104 | # ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ |
106 | # ifndef VMS | 105 | # define HZ 100.0 |
107 | # define HZ 100.0 | ||
108 | # else /* VMS */ | ||
109 | # define HZ 100.0 | ||
110 | # endif | ||
111 | # else /* _BSD_CLK_TCK_ */ | 106 | # else /* _BSD_CLK_TCK_ */ |
112 | # define HZ ((double)_BSD_CLK_TCK_) | 107 | # define HZ ((double)_BSD_CLK_TCK_) |
113 | # endif | 108 | # endif |
@@ -119,12 +114,7 @@ struct tms { | |||
119 | #define BUFSIZE ((long)1024) | 114 | #define BUFSIZE ((long)1024) |
120 | long run=0; | 115 | long run=0; |
121 | 116 | ||
122 | #ifndef NOPROTO | ||
123 | double Time_F(int s); | 117 | double Time_F(int s); |
124 | #else | ||
125 | double Time_F(); | ||
126 | #endif | ||
127 | |||
128 | #ifdef SIGALRM | 118 | #ifdef SIGALRM |
129 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 119 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
130 | #define SIGRETTYPE void | 120 | #define SIGRETTYPE void |
@@ -132,14 +122,8 @@ double Time_F(); | |||
132 | #define SIGRETTYPE int | 122 | #define SIGRETTYPE int |
133 | #endif | 123 | #endif |
134 | 124 | ||
135 | #ifndef NOPROTO | ||
136 | SIGRETTYPE sig_done(int sig); | 125 | SIGRETTYPE sig_done(int sig); |
137 | #else | 126 | SIGRETTYPE sig_done(int sig) |
138 | SIGRETTYPE sig_done(); | ||
139 | #endif | ||
140 | |||
141 | SIGRETTYPE sig_done(sig) | ||
142 | int sig; | ||
143 | { | 127 | { |
144 | signal(SIGALRM,sig_done); | 128 | signal(SIGALRM,sig_done); |
145 | run=0; | 129 | run=0; |
@@ -152,8 +136,7 @@ int sig; | |||
152 | #define START 0 | 136 | #define START 0 |
153 | #define STOP 1 | 137 | #define STOP 1 |
154 | 138 | ||
155 | double Time_F(s) | 139 | double Time_F(int s) |
156 | int s; | ||
157 | { | 140 | { |
158 | double ret; | 141 | double ret; |
159 | #ifdef TIMES | 142 | #ifdef TIMES |
@@ -189,32 +172,30 @@ int s; | |||
189 | #endif | 172 | #endif |
190 | } | 173 | } |
191 | 174 | ||
192 | int main(argc,argv) | 175 | int main(int argc, char **argv) |
193 | int argc; | ||
194 | char **argv; | ||
195 | { | 176 | { |
196 | long count; | 177 | long count; |
197 | static unsigned char buf[BUFSIZE]; | 178 | static unsigned char buf[BUFSIZE]; |
198 | static des_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; | 179 | static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; |
199 | static des_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; | 180 | static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12}; |
200 | static des_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; | 181 | static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34}; |
201 | des_key_schedule sch,sch2,sch3; | 182 | DES_key_schedule sch,sch2,sch3; |
202 | double a,b,c,d,e; | 183 | double a,b,c,d,e; |
203 | #ifndef SIGALRM | 184 | #ifndef SIGALRM |
204 | long ca,cb,cc,cd,ce; | 185 | long ca,cb,cc,cd,ce; |
205 | #endif | 186 | #endif |
206 | 187 | ||
207 | #ifndef TIMES | 188 | #ifndef TIMES |
208 | printf("To get the most acurate results, try to run this\n"); | 189 | printf("To get the most accurate results, try to run this\n"); |
209 | printf("program when this computer is idle.\n"); | 190 | printf("program when this computer is idle.\n"); |
210 | #endif | 191 | #endif |
211 | 192 | ||
212 | des_set_key((C_Block *)key2,sch2); | 193 | DES_set_key_unchecked(&key2,&sch2); |
213 | des_set_key((C_Block *)key3,sch3); | 194 | DES_set_key_unchecked(&key3,&sch3); |
214 | 195 | ||
215 | #ifndef SIGALRM | 196 | #ifndef SIGALRM |
216 | printf("First we calculate the approximate speed ...\n"); | 197 | printf("First we calculate the approximate speed ...\n"); |
217 | des_set_key((C_Block *)key,sch); | 198 | DES_set_key_unchecked(&key,&sch); |
218 | count=10; | 199 | count=10; |
219 | do { | 200 | do { |
220 | long i; | 201 | long i; |
@@ -223,7 +204,7 @@ char **argv; | |||
223 | count*=2; | 204 | count*=2; |
224 | Time_F(START); | 205 | Time_F(START); |
225 | for (i=count; i; i--) | 206 | for (i=count; i; i--) |
226 | des_encrypt(data,&(sch[0]),DES_ENCRYPT); | 207 | DES_encrypt1(data,&sch,DES_ENCRYPT); |
227 | d=Time_F(STOP); | 208 | d=Time_F(STOP); |
228 | } while (d < 3.0); | 209 | } while (d < 3.0); |
229 | ca=count; | 210 | ca=count; |
@@ -244,63 +225,63 @@ char **argv; | |||
244 | 225 | ||
245 | Time_F(START); | 226 | Time_F(START); |
246 | for (count=0,run=1; COND(ca); count++) | 227 | for (count=0,run=1; COND(ca); count++) |
247 | des_set_key((C_Block *)key,sch); | 228 | DES_set_key_unchecked(&key,&sch); |
248 | d=Time_F(STOP); | 229 | d=Time_F(STOP); |
249 | printf("%ld set_key's in %.2f seconds\n",count,d); | 230 | printf("%ld set_key's in %.2f seconds\n",count,d); |
250 | a=((double)COUNT(ca))/d; | 231 | a=((double)COUNT(ca))/d; |
251 | 232 | ||
252 | #ifdef SIGALRM | 233 | #ifdef SIGALRM |
253 | printf("Doing des_encrypt's for 10 seconds\n"); | 234 | printf("Doing DES_encrypt's for 10 seconds\n"); |
254 | alarm(10); | 235 | alarm(10); |
255 | #else | 236 | #else |
256 | printf("Doing des_encrypt %ld times\n",cb); | 237 | printf("Doing DES_encrypt %ld times\n",cb); |
257 | #endif | 238 | #endif |
258 | Time_F(START); | 239 | Time_F(START); |
259 | for (count=0,run=1; COND(cb); count++) | 240 | for (count=0,run=1; COND(cb); count++) |
260 | { | 241 | { |
261 | DES_LONG data[2]; | 242 | DES_LONG data[2]; |
262 | 243 | ||
263 | des_encrypt(data,&(sch[0]),DES_ENCRYPT); | 244 | DES_encrypt1(data,&sch,DES_ENCRYPT); |
264 | } | 245 | } |
265 | d=Time_F(STOP); | 246 | d=Time_F(STOP); |
266 | printf("%ld des_encrypt's in %.2f second\n",count,d); | 247 | printf("%ld DES_encrypt's in %.2f second\n",count,d); |
267 | b=((double)COUNT(cb)*8)/d; | 248 | b=((double)COUNT(cb)*8)/d; |
268 | 249 | ||
269 | #ifdef SIGALRM | 250 | #ifdef SIGALRM |
270 | printf("Doing des_cbc_encrypt on %ld byte blocks for 10 seconds\n", | 251 | printf("Doing DES_cbc_encrypt on %ld byte blocks for 10 seconds\n", |
271 | BUFSIZE); | 252 | BUFSIZE); |
272 | alarm(10); | 253 | alarm(10); |
273 | #else | 254 | #else |
274 | printf("Doing des_cbc_encrypt %ld times on %ld byte blocks\n",cc, | 255 | printf("Doing DES_cbc_encrypt %ld times on %ld byte blocks\n",cc, |
275 | BUFSIZE); | 256 | BUFSIZE); |
276 | #endif | 257 | #endif |
277 | Time_F(START); | 258 | Time_F(START); |
278 | for (count=0,run=1; COND(cc); count++) | 259 | for (count=0,run=1; COND(cc); count++) |
279 | des_ncbc_encrypt((C_Block *)buf,(C_Block *)buf,BUFSIZE,&(sch[0]), | 260 | DES_ncbc_encrypt(buf,buf,BUFSIZE,&sch, |
280 | (C_Block *)&(key[0]),DES_ENCRYPT); | 261 | &key,DES_ENCRYPT); |
281 | d=Time_F(STOP); | 262 | d=Time_F(STOP); |
282 | printf("%ld des_cbc_encrypt's of %ld byte blocks in %.2f second\n", | 263 | printf("%ld DES_cbc_encrypt's of %ld byte blocks in %.2f second\n", |
283 | count,BUFSIZE,d); | 264 | count,BUFSIZE,d); |
284 | c=((double)COUNT(cc)*BUFSIZE)/d; | 265 | c=((double)COUNT(cc)*BUFSIZE)/d; |
285 | 266 | ||
286 | #ifdef SIGALRM | 267 | #ifdef SIGALRM |
287 | printf("Doing des_ede_cbc_encrypt on %ld byte blocks for 10 seconds\n", | 268 | printf("Doing DES_ede_cbc_encrypt on %ld byte blocks for 10 seconds\n", |
288 | BUFSIZE); | 269 | BUFSIZE); |
289 | alarm(10); | 270 | alarm(10); |
290 | #else | 271 | #else |
291 | printf("Doing des_ede_cbc_encrypt %ld times on %ld byte blocks\n",cd, | 272 | printf("Doing DES_ede_cbc_encrypt %ld times on %ld byte blocks\n",cd, |
292 | BUFSIZE); | 273 | BUFSIZE); |
293 | #endif | 274 | #endif |
294 | Time_F(START); | 275 | Time_F(START); |
295 | for (count=0,run=1; COND(cd); count++) | 276 | for (count=0,run=1; COND(cd); count++) |
296 | des_ede3_cbc_encrypt((C_Block *)buf,(C_Block *)buf,BUFSIZE, | 277 | DES_ede3_cbc_encrypt(buf,buf,BUFSIZE, |
297 | &(sch[0]), | 278 | &sch, |
298 | &(sch2[0]), | 279 | &sch2, |
299 | &(sch3[0]), | 280 | &sch3, |
300 | (C_Block *)&(key[0]), | 281 | &key, |
301 | DES_ENCRYPT); | 282 | DES_ENCRYPT); |
302 | d=Time_F(STOP); | 283 | d=Time_F(STOP); |
303 | printf("%ld des_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n", | 284 | printf("%ld DES_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n", |
304 | count,BUFSIZE,d); | 285 | count,BUFSIZE,d); |
305 | d=((double)COUNT(cd)*BUFSIZE)/d; | 286 | d=((double)COUNT(cd)*BUFSIZE)/d; |
306 | 287 | ||
@@ -323,7 +304,7 @@ char **argv; | |||
323 | printf("DES ede cbc bytes per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d); | 304 | printf("DES ede cbc bytes per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d); |
324 | printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e); | 305 | printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e); |
325 | exit(0); | 306 | exit(0); |
326 | #if defined(LINT) || defined(MSDOS) | 307 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
327 | return(0); | 308 | return(0); |
328 | #endif | 309 | #endif |
329 | } | 310 | } |
diff --git a/src/lib/libcrypto/dh/dhtest.c b/src/lib/libcrypto/dh/dhtest.c index 488f10fd41..34894ced73 100644 --- a/src/lib/libcrypto/dh/dhtest.c +++ b/src/lib/libcrypto/dh/dhtest.c | |||
@@ -59,53 +59,74 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #ifdef WINDOWS | 62 | #ifdef OPENSSL_SYS_WINDOWS |
63 | #include "../bio/bss_file.c" | 63 | #include "../bio/bss_file.c" |
64 | #endif | 64 | #endif |
65 | #include "crypto.h" | 65 | #include <openssl/crypto.h> |
66 | #include "bio.h" | 66 | #include <openssl/bio.h> |
67 | #include "bn.h" | 67 | #include <openssl/bn.h> |
68 | #include "dh.h" | 68 | #include <openssl/rand.h> |
69 | #include <openssl/err.h> | ||
70 | |||
71 | #ifdef OPENSSL_NO_DH | ||
72 | int main(int argc, char *argv[]) | ||
73 | { | ||
74 | printf("No DH support\n"); | ||
75 | return(0); | ||
76 | } | ||
77 | #else | ||
78 | #include <openssl/dh.h> | ||
69 | 79 | ||
70 | #ifdef WIN16 | 80 | #ifdef OPENSSL_SYS_WIN16 |
71 | #define MS_CALLBACK _far _loadds | 81 | #define MS_CALLBACK _far _loadds |
72 | #else | 82 | #else |
73 | #define MS_CALLBACK | 83 | #define MS_CALLBACK |
74 | #endif | 84 | #endif |
75 | 85 | ||
76 | #ifndef NOPROTO | 86 | static void MS_CALLBACK cb(int p, int n, void *arg); |
77 | static void MS_CALLBACK cb(int p, int n, char *arg); | 87 | #ifdef OPENSSL_NO_STDIO |
78 | #else | ||
79 | static void MS_CALLBACK cb(); | ||
80 | #endif | ||
81 | |||
82 | #ifdef NO_STDIO | ||
83 | #define APPS_WIN16 | 88 | #define APPS_WIN16 |
84 | #include "bss_file.c" | 89 | #include "bss_file.c" |
85 | #endif | 90 | #endif |
86 | 91 | ||
87 | BIO *out=NULL; | 92 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; |
88 | 93 | ||
89 | int main(argc,argv) | 94 | int main(int argc, char *argv[]) |
90 | int argc; | ||
91 | char *argv[]; | ||
92 | { | 95 | { |
93 | DH *a,*b; | 96 | DH *a; |
97 | DH *b=NULL; | ||
94 | char buf[12]; | 98 | char buf[12]; |
95 | unsigned char *abuf=NULL,*bbuf=NULL; | 99 | unsigned char *abuf=NULL,*bbuf=NULL; |
96 | int i,alen,blen,aout,bout,ret=1; | 100 | int i,alen,blen,aout,bout,ret=1; |
101 | BIO *out; | ||
97 | 102 | ||
98 | #ifdef WIN32 | 103 | CRYPTO_malloc_debug_init(); |
104 | CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); | ||
105 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
106 | |||
107 | #ifdef OPENSSL_SYS_WIN32 | ||
99 | CRYPTO_malloc_init(); | 108 | CRYPTO_malloc_init(); |
100 | #endif | 109 | #endif |
101 | 110 | ||
111 | RAND_seed(rnd_seed, sizeof rnd_seed); | ||
112 | |||
102 | out=BIO_new(BIO_s_file()); | 113 | out=BIO_new(BIO_s_file()); |
103 | if (out == NULL) exit(1); | 114 | if (out == NULL) exit(1); |
104 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 115 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
105 | 116 | ||
106 | a=DH_generate_parameters(64,DH_GENERATOR_5,cb,(char *)out); | 117 | a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out); |
107 | if (a == NULL) goto err; | 118 | if (a == NULL) goto err; |
108 | 119 | ||
120 | if (!DH_check(a, &i)) goto err; | ||
121 | if (i & DH_CHECK_P_NOT_PRIME) | ||
122 | BIO_puts(out, "p value is not prime\n"); | ||
123 | if (i & DH_CHECK_P_NOT_SAFE_PRIME) | ||
124 | BIO_puts(out, "p value is not a safe prime\n"); | ||
125 | if (i & DH_UNABLE_TO_CHECK_GENERATOR) | ||
126 | BIO_puts(out, "unable to check the generator value\n"); | ||
127 | if (i & DH_NOT_SUITABLE_GENERATOR) | ||
128 | BIO_puts(out, "the g value is not a generator\n"); | ||
129 | |||
109 | BIO_puts(out,"\np ="); | 130 | BIO_puts(out,"\np ="); |
110 | BN_print(out,a->p); | 131 | BN_print(out,a->p); |
111 | BIO_puts(out,"\ng ="); | 132 | BIO_puts(out,"\ng ="); |
@@ -134,7 +155,7 @@ char *argv[]; | |||
134 | BIO_puts(out,"\n"); | 155 | BIO_puts(out,"\n"); |
135 | 156 | ||
136 | alen=DH_size(a); | 157 | alen=DH_size(a); |
137 | abuf=(unsigned char *)Malloc(alen); | 158 | abuf=(unsigned char *)OPENSSL_malloc(alen); |
138 | aout=DH_compute_key(abuf,b->pub_key,a); | 159 | aout=DH_compute_key(abuf,b->pub_key,a); |
139 | 160 | ||
140 | BIO_puts(out,"key1 ="); | 161 | BIO_puts(out,"key1 ="); |
@@ -146,7 +167,7 @@ char *argv[]; | |||
146 | BIO_puts(out,"\n"); | 167 | BIO_puts(out,"\n"); |
147 | 168 | ||
148 | blen=DH_size(b); | 169 | blen=DH_size(b); |
149 | bbuf=(unsigned char *)Malloc(blen); | 170 | bbuf=(unsigned char *)OPENSSL_malloc(blen); |
150 | bout=DH_compute_key(bbuf,a->pub_key,b); | 171 | bout=DH_compute_key(bbuf,a->pub_key,b); |
151 | 172 | ||
152 | BIO_puts(out,"key2 ="); | 173 | BIO_puts(out,"key2 ="); |
@@ -164,16 +185,21 @@ char *argv[]; | |||
164 | else | 185 | else |
165 | ret=0; | 186 | ret=0; |
166 | err: | 187 | err: |
167 | if (abuf != NULL) Free(abuf); | 188 | ERR_print_errors_fp(stderr); |
168 | if (bbuf != NULL) Free(bbuf); | 189 | |
190 | if (abuf != NULL) OPENSSL_free(abuf); | ||
191 | if (bbuf != NULL) OPENSSL_free(bbuf); | ||
192 | if(b != NULL) DH_free(b); | ||
193 | if(a != NULL) DH_free(a); | ||
194 | BIO_free(out); | ||
195 | CRYPTO_cleanup_all_ex_data(); | ||
196 | ERR_remove_state(0); | ||
197 | CRYPTO_mem_leaks_fp(stderr); | ||
169 | exit(ret); | 198 | exit(ret); |
170 | return(ret); | 199 | return(ret); |
171 | } | 200 | } |
172 | 201 | ||
173 | static void MS_CALLBACK cb(p, n,arg) | 202 | static void MS_CALLBACK cb(int p, int n, void *arg) |
174 | int p; | ||
175 | int n; | ||
176 | char *arg; | ||
177 | { | 203 | { |
178 | char c='*'; | 204 | char c='*'; |
179 | 205 | ||
@@ -182,7 +208,9 @@ char *arg; | |||
182 | if (p == 2) c='*'; | 208 | if (p == 2) c='*'; |
183 | if (p == 3) c='\n'; | 209 | if (p == 3) c='\n'; |
184 | BIO_write((BIO *)arg,&c,1); | 210 | BIO_write((BIO *)arg,&c,1); |
211 | (void)BIO_flush((BIO *)arg); | ||
185 | #ifdef LINT | 212 | #ifdef LINT |
186 | p=n; | 213 | p=n; |
187 | #endif | 214 | #endif |
188 | } | 215 | } |
216 | #endif | ||
diff --git a/src/lib/libcrypto/dh/p1024.c b/src/lib/libcrypto/dh/p1024.c index 0c50c24cfb..368ceca4eb 100644 --- a/src/lib/libcrypto/dh/p1024.c +++ b/src/lib/libcrypto/dh/p1024.c | |||
@@ -57,10 +57,10 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "bn.h" | 60 | #include <openssl/bn.h> |
61 | #include "asn1.h" | 61 | #include <openssl/asn1.h> |
62 | #include "dh.h" | 62 | #include <openssl/dh.h> |
63 | #include "pem.h" | 63 | #include <openssl/pem.h> |
64 | 64 | ||
65 | unsigned char data[]={0x97,0xF6,0x42,0x61,0xCA,0xB5,0x05,0xDD, | 65 | unsigned char data[]={0x97,0xF6,0x42,0x61,0xCA,0xB5,0x05,0xDD, |
66 | 0x28,0x28,0xE1,0x3F,0x1D,0x68,0xB6,0xD3, | 66 | 0x28,0x28,0xE1,0x3F,0x1D,0x68,0xB6,0xD3, |
diff --git a/src/lib/libcrypto/dh/p192.c b/src/lib/libcrypto/dh/p192.c index 881908169a..7bdf40410e 100644 --- a/src/lib/libcrypto/dh/p192.c +++ b/src/lib/libcrypto/dh/p192.c | |||
@@ -57,10 +57,10 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "bn.h" | 60 | #include <openssl/bn.h> |
61 | #include "asn1.h" | 61 | #include <openssl/asn1.h> |
62 | #include "dh.h" | 62 | #include <openssl/dh.h> |
63 | #include "pem.h" | 63 | #include <openssl/pem.h> |
64 | 64 | ||
65 | unsigned char data[]={ | 65 | unsigned char data[]={ |
66 | 0xD4,0xA0,0xBA,0x02,0x50,0xB6,0xFD,0x2E, | 66 | 0xD4,0xA0,0xBA,0x02,0x50,0xB6,0xFD,0x2E, |
diff --git a/src/lib/libcrypto/dh/p512.c b/src/lib/libcrypto/dh/p512.c index cc84e8e50e..a9b6aa83f0 100644 --- a/src/lib/libcrypto/dh/p512.c +++ b/src/lib/libcrypto/dh/p512.c | |||
@@ -57,10 +57,10 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "bn.h" | 60 | #include <openssl/bn.h> |
61 | #include "asn1.h" | 61 | #include <openssl/asn1.h> |
62 | #include "dh.h" | 62 | #include <openssl/dh.h> |
63 | #include "pem.h" | 63 | #include <openssl/pem.h> |
64 | 64 | ||
65 | unsigned char data[]={ | 65 | unsigned char data[]={ |
66 | 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89, | 66 | 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89, |
diff --git a/src/lib/libcrypto/dsa/dsagen.c b/src/lib/libcrypto/dsa/dsagen.c index 20335de250..a0b0976640 100644 --- a/src/lib/libcrypto/dsa/dsagen.c +++ b/src/lib/libcrypto/dsa/dsagen.c | |||
@@ -57,7 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "dsa.h" | 60 | #include <openssl/dsa.h> |
61 | 61 | ||
62 | #define TEST | 62 | #define TEST |
63 | #define GENUINE_DSA | 63 | #define GENUINE_DSA |
@@ -77,8 +77,7 @@ unsigned char seed[20]={ | |||
77 | 0xe0,0x42,0x7d,LAST_VALUE}; | 77 | 0xe0,0x42,0x7d,LAST_VALUE}; |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | int cb(p,n) | 80 | int cb(int p, int n) |
81 | int p,n; | ||
82 | { | 81 | { |
83 | char c='*'; | 82 | char c='*'; |
84 | 83 | ||
diff --git a/src/lib/libcrypto/dsa/dsatest.c b/src/lib/libcrypto/dsa/dsatest.c index 39bb712c4a..12da64f9f4 100644 --- a/src/lib/libcrypto/dsa/dsatest.c +++ b/src/lib/libcrypto/dsa/dsatest.c | |||
@@ -61,27 +61,34 @@ | |||
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <sys/types.h> | 62 | #include <sys/types.h> |
63 | #include <sys/stat.h> | 63 | #include <sys/stat.h> |
64 | #include "crypto.h" | 64 | #include <openssl/crypto.h> |
65 | #include "rand.h" | 65 | #include <openssl/rand.h> |
66 | #include "bio.h" | 66 | #include <openssl/bio.h> |
67 | #include "err.h" | 67 | #include <openssl/err.h> |
68 | #include "dsa.h" | 68 | #include <openssl/engine.h> |
69 | #ifdef WINDOWS | 69 | #ifdef OPENSSL_SYS_WINDOWS |
70 | #include "../bio/bss_file.c" | 70 | #include "../bio/bss_file.c" |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #ifdef WIN16 | 73 | #ifdef OPENSSL_NO_DSA |
74 | int main(int argc, char *argv[]) | ||
75 | { | ||
76 | printf("No DSA support\n"); | ||
77 | return(0); | ||
78 | } | ||
79 | #else | ||
80 | #include <openssl/dsa.h> | ||
81 | |||
82 | #ifdef OPENSSL_SYS_WIN16 | ||
74 | #define MS_CALLBACK _far _loadds | 83 | #define MS_CALLBACK _far _loadds |
75 | #else | 84 | #else |
76 | #define MS_CALLBACK | 85 | #define MS_CALLBACK |
77 | #endif | 86 | #endif |
78 | 87 | ||
79 | #ifndef NOPROTO | 88 | static void MS_CALLBACK dsa_cb(int p, int n, void *arg); |
80 | static void MS_CALLBACK dsa_cb(int p, int n, char *arg); | ||
81 | #else | ||
82 | static void MS_CALLBACK dsa_cb(); | ||
83 | #endif | ||
84 | 89 | ||
90 | /* seed, out_p, out_q, out_g are taken from the updated Appendix 5 to | ||
91 | * FIPS PUB 186 and also appear in Appendix 5 to FIPS PIB 186-1 */ | ||
85 | static unsigned char seed[20]={ | 92 | static unsigned char seed[20]={ |
86 | 0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40, | 93 | 0xd5,0x01,0x4e,0x4b,0x60,0xef,0x2b,0xa8,0xb6,0x21,0x1b,0x40, |
87 | 0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3, | 94 | 0x62,0xba,0x32,0x24,0xe0,0x42,0x7d,0xd3, |
@@ -115,24 +122,34 @@ static unsigned char out_g[]={ | |||
115 | 0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02, | 122 | 0xc5,0x72,0xaf,0x53,0xe6,0xd7,0x88,0x02, |
116 | }; | 123 | }; |
117 | 124 | ||
125 | static const unsigned char str1[]="12345678901234567890"; | ||
126 | |||
127 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; | ||
128 | |||
118 | static BIO *bio_err=NULL; | 129 | static BIO *bio_err=NULL; |
119 | 130 | ||
120 | int main(argc, argv) | 131 | int main(int argc, char **argv) |
121 | int argc; | ||
122 | char **argv; | ||
123 | { | 132 | { |
124 | DSA *dsa=NULL; | 133 | DSA *dsa=NULL; |
125 | int counter,ret=0,i,j; | 134 | int counter,ret=0,i,j; |
126 | unsigned char buf[256]; | 135 | unsigned char buf[256]; |
127 | unsigned long h; | 136 | unsigned long h; |
137 | unsigned char sig[256]; | ||
138 | unsigned int siglen; | ||
128 | 139 | ||
129 | if (bio_err == NULL) | 140 | if (bio_err == NULL) |
130 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 141 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
131 | 142 | ||
143 | CRYPTO_malloc_debug_init(); | ||
144 | CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); | ||
145 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
146 | |||
147 | ERR_load_crypto_strings(); | ||
148 | RAND_seed(rnd_seed, sizeof rnd_seed); | ||
149 | |||
132 | BIO_printf(bio_err,"test generation of DSA parameters\n"); | 150 | BIO_printf(bio_err,"test generation of DSA parameters\n"); |
133 | BIO_printf(bio_err,"expect '.*' followed by 5 lines of '.'s and '+'s\n"); | 151 | |
134 | dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb, | 152 | dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,bio_err); |
135 | (char *)bio_err); | ||
136 | 153 | ||
137 | BIO_printf(bio_err,"seed\n"); | 154 | BIO_printf(bio_err,"seed\n"); |
138 | for (i=0; i<20; i+=4) | 155 | for (i=0; i<20; i+=4) |
@@ -178,21 +195,28 @@ char **argv; | |||
178 | BIO_printf(bio_err,"g value is wrong\n"); | 195 | BIO_printf(bio_err,"g value is wrong\n"); |
179 | goto end; | 196 | goto end; |
180 | } | 197 | } |
181 | 198 | DSA_generate_key(dsa); | |
182 | ret=1; | 199 | DSA_sign(0, str1, 20, sig, &siglen, dsa); |
200 | if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1) | ||
201 | ret=1; | ||
183 | end: | 202 | end: |
184 | if (!ret) | 203 | if (!ret) |
185 | ERR_print_errors(bio_err); | 204 | ERR_print_errors(bio_err); |
186 | if (bio_err != NULL) BIO_free(bio_err); | ||
187 | if (dsa != NULL) DSA_free(dsa); | 205 | if (dsa != NULL) DSA_free(dsa); |
206 | CRYPTO_cleanup_all_ex_data(); | ||
207 | ERR_remove_state(0); | ||
208 | ERR_free_strings(); | ||
209 | CRYPTO_mem_leaks(bio_err); | ||
210 | if (bio_err != NULL) | ||
211 | { | ||
212 | BIO_free(bio_err); | ||
213 | bio_err = NULL; | ||
214 | } | ||
188 | exit(!ret); | 215 | exit(!ret); |
189 | return(0); | 216 | return(0); |
190 | } | 217 | } |
191 | 218 | ||
192 | static void MS_CALLBACK dsa_cb(p, n, arg) | 219 | static void MS_CALLBACK dsa_cb(int p, int n, void *arg) |
193 | int p; | ||
194 | int n; | ||
195 | char *arg; | ||
196 | { | 220 | { |
197 | char c='*'; | 221 | char c='*'; |
198 | static int ok=0,num=0; | 222 | static int ok=0,num=0; |
@@ -201,8 +225,8 @@ char *arg; | |||
201 | if (p == 1) c='+'; | 225 | if (p == 1) c='+'; |
202 | if (p == 2) { c='*'; ok++; } | 226 | if (p == 2) { c='*'; ok++; } |
203 | if (p == 3) c='\n'; | 227 | if (p == 3) c='\n'; |
204 | BIO_write((BIO *)arg,&c,1); | 228 | BIO_write(arg,&c,1); |
205 | BIO_flush((BIO *)arg); | 229 | (void)BIO_flush(arg); |
206 | 230 | ||
207 | if (!ok && (p == 0) && (num > 1)) | 231 | if (!ok && (p == 0) && (num > 1)) |
208 | { | 232 | { |
@@ -210,5 +234,4 @@ char *arg; | |||
210 | exit(1); | 234 | exit(1); |
211 | } | 235 | } |
212 | } | 236 | } |
213 | 237 | #endif | |
214 | |||
diff --git a/src/lib/libcrypto/dso/README b/src/lib/libcrypto/dso/README index 6ba03c5631..d0bc9a89fb 100644 --- a/src/lib/libcrypto/dso/README +++ b/src/lib/libcrypto/dso/README | |||
@@ -1,16 +1,3 @@ | |||
1 | TODO | ||
2 | ---- | ||
3 | |||
4 | Find a way where name-translation can be done in a way that is | ||
5 | sensitive to particular methods (ie. generic code could still do | ||
6 | different path/filename substitutions on win32 to what it does on | ||
7 | *nix) but doesn't assume some canonical form. Already one case | ||
8 | exists where the "blah -> (libblah.so,blah.dll)" mapping doesn't | ||
9 | suffice. I suspect a callback with an enumerated (or string?) | ||
10 | parameter could be the way to go here ... DSO_ctrl the callback | ||
11 | into place and it can be invoked to handle name translation with | ||
12 | some clue to the calling code as to what kind of system it is. | ||
13 | |||
14 | NOTES | 1 | NOTES |
15 | ----- | 2 | ----- |
16 | 3 | ||
@@ -21,4 +8,15 @@ according to their man page, prefer developers to move to that. | |||
21 | I'll leave Richard's changes there as I guess dso_dl is needed | 8 | I'll leave Richard's changes there as I guess dso_dl is needed |
22 | for HPUX10.20. | 9 | for HPUX10.20. |
23 | 10 | ||
11 | There is now a callback scheme in place where filename conversion can | ||
12 | (a) be turned off altogether through the use of the | ||
13 | DSO_FLAG_NO_NAME_TRANSLATION flag, | ||
14 | (b) be handled by default using the default DSO_METHOD's converter | ||
15 | (c) overriden per-DSO by setting the override callback | ||
16 | (d) a mix of (b) and (c) - eg. implement an override callback that; | ||
17 | (i) checks if we're win32 (if(strstr(dso->meth->name, "win32")....) | ||
18 | and if so, convert "blah" into "blah32.dll" (the default is | ||
19 | otherwise to make it "blah.dll"). | ||
20 | (ii) default to the normal behaviour - we're not on win32, eg. | ||
21 | finish with (return dso->meth->dso_name_converter(dso,NULL)). | ||
24 | 22 | ||
diff --git a/src/lib/libcrypto/dso/dso_dl.c b/src/lib/libcrypto/dso/dso_dl.c index 69810fc3bb..195717e993 100644 --- a/src/lib/libcrypto/dso/dso_dl.c +++ b/src/lib/libcrypto/dso/dso_dl.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* dso_dl.c */ | 1 | /* dso_dl.c */ |
2 | /* Written by Richard Levitte (levitte@openssl.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
@@ -72,7 +72,7 @@ DSO_METHOD *DSO_METHOD_dl(void) | |||
72 | /* Part of the hack in "dl_load" ... */ | 72 | /* Part of the hack in "dl_load" ... */ |
73 | #define DSO_MAX_TRANSLATED_SIZE 256 | 73 | #define DSO_MAX_TRANSLATED_SIZE 256 |
74 | 74 | ||
75 | static int dl_load(DSO *dso, const char *filename); | 75 | static int dl_load(DSO *dso); |
76 | static int dl_unload(DSO *dso); | 76 | static int dl_unload(DSO *dso); |
77 | static void *dl_bind_var(DSO *dso, const char *symname); | 77 | static void *dl_bind_var(DSO *dso, const char *symname); |
78 | static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname); | 78 | static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname); |
@@ -81,8 +81,9 @@ static int dl_unbind_var(DSO *dso, char *symname, void *symptr); | |||
81 | static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | 81 | static int dl_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); |
82 | static int dl_init(DSO *dso); | 82 | static int dl_init(DSO *dso); |
83 | static int dl_finish(DSO *dso); | 83 | static int dl_finish(DSO *dso); |
84 | #endif | ||
85 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg); | 84 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg); |
85 | #endif | ||
86 | static char *dl_name_converter(DSO *dso, const char *filename); | ||
86 | 87 | ||
87 | static DSO_METHOD dso_meth_dl = { | 88 | static DSO_METHOD dso_meth_dl = { |
88 | "OpenSSL 'dl' shared library method", | 89 | "OpenSSL 'dl' shared library method", |
@@ -95,7 +96,8 @@ static DSO_METHOD dso_meth_dl = { | |||
95 | NULL, /* unbind_var */ | 96 | NULL, /* unbind_var */ |
96 | NULL, /* unbind_func */ | 97 | NULL, /* unbind_func */ |
97 | #endif | 98 | #endif |
98 | dl_ctrl, | 99 | NULL, /* ctrl */ |
100 | dl_name_converter, | ||
99 | NULL, /* init */ | 101 | NULL, /* init */ |
100 | NULL /* finish */ | 102 | NULL /* finish */ |
101 | }; | 103 | }; |
@@ -111,35 +113,43 @@ DSO_METHOD *DSO_METHOD_dl(void) | |||
111 | * type so the cast is safe. | 113 | * type so the cast is safe. |
112 | */ | 114 | */ |
113 | 115 | ||
114 | static int dl_load(DSO *dso, const char *filename) | 116 | static int dl_load(DSO *dso) |
115 | { | 117 | { |
116 | shl_t ptr; | 118 | shl_t ptr = NULL; |
117 | char translated[DSO_MAX_TRANSLATED_SIZE]; | 119 | /* We don't do any fancy retries or anything, just take the method's |
118 | int len; | 120 | * (or DSO's if it has the callback set) best translation of the |
121 | * platform-independant filename and try once with that. */ | ||
122 | char *filename= DSO_convert_filename(dso, NULL); | ||
119 | 123 | ||
120 | /* The same comment as in dlfcn_load applies here. bleurgh. */ | 124 | if(filename == NULL) |
121 | len = strlen(filename); | ||
122 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | ||
123 | (len + 6 < DSO_MAX_TRANSLATED_SIZE) && | ||
124 | (strstr(filename, "/") == NULL)) | ||
125 | { | 125 | { |
126 | sprintf(translated, "lib%s.so", filename); | 126 | DSOerr(DSO_F_DL_LOAD,DSO_R_NO_FILENAME); |
127 | ptr = shl_load(translated, BIND_IMMEDIATE, NULL); | 127 | goto err; |
128 | } | 128 | } |
129 | else | 129 | ptr = shl_load(filename, BIND_IMMEDIATE|DYNAMIC_PATH, NULL); |
130 | ptr = shl_load(filename, BIND_IMMEDIATE, NULL); | ||
131 | if(ptr == NULL) | 130 | if(ptr == NULL) |
132 | { | 131 | { |
133 | DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED); | 132 | DSOerr(DSO_F_DL_LOAD,DSO_R_LOAD_FAILED); |
134 | return(0); | 133 | ERR_add_error_data(4, "filename(", filename, "): ", |
134 | strerror(errno)); | ||
135 | goto err; | ||
135 | } | 136 | } |
136 | if(!sk_push(dso->meth_data, (char *)ptr)) | 137 | if(!sk_push(dso->meth_data, (char *)ptr)) |
137 | { | 138 | { |
138 | DSOerr(DSO_F_DL_LOAD,DSO_R_STACK_ERROR); | 139 | DSOerr(DSO_F_DL_LOAD,DSO_R_STACK_ERROR); |
139 | shl_unload(ptr); | 140 | goto err; |
140 | return(0); | ||
141 | } | 141 | } |
142 | /* Success, stick the converted filename we've loaded under into the DSO | ||
143 | * (it also serves as the indicator that we are currently loaded). */ | ||
144 | dso->loaded_filename = filename; | ||
142 | return(1); | 145 | return(1); |
146 | err: | ||
147 | /* Cleanup! */ | ||
148 | if(filename != NULL) | ||
149 | OPENSSL_free(filename); | ||
150 | if(ptr != NULL) | ||
151 | shl_unload(ptr); | ||
152 | return(0); | ||
143 | } | 153 | } |
144 | 154 | ||
145 | static int dl_unload(DSO *dso) | 155 | static int dl_unload(DSO *dso) |
@@ -187,9 +197,11 @@ static void *dl_bind_var(DSO *dso, const char *symname) | |||
187 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE); | 197 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_NULL_HANDLE); |
188 | return(NULL); | 198 | return(NULL); |
189 | } | 199 | } |
190 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | 200 | if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) |
191 | { | 201 | { |
192 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); | 202 | DSOerr(DSO_F_DL_BIND_VAR,DSO_R_SYM_FAILURE); |
203 | ERR_add_error_data(4, "symname(", symname, "): ", | ||
204 | strerror(errno)); | ||
193 | return(NULL); | 205 | return(NULL); |
194 | } | 206 | } |
195 | return(sym); | 207 | return(sym); |
@@ -216,36 +228,57 @@ static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname) | |||
216 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE); | 228 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_NULL_HANDLE); |
217 | return(NULL); | 229 | return(NULL); |
218 | } | 230 | } |
219 | if (shl_findsym(ptr, symname, TYPE_UNDEFINED, &sym) < 0) | 231 | if (shl_findsym(&ptr, symname, TYPE_UNDEFINED, &sym) < 0) |
220 | { | 232 | { |
221 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); | 233 | DSOerr(DSO_F_DL_BIND_FUNC,DSO_R_SYM_FAILURE); |
234 | ERR_add_error_data(4, "symname(", symname, "): ", | ||
235 | strerror(errno)); | ||
222 | return(NULL); | 236 | return(NULL); |
223 | } | 237 | } |
224 | return((DSO_FUNC_TYPE)sym); | 238 | return((DSO_FUNC_TYPE)sym); |
225 | } | 239 | } |
226 | 240 | ||
227 | static int dl_ctrl(DSO *dso, int cmd, long larg, void *parg) | 241 | /* This function is identical to the one in dso_dlfcn.c, but as it is highly |
242 | * unlikely that both the "dl" *and* "dlfcn" variants are being compiled at the | ||
243 | * same time, there's no great duplicating the code. Figuring out an elegant | ||
244 | * way to share one copy of the code would be more difficult and would not | ||
245 | * leave the implementations independant. */ | ||
246 | #if defined(__hpux) | ||
247 | static const char extension[] = ".sl"; | ||
248 | #else | ||
249 | static const char extension[] = ".so"; | ||
250 | #endif | ||
251 | static char *dl_name_converter(DSO *dso, const char *filename) | ||
228 | { | 252 | { |
229 | if(dso == NULL) | 253 | char *translated; |
254 | int len, rsize, transform; | ||
255 | |||
256 | len = strlen(filename); | ||
257 | rsize = len + 1; | ||
258 | transform = (strstr(filename, "/") == NULL); | ||
230 | { | 259 | { |
231 | DSOerr(DSO_F_DL_CTRL,ERR_R_PASSED_NULL_PARAMETER); | 260 | /* We will convert this to "%s.s?" or "lib%s.s?" */ |
232 | return(-1); | 261 | rsize += strlen(extension);/* The length of ".s?" */ |
262 | if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0) | ||
263 | rsize += 3; /* The length of "lib" */ | ||
233 | } | 264 | } |
234 | switch(cmd) | 265 | translated = OPENSSL_malloc(rsize); |
266 | if(translated == NULL) | ||
235 | { | 267 | { |
236 | case DSO_CTRL_GET_FLAGS: | 268 | DSOerr(DSO_F_DL_NAME_CONVERTER, |
237 | return dso->flags; | 269 | DSO_R_NAME_TRANSLATION_FAILED); |
238 | case DSO_CTRL_SET_FLAGS: | 270 | return(NULL); |
239 | dso->flags = (int)larg; | 271 | } |
240 | return(0); | 272 | if(transform) |
241 | case DSO_CTRL_OR_FLAGS: | 273 | { |
242 | dso->flags |= (int)larg; | 274 | if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0) |
243 | return(0); | 275 | sprintf(translated, "lib%s%s", filename, extension); |
244 | default: | 276 | else |
245 | break; | 277 | sprintf(translated, "%s%s", filename, extension); |
246 | } | 278 | } |
247 | DSOerr(DSO_F_DL_CTRL,DSO_R_UNKNOWN_COMMAND); | 279 | else |
248 | return(-1); | 280 | sprintf(translated, "%s", filename); |
281 | return(translated); | ||
249 | } | 282 | } |
250 | 283 | ||
251 | #endif /* DSO_DL */ | 284 | #endif /* DSO_DL */ |
diff --git a/src/lib/libcrypto/dso/dso_vms.c b/src/lib/libcrypto/dso/dso_vms.c index 8ff7090129..1674619d17 100644 --- a/src/lib/libcrypto/dso/dso_vms.c +++ b/src/lib/libcrypto/dso/dso_vms.c | |||
@@ -59,18 +59,17 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <errno.h> | 61 | #include <errno.h> |
62 | #ifdef VMS | 62 | #include "cryptlib.h" |
63 | #include <openssl/dso.h> | ||
64 | #ifdef OPENSSL_SYS_VMS | ||
63 | #pragma message disable DOLLARID | 65 | #pragma message disable DOLLARID |
64 | #include <lib$routines.h> | 66 | #include <lib$routines.h> |
65 | #include <libfisdef.h> | ||
66 | #include <stsdef.h> | 67 | #include <stsdef.h> |
67 | #include <descrip.h> | 68 | #include <descrip.h> |
68 | #include <starlet.h> | 69 | #include <starlet.h> |
69 | #endif | 70 | #endif |
70 | #include "cryptlib.h" | ||
71 | #include <openssl/dso.h> | ||
72 | 71 | ||
73 | #ifndef VMS | 72 | #ifndef OPENSSL_SYS_VMS |
74 | DSO_METHOD *DSO_METHOD_vms(void) | 73 | DSO_METHOD *DSO_METHOD_vms(void) |
75 | { | 74 | { |
76 | return NULL; | 75 | return NULL; |
@@ -78,7 +77,7 @@ DSO_METHOD *DSO_METHOD_vms(void) | |||
78 | #else | 77 | #else |
79 | #pragma message disable DOLLARID | 78 | #pragma message disable DOLLARID |
80 | 79 | ||
81 | static int vms_load(DSO *dso, const char *filename); | 80 | static int vms_load(DSO *dso); |
82 | static int vms_unload(DSO *dso); | 81 | static int vms_unload(DSO *dso); |
83 | static void *vms_bind_var(DSO *dso, const char *symname); | 82 | static void *vms_bind_var(DSO *dso, const char *symname); |
84 | static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname); | 83 | static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname); |
@@ -87,8 +86,9 @@ static int vms_unbind_var(DSO *dso, char *symname, void *symptr); | |||
87 | static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | 86 | static int vms_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); |
88 | static int vms_init(DSO *dso); | 87 | static int vms_init(DSO *dso); |
89 | static int vms_finish(DSO *dso); | 88 | static int vms_finish(DSO *dso); |
90 | #endif | ||
91 | static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg); | 89 | static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg); |
90 | #endif | ||
91 | static char *vms_name_converter(DSO *dso, const char *filename); | ||
92 | 92 | ||
93 | static DSO_METHOD dso_meth_vms = { | 93 | static DSO_METHOD dso_meth_vms = { |
94 | "OpenSSL 'VMS' shared library method", | 94 | "OpenSSL 'VMS' shared library method", |
@@ -101,7 +101,8 @@ static DSO_METHOD dso_meth_vms = { | |||
101 | NULL, /* unbind_var */ | 101 | NULL, /* unbind_var */ |
102 | NULL, /* unbind_func */ | 102 | NULL, /* unbind_func */ |
103 | #endif | 103 | #endif |
104 | vms_ctrl, | 104 | NULL, /* ctrl */ |
105 | vms_name_converter, | ||
105 | NULL, /* init */ | 106 | NULL, /* init */ |
106 | NULL /* finish */ | 107 | NULL /* finish */ |
107 | }; | 108 | }; |
@@ -129,11 +130,20 @@ DSO_METHOD *DSO_METHOD_vms(void) | |||
129 | return(&dso_meth_vms); | 130 | return(&dso_meth_vms); |
130 | } | 131 | } |
131 | 132 | ||
132 | static int vms_load(DSO *dso, const char *filename) | 133 | static int vms_load(DSO *dso) |
133 | { | 134 | { |
135 | void *ptr = NULL; | ||
136 | /* See applicable comments in dso_dl.c */ | ||
137 | char *filename = DSO_convert_filename(dso, NULL); | ||
134 | DSO_VMS_INTERNAL *p; | 138 | DSO_VMS_INTERNAL *p; |
135 | const char *sp1, *sp2; /* Search result */ | 139 | const char *sp1, *sp2; /* Search result */ |
136 | 140 | ||
141 | if(filename == NULL) | ||
142 | { | ||
143 | DSOerr(DSO_F_DLFCN_LOAD,DSO_R_NO_FILENAME); | ||
144 | goto err; | ||
145 | } | ||
146 | |||
137 | /* A file specification may look like this: | 147 | /* A file specification may look like this: |
138 | * | 148 | * |
139 | * node::dev:[dir-spec]name.type;ver | 149 | * node::dev:[dir-spec]name.type;ver |
@@ -175,14 +185,14 @@ static int vms_load(DSO *dso, const char *filename) | |||
175 | || (sp1 - filename) + strlen(sp2) > FILENAME_MAX) | 185 | || (sp1 - filename) + strlen(sp2) > FILENAME_MAX) |
176 | { | 186 | { |
177 | DSOerr(DSO_F_VMS_LOAD,DSO_R_FILENAME_TOO_BIG); | 187 | DSOerr(DSO_F_VMS_LOAD,DSO_R_FILENAME_TOO_BIG); |
178 | return(0); | 188 | goto err; |
179 | } | 189 | } |
180 | 190 | ||
181 | p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL)); | 191 | p = (DSO_VMS_INTERNAL *)OPENSSL_malloc(sizeof(DSO_VMS_INTERNAL)); |
182 | if(p == NULL) | 192 | if(p == NULL) |
183 | { | 193 | { |
184 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); | 194 | DSOerr(DSO_F_VMS_LOAD,ERR_R_MALLOC_FAILURE); |
185 | return(0); | 195 | goto err; |
186 | } | 196 | } |
187 | 197 | ||
188 | strncpy(p->filename, sp1, sp2-sp1); | 198 | strncpy(p->filename, sp1, sp2-sp1); |
@@ -204,10 +214,19 @@ static int vms_load(DSO *dso, const char *filename) | |||
204 | if(!sk_push(dso->meth_data, (char *)p)) | 214 | if(!sk_push(dso->meth_data, (char *)p)) |
205 | { | 215 | { |
206 | DSOerr(DSO_F_VMS_LOAD,DSO_R_STACK_ERROR); | 216 | DSOerr(DSO_F_VMS_LOAD,DSO_R_STACK_ERROR); |
207 | OPENSSL_free(p); | 217 | goto err; |
208 | return(0); | ||
209 | } | 218 | } |
219 | |||
220 | /* Success (for now, we lie. We actually do not know...) */ | ||
221 | dso->loaded_filename = filename; | ||
210 | return(1); | 222 | return(1); |
223 | err: | ||
224 | /* Cleanup! */ | ||
225 | if(p != NULL) | ||
226 | OPENSSL_free(p); | ||
227 | if(filename != NULL) | ||
228 | OPENSSL_free(filename); | ||
229 | return(0); | ||
211 | } | 230 | } |
212 | 231 | ||
213 | /* Note that this doesn't actually unload the shared image, as there is no | 232 | /* Note that this doesn't actually unload the shared image, as there is no |
@@ -260,7 +279,12 @@ void vms_bind_sym(DSO *dso, const char *symname, void **sym) | |||
260 | { | 279 | { |
261 | DSO_VMS_INTERNAL *ptr; | 280 | DSO_VMS_INTERNAL *ptr; |
262 | int status; | 281 | int status; |
263 | int flags = LIB$M_FIS_MIXEDCASE; | 282 | #if 0 |
283 | int flags = (1<<4); /* LIB$M_FIS_MIXEDCASE, but this symbol isn't | ||
284 | defined in VMS older than 7.0 or so */ | ||
285 | #else | ||
286 | int flags = 0; | ||
287 | #endif | ||
264 | struct dsc$descriptor_s symname_dsc; | 288 | struct dsc$descriptor_s symname_dsc; |
265 | *sym = NULL; | 289 | *sym = NULL; |
266 | 290 | ||
@@ -344,28 +368,12 @@ static DSO_FUNC_TYPE vms_bind_func(DSO *dso, const char *symname) | |||
344 | return sym; | 368 | return sym; |
345 | } | 369 | } |
346 | 370 | ||
347 | static long vms_ctrl(DSO *dso, int cmd, long larg, void *parg) | 371 | static char *vms_name_converter(DSO *dso, const char *filename) |
348 | { | 372 | { |
349 | if(dso == NULL) | 373 | int len = strlen(filename); |
350 | { | 374 | char *not_translated = OPENSSL_malloc(len+1); |
351 | DSOerr(DSO_F_VMS_CTRL,ERR_R_PASSED_NULL_PARAMETER); | 375 | strcpy(not_translated,filename); |
352 | return(-1); | 376 | return(not_translated); |
353 | } | 377 | } |
354 | switch(cmd) | 378 | |
355 | { | 379 | #endif /* OPENSSL_SYS_VMS */ |
356 | case DSO_CTRL_GET_FLAGS: | ||
357 | return dso->flags; | ||
358 | case DSO_CTRL_SET_FLAGS: | ||
359 | dso->flags = (int)larg; | ||
360 | return(0); | ||
361 | case DSO_CTRL_OR_FLAGS: | ||
362 | dso->flags |= (int)larg; | ||
363 | return(0); | ||
364 | default: | ||
365 | break; | ||
366 | } | ||
367 | DSOerr(DSO_F_VMS_CTRL,DSO_R_UNKNOWN_COMMAND); | ||
368 | return(-1); | ||
369 | } | ||
370 | |||
371 | #endif /* VMS */ | ||
diff --git a/src/lib/libcrypto/dso/dso_win32.c b/src/lib/libcrypto/dso/dso_win32.c index 7f1d904806..af8586d754 100644 --- a/src/lib/libcrypto/dso/dso_win32.c +++ b/src/lib/libcrypto/dso/dso_win32.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/dso.h> | 62 | #include <openssl/dso.h> |
63 | 63 | ||
64 | #ifndef WIN32 | 64 | #ifndef OPENSSL_SYS_WIN32 |
65 | DSO_METHOD *DSO_METHOD_win32(void) | 65 | DSO_METHOD *DSO_METHOD_win32(void) |
66 | { | 66 | { |
67 | return NULL; | 67 | return NULL; |
@@ -71,7 +71,7 @@ DSO_METHOD *DSO_METHOD_win32(void) | |||
71 | /* Part of the hack in "win32_load" ... */ | 71 | /* Part of the hack in "win32_load" ... */ |
72 | #define DSO_MAX_TRANSLATED_SIZE 256 | 72 | #define DSO_MAX_TRANSLATED_SIZE 256 |
73 | 73 | ||
74 | static int win32_load(DSO *dso, const char *filename); | 74 | static int win32_load(DSO *dso); |
75 | static int win32_unload(DSO *dso); | 75 | static int win32_unload(DSO *dso); |
76 | static void *win32_bind_var(DSO *dso, const char *symname); | 76 | static void *win32_bind_var(DSO *dso, const char *symname); |
77 | static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname); | 77 | static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname); |
@@ -80,8 +80,9 @@ static int win32_unbind_var(DSO *dso, char *symname, void *symptr); | |||
80 | static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); | 80 | static int win32_unbind_func(DSO *dso, char *symname, DSO_FUNC_TYPE symptr); |
81 | static int win32_init(DSO *dso); | 81 | static int win32_init(DSO *dso); |
82 | static int win32_finish(DSO *dso); | 82 | static int win32_finish(DSO *dso); |
83 | #endif | ||
84 | static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg); | 83 | static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg); |
84 | #endif | ||
85 | static char *win32_name_converter(DSO *dso, const char *filename); | ||
85 | 86 | ||
86 | static DSO_METHOD dso_meth_win32 = { | 87 | static DSO_METHOD dso_meth_win32 = { |
87 | "OpenSSL 'win32' shared library method", | 88 | "OpenSSL 'win32' shared library method", |
@@ -94,7 +95,8 @@ static DSO_METHOD dso_meth_win32 = { | |||
94 | NULL, /* unbind_var */ | 95 | NULL, /* unbind_var */ |
95 | NULL, /* unbind_func */ | 96 | NULL, /* unbind_func */ |
96 | #endif | 97 | #endif |
97 | win32_ctrl, | 98 | NULL, /* ctrl */ |
99 | win32_name_converter, | ||
98 | NULL, /* init */ | 100 | NULL, /* init */ |
99 | NULL /* finish */ | 101 | NULL /* finish */ |
100 | }; | 102 | }; |
@@ -109,50 +111,48 @@ DSO_METHOD *DSO_METHOD_win32(void) | |||
109 | * LoadLibrary(), and copied. | 111 | * LoadLibrary(), and copied. |
110 | */ | 112 | */ |
111 | 113 | ||
112 | static int win32_load(DSO *dso, const char *filename) | 114 | static int win32_load(DSO *dso) |
113 | { | 115 | { |
114 | HINSTANCE h, *p; | 116 | HINSTANCE h = NULL, *p = NULL; |
115 | char translated[DSO_MAX_TRANSLATED_SIZE]; | 117 | /* See applicable comments from dso_dl.c */ |
116 | int len; | 118 | char *filename = DSO_convert_filename(dso, NULL); |
117 | 119 | ||
118 | /* NB: This is a hideous hack, but I'm not yet sure what | 120 | if(filename == NULL) |
119 | * to replace it with. This attempts to convert any filename, | ||
120 | * that looks like it has no path information, into a | ||
121 | * translated form, e. "blah" -> "blah.dll" ... I'm more | ||
122 | * comfortable putting hacks into win32 code though ;-) */ | ||
123 | len = strlen(filename); | ||
124 | if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && | ||
125 | (len + 4 < DSO_MAX_TRANSLATED_SIZE) && | ||
126 | (strstr(filename, "/") == NULL) && | ||
127 | (strstr(filename, "\\") == NULL) && | ||
128 | (strstr(filename, ":") == NULL)) | ||
129 | { | 121 | { |
130 | sprintf(translated, "%s.dll", filename); | 122 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME); |
131 | h = LoadLibrary(translated); | 123 | goto err; |
132 | } | 124 | } |
133 | else | 125 | h = LoadLibrary(filename); |
134 | h = LoadLibrary(filename); | ||
135 | if(h == NULL) | 126 | if(h == NULL) |
136 | { | 127 | { |
137 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); | 128 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); |
138 | return(0); | 129 | ERR_add_error_data(3, "filename(", filename, ")"); |
130 | goto err; | ||
139 | } | 131 | } |
140 | p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE)); | 132 | p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE)); |
141 | if(p == NULL) | 133 | if(p == NULL) |
142 | { | 134 | { |
143 | DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE); | 135 | DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE); |
144 | FreeLibrary(h); | 136 | goto err; |
145 | return(0); | ||
146 | } | 137 | } |
147 | *p = h; | 138 | *p = h; |
148 | if(!sk_push(dso->meth_data, (char *)p)) | 139 | if(!sk_push(dso->meth_data, (char *)p)) |
149 | { | 140 | { |
150 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR); | 141 | DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR); |
151 | FreeLibrary(h); | 142 | goto err; |
152 | OPENSSL_free(p); | ||
153 | return(0); | ||
154 | } | 143 | } |
144 | /* Success */ | ||
145 | dso->loaded_filename = filename; | ||
155 | return(1); | 146 | return(1); |
147 | err: | ||
148 | /* Cleanup !*/ | ||
149 | if(filename != NULL) | ||
150 | OPENSSL_free(filename); | ||
151 | if(p != NULL) | ||
152 | OPENSSL_free(p); | ||
153 | if(h != NULL) | ||
154 | FreeLibrary(h); | ||
155 | return(0); | ||
156 | } | 156 | } |
157 | 157 | ||
158 | static int win32_unload(DSO *dso) | 158 | static int win32_unload(DSO *dso) |
@@ -211,6 +211,7 @@ static void *win32_bind_var(DSO *dso, const char *symname) | |||
211 | if(sym == NULL) | 211 | if(sym == NULL) |
212 | { | 212 | { |
213 | DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_SYM_FAILURE); | 213 | DSOerr(DSO_F_WIN32_BIND_VAR,DSO_R_SYM_FAILURE); |
214 | ERR_add_error_data(3, "symname(", symname, ")"); | ||
214 | return(NULL); | 215 | return(NULL); |
215 | } | 216 | } |
216 | return(sym); | 217 | return(sym); |
@@ -241,33 +242,38 @@ static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname) | |||
241 | if(sym == NULL) | 242 | if(sym == NULL) |
242 | { | 243 | { |
243 | DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_SYM_FAILURE); | 244 | DSOerr(DSO_F_WIN32_BIND_FUNC,DSO_R_SYM_FAILURE); |
245 | ERR_add_error_data(3, "symname(", symname, ")"); | ||
244 | return(NULL); | 246 | return(NULL); |
245 | } | 247 | } |
246 | return((DSO_FUNC_TYPE)sym); | 248 | return((DSO_FUNC_TYPE)sym); |
247 | } | 249 | } |
248 | 250 | ||
249 | static long win32_ctrl(DSO *dso, int cmd, long larg, void *parg) | 251 | static char *win32_name_converter(DSO *dso, const char *filename) |
250 | { | 252 | { |
251 | if(dso == NULL) | 253 | char *translated; |
252 | { | 254 | int len, transform; |
253 | DSOerr(DSO_F_WIN32_CTRL,ERR_R_PASSED_NULL_PARAMETER); | 255 | |
254 | return(-1); | 256 | len = strlen(filename); |
255 | } | 257 | transform = ((strstr(filename, "/") == NULL) && |
256 | switch(cmd) | 258 | (strstr(filename, "\\") == NULL) && |
257 | { | 259 | (strstr(filename, ":") == NULL)); |
258 | case DSO_CTRL_GET_FLAGS: | 260 | if(transform) |
259 | return dso->flags; | 261 | /* We will convert this to "%s.dll" */ |
260 | case DSO_CTRL_SET_FLAGS: | 262 | translated = OPENSSL_malloc(len + 5); |
261 | dso->flags = (int)larg; | 263 | else |
262 | return(0); | 264 | /* We will simply duplicate filename */ |
263 | case DSO_CTRL_OR_FLAGS: | 265 | translated = OPENSSL_malloc(len + 1); |
264 | dso->flags |= (int)larg; | 266 | if(translated == NULL) |
265 | return(0); | 267 | { |
266 | default: | 268 | DSOerr(DSO_F_WIN32_NAME_CONVERTER, |
267 | break; | 269 | DSO_R_NAME_TRANSLATION_FAILED); |
268 | } | 270 | return(NULL); |
269 | DSOerr(DSO_F_WIN32_CTRL,DSO_R_UNKNOWN_COMMAND); | 271 | } |
270 | return(-1); | 272 | if(transform) |
271 | } | 273 | sprintf(translated, "%s.dll", filename); |
274 | else | ||
275 | sprintf(translated, "%s", filename); | ||
276 | return(translated); | ||
277 | } | ||
272 | 278 | ||
273 | #endif /* WIN32 */ | 279 | #endif /* OPENSSL_SYS_WIN32 */ |
diff --git a/src/lib/libcrypto/ebcdic.c b/src/lib/libcrypto/ebcdic.c index 31397b2add..bc968ea807 100644 --- a/src/lib/libcrypto/ebcdic.c +++ b/src/lib/libcrypto/ebcdic.c | |||
@@ -211,7 +211,8 @@ ascii2ebcdic(void *dest, const void *srce, size_t count) | |||
211 | } | 211 | } |
212 | 212 | ||
213 | #else /*CHARSET_EBCDIC*/ | 213 | #else /*CHARSET_EBCDIC*/ |
214 | #ifdef PEDANTIC | 214 | #include <openssl/opensslconf.h> |
215 | #if defined(PEDANTIC) || defined(__DECC) | ||
215 | static void *dummy=&dummy; | 216 | static void *dummy=&dummy; |
216 | #endif | 217 | #endif |
217 | #endif | 218 | #endif |
diff --git a/src/lib/libcrypto/ebcdic.h b/src/lib/libcrypto/ebcdic.h index d3b4e98b12..6d65afcf9e 100644 --- a/src/lib/libcrypto/ebcdic.h +++ b/src/lib/libcrypto/ebcdic.h | |||
@@ -1,17 +1,19 @@ | |||
1 | /* crypto/ebcdic.h */ | ||
2 | |||
1 | #ifndef HEADER_EBCDIC_H | 3 | #ifndef HEADER_EBCDIC_H |
2 | #define HEADER_EBCDIC_H | 4 | #define HEADER_EBCDIC_H |
3 | 5 | ||
4 | #include <sys/types.h> | 6 | #include <sys/types.h> |
5 | 7 | ||
6 | /* Avoid name clashes with other applications */ | 8 | /* Avoid name clashes with other applications */ |
7 | #define os_toascii _eay2000_os_toascii | 9 | #define os_toascii _openssl_os_toascii |
8 | #define os_toebcdic _eay2000_os_toebcdic | 10 | #define os_toebcdic _openssl_os_toebcdic |
9 | #define ebcdic2ascii _eay2000_ebcdic2ascii | 11 | #define ebcdic2ascii _openssl_ebcdic2ascii |
10 | #define ascii2ebcdic _eay2000_ascii2ebcdic | 12 | #define ascii2ebcdic _openssl_ascii2ebcdic |
11 | 13 | ||
12 | extern const unsigned char os_toascii[256]; | 14 | extern const unsigned char os_toascii[256]; |
13 | extern const unsigned char os_toebcdic[256]; | 15 | extern const unsigned char os_toebcdic[256]; |
14 | void ebcdic2ascii(unsigned char *dest, const unsigned char *srce, size_t count); | 16 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); |
15 | void ascii2ebcdic(unsigned char *dest, const unsigned char *srce, size_t count); | 17 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); |
16 | 18 | ||
17 | #endif | 19 | #endif |
diff --git a/src/lib/libcrypto/engine/enginetest.c b/src/lib/libcrypto/engine/enginetest.c index a5a3c47fcb..87fa8c57b7 100644 --- a/src/lib/libcrypto/engine/enginetest.c +++ b/src/lib/libcrypto/engine/enginetest.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
@@ -56,8 +56,11 @@ | |||
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/e_os2.h> | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include <string.h> | 61 | #include <string.h> |
62 | #include <openssl/buffer.h> | ||
63 | #include <openssl/crypto.h> | ||
61 | #include <openssl/engine.h> | 64 | #include <openssl/engine.h> |
62 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
63 | 66 | ||
@@ -76,6 +79,9 @@ static void display_engine_list() | |||
76 | h = ENGINE_get_next(h); | 79 | h = ENGINE_get_next(h); |
77 | } | 80 | } |
78 | printf("end of list\n"); | 81 | printf("end of list\n"); |
82 | /* ENGINE_get_first() increases the struct_ref counter, so we | ||
83 | must call ENGINE_free() to decrease it again */ | ||
84 | ENGINE_free(h); | ||
79 | } | 85 | } |
80 | 86 | ||
81 | int main(int argc, char *argv[]) | 87 | int main(int argc, char *argv[]) |
@@ -91,6 +97,18 @@ int main(int argc, char *argv[]) | |||
91 | ENGINE *new_h3 = NULL; | 97 | ENGINE *new_h3 = NULL; |
92 | ENGINE *new_h4 = NULL; | 98 | ENGINE *new_h4 = NULL; |
93 | 99 | ||
100 | /* enable memory leak checking unless explicitly disabled */ | ||
101 | if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) | ||
102 | { | ||
103 | CRYPTO_malloc_debug_init(); | ||
104 | CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); | ||
105 | } | ||
106 | else | ||
107 | { | ||
108 | /* OPENSSL_DEBUG_MEMORY=off */ | ||
109 | CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); | ||
110 | } | ||
111 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
94 | ERR_load_crypto_strings(); | 112 | ERR_load_crypto_strings(); |
95 | 113 | ||
96 | memset(block, 0, 512 * sizeof(ENGINE *)); | 114 | memset(block, 0, 512 * sizeof(ENGINE *)); |
@@ -124,6 +142,8 @@ int main(int argc, char *argv[]) | |||
124 | printf("Remove failed!\n"); | 142 | printf("Remove failed!\n"); |
125 | goto end; | 143 | goto end; |
126 | } | 144 | } |
145 | if (ptr) | ||
146 | ENGINE_free(ptr); | ||
127 | display_engine_list(); | 147 | display_engine_list(); |
128 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) | 148 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) |
129 | { | 149 | { |
@@ -158,12 +178,7 @@ int main(int argc, char *argv[]) | |||
158 | } | 178 | } |
159 | else | 179 | else |
160 | printf("Remove that should fail did.\n"); | 180 | printf("Remove that should fail did.\n"); |
161 | if(!ENGINE_remove(new_h1)) | 181 | ERR_clear_error(); |
162 | { | ||
163 | printf("Remove failed!\n"); | ||
164 | goto end; | ||
165 | } | ||
166 | display_engine_list(); | ||
167 | if(!ENGINE_remove(new_h3)) | 182 | if(!ENGINE_remove(new_h3)) |
168 | { | 183 | { |
169 | printf("Remove failed!\n"); | 184 | printf("Remove failed!\n"); |
@@ -183,6 +198,8 @@ int main(int argc, char *argv[]) | |||
183 | if(!ENGINE_remove(ptr)) | 198 | if(!ENGINE_remove(ptr)) |
184 | printf("Remove failed!i - probably no hardware " | 199 | printf("Remove failed!i - probably no hardware " |
185 | "support present.\n"); | 200 | "support present.\n"); |
201 | if (ptr) | ||
202 | ENGINE_free(ptr); | ||
186 | display_engine_list(); | 203 | display_engine_list(); |
187 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) | 204 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) |
188 | { | 205 | { |
@@ -195,9 +212,9 @@ int main(int argc, char *argv[]) | |||
195 | for(loop = 0; loop < 512; loop++) | 212 | for(loop = 0; loop < 512; loop++) |
196 | { | 213 | { |
197 | sprintf(buf, "id%i", loop); | 214 | sprintf(buf, "id%i", loop); |
198 | id = strdup(buf); | 215 | id = BUF_strdup(buf); |
199 | sprintf(buf, "Fake engine type %i", loop); | 216 | sprintf(buf, "Fake engine type %i", loop); |
200 | name = strdup(buf); | 217 | name = BUF_strdup(buf); |
201 | if(((block[loop] = ENGINE_new()) == NULL) || | 218 | if(((block[loop] = ENGINE_new()) == NULL) || |
202 | !ENGINE_set_id(block[loop], id) || | 219 | !ENGINE_set_id(block[loop], id) || |
203 | !ENGINE_set_name(block[loop], name)) | 220 | !ENGINE_set_name(block[loop], name)) |
@@ -228,12 +245,13 @@ cleanup_loop: | |||
228 | printf("\nRemove failed!\n"); | 245 | printf("\nRemove failed!\n"); |
229 | goto end; | 246 | goto end; |
230 | } | 247 | } |
248 | ENGINE_free(ptr); | ||
231 | printf("."); fflush(stdout); | 249 | printf("."); fflush(stdout); |
232 | } | 250 | } |
233 | for(loop = 0; loop < 512; loop++) | 251 | for(loop = 0; loop < 512; loop++) |
234 | { | 252 | { |
235 | free((char *)(ENGINE_get_id(block[loop]))); | 253 | OPENSSL_free((void *)ENGINE_get_id(block[loop])); |
236 | free((char *)(ENGINE_get_name(block[loop]))); | 254 | OPENSSL_free((void *)ENGINE_get_name(block[loop])); |
237 | } | 255 | } |
238 | printf("\nTests completed happily\n"); | 256 | printf("\nTests completed happily\n"); |
239 | to_return = 0; | 257 | to_return = 0; |
@@ -247,5 +265,10 @@ end: | |||
247 | for(loop = 0; loop < 512; loop++) | 265 | for(loop = 0; loop < 512; loop++) |
248 | if(block[loop]) | 266 | if(block[loop]) |
249 | ENGINE_free(block[loop]); | 267 | ENGINE_free(block[loop]); |
268 | ENGINE_cleanup(); | ||
269 | CRYPTO_cleanup_all_ex_data(); | ||
270 | ERR_free_strings(); | ||
271 | ERR_remove_state(0); | ||
272 | CRYPTO_mem_leaks_fp(stderr); | ||
250 | return to_return; | 273 | return to_return; |
251 | } | 274 | } |
diff --git a/src/lib/libcrypto/engine/hw_4758_cca.c b/src/lib/libcrypto/engine/hw_4758_cca.c index 959d8f1a61..77d3d2ffdf 100644 --- a/src/lib/libcrypto/engine/hw_4758_cca.c +++ b/src/lib/libcrypto/engine/hw_4758_cca.c | |||
@@ -287,13 +287,13 @@ err: | |||
287 | DSO_free(dso); | 287 | DSO_free(dso); |
288 | dso = NULL; | 288 | dso = NULL; |
289 | 289 | ||
290 | keyRecordRead = (F_KEYRECORDREAD)NULL; | 290 | keyRecordRead = (F_KEYRECORDREAD)0; |
291 | randomNumberGenerate = (F_RANDOMNUMBERGENERATE)NULL; | 291 | randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; |
292 | digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)NULL; | 292 | digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)0; |
293 | digitalSignatureVerify = (F_DIGITALSIGNATUREVERIFY)NULL; | 293 | digitalSignatureVerify = (F_DIGITALSIGNATUREVERIFY)0; |
294 | publicKeyExtract = (F_PUBLICKEYEXTRACT)NULL; | 294 | publicKeyExtract = (F_PUBLICKEYEXTRACT)0; |
295 | pkaEncrypt = (F_PKAENCRYPT)NULL; | 295 | pkaEncrypt = (F_PKAENCRYPT)0; |
296 | pkaDecrypt = (F_PKADECRYPT)NULL; | 296 | pkaDecrypt = (F_PKADECRYPT)0; |
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
299 | 299 | ||
@@ -312,13 +312,13 @@ static int ibm_4758_cca_finish(ENGINE *e) | |||
312 | return 0; | 312 | return 0; |
313 | } | 313 | } |
314 | dso = NULL; | 314 | dso = NULL; |
315 | keyRecordRead = (F_KEYRECORDREAD)NULL; | 315 | keyRecordRead = (F_KEYRECORDREAD)0; |
316 | randomNumberGenerate = (F_RANDOMNUMBERGENERATE)NULL; | 316 | randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; |
317 | digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)NULL; | 317 | digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)0; |
318 | digitalSignatureVerify = (F_DIGITALSIGNATUREVERIFY)NULL; | 318 | digitalSignatureVerify = (F_DIGITALSIGNATUREVERIFY)0; |
319 | publicKeyExtract = (F_PUBLICKEYEXTRACT)NULL; | 319 | publicKeyExtract = (F_PUBLICKEYEXTRACT)0; |
320 | pkaEncrypt = (F_PKAENCRYPT)NULL; | 320 | pkaEncrypt = (F_PKAENCRYPT)0; |
321 | pkaDecrypt = (F_PKADECRYPT)NULL; | 321 | pkaDecrypt = (F_PKADECRYPT)0; |
322 | return 1; | 322 | return 1; |
323 | } | 323 | } |
324 | 324 | ||
diff --git a/src/lib/libcrypto/engine/hw_atalla.c b/src/lib/libcrypto/engine/hw_atalla.c index 3bb992a193..696cfcf156 100644 --- a/src/lib/libcrypto/engine/hw_atalla.c +++ b/src/lib/libcrypto/engine/hw_atalla.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
@@ -60,11 +60,10 @@ | |||
60 | #include <openssl/crypto.h> | 60 | #include <openssl/crypto.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/dso.h> | 62 | #include <openssl/dso.h> |
63 | #include "engine_int.h" | ||
64 | #include <openssl/engine.h> | 63 | #include <openssl/engine.h> |
65 | 64 | ||
66 | #ifndef NO_HW | 65 | #ifndef OPENSSL_NO_HW |
67 | #ifndef NO_HW_ATALLA | 66 | #ifndef OPENSSL_NO_HW_ATALLA |
68 | 67 | ||
69 | #ifdef FLAT_INC | 68 | #ifdef FLAT_INC |
70 | #include "atalla.h" | 69 | #include "atalla.h" |
@@ -72,19 +71,27 @@ | |||
72 | #include "vendor_defns/atalla.h" | 71 | #include "vendor_defns/atalla.h" |
73 | #endif | 72 | #endif |
74 | 73 | ||
75 | static int atalla_init(void); | 74 | #define ATALLA_LIB_NAME "atalla engine" |
76 | static int atalla_finish(void); | 75 | #include "hw_atalla_err.c" |
76 | |||
77 | static int atalla_destroy(ENGINE *e); | ||
78 | static int atalla_init(ENGINE *e); | ||
79 | static int atalla_finish(ENGINE *e); | ||
80 | static int atalla_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); | ||
77 | 81 | ||
78 | /* BIGNUM stuff */ | 82 | /* BIGNUM stuff */ |
79 | static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 83 | static int atalla_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
80 | const BIGNUM *m, BN_CTX *ctx); | 84 | const BIGNUM *m, BN_CTX *ctx); |
81 | 85 | ||
86 | #ifndef OPENSSL_NO_RSA | ||
82 | /* RSA stuff */ | 87 | /* RSA stuff */ |
83 | static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa); | 88 | static int atalla_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa); |
89 | #endif | ||
84 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 90 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
85 | static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 91 | static int atalla_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
86 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 92 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
87 | 93 | ||
94 | #ifndef OPENSSL_NO_DSA | ||
88 | /* DSA stuff */ | 95 | /* DSA stuff */ |
89 | static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, | 96 | static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, |
90 | BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, | 97 | BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, |
@@ -92,13 +99,27 @@ static int atalla_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, | |||
92 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, | 99 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, |
93 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | 100 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, |
94 | BN_MONT_CTX *m_ctx); | 101 | BN_MONT_CTX *m_ctx); |
102 | #endif | ||
95 | 103 | ||
104 | #ifndef OPENSSL_NO_DH | ||
96 | /* DH stuff */ | 105 | /* DH stuff */ |
97 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | 106 | /* This function is alised to mod_exp (with the DH and mont dropped). */ |
98 | static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 107 | static int atalla_mod_exp_dh(const DH *dh, BIGNUM *r, |
108 | const BIGNUM *a, const BIGNUM *p, | ||
99 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 109 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
110 | #endif | ||
100 | 111 | ||
112 | /* The definitions for control commands specific to this engine */ | ||
113 | #define ATALLA_CMD_SO_PATH ENGINE_CMD_BASE | ||
114 | static const ENGINE_CMD_DEFN atalla_cmd_defns[] = { | ||
115 | {ATALLA_CMD_SO_PATH, | ||
116 | "SO_PATH", | ||
117 | "Specifies the path to the 'atasi' shared library", | ||
118 | ENGINE_CMD_FLAG_STRING}, | ||
119 | {0, NULL, NULL, 0} | ||
120 | }; | ||
101 | 121 | ||
122 | #ifndef OPENSSL_NO_RSA | ||
102 | /* Our internal RSA_METHOD that we provide pointers to */ | 123 | /* Our internal RSA_METHOD that we provide pointers to */ |
103 | static RSA_METHOD atalla_rsa = | 124 | static RSA_METHOD atalla_rsa = |
104 | { | 125 | { |
@@ -116,7 +137,9 @@ static RSA_METHOD atalla_rsa = | |||
116 | NULL, | 137 | NULL, |
117 | NULL | 138 | NULL |
118 | }; | 139 | }; |
140 | #endif | ||
119 | 141 | ||
142 | #ifndef OPENSSL_NO_DSA | ||
120 | /* Our internal DSA_METHOD that we provide pointers to */ | 143 | /* Our internal DSA_METHOD that we provide pointers to */ |
121 | static DSA_METHOD atalla_dsa = | 144 | static DSA_METHOD atalla_dsa = |
122 | { | 145 | { |
@@ -131,7 +154,9 @@ static DSA_METHOD atalla_dsa = | |||
131 | 0, /* flags */ | 154 | 0, /* flags */ |
132 | NULL /* app_data */ | 155 | NULL /* app_data */ |
133 | }; | 156 | }; |
157 | #endif | ||
134 | 158 | ||
159 | #ifndef OPENSSL_NO_DH | ||
135 | /* Our internal DH_METHOD that we provide pointers to */ | 160 | /* Our internal DH_METHOD that we provide pointers to */ |
136 | static DH_METHOD atalla_dh = | 161 | static DH_METHOD atalla_dh = |
137 | { | 162 | { |
@@ -144,36 +169,44 @@ static DH_METHOD atalla_dh = | |||
144 | 0, | 169 | 0, |
145 | NULL | 170 | NULL |
146 | }; | 171 | }; |
172 | #endif | ||
147 | 173 | ||
148 | /* Our ENGINE structure. */ | 174 | /* Constants used when creating the ENGINE */ |
149 | static ENGINE engine_atalla = | 175 | static const char *engine_atalla_id = "atalla"; |
150 | { | 176 | static const char *engine_atalla_name = "Atalla hardware engine support"; |
151 | "atalla", | 177 | |
152 | "Atalla hardware engine support", | 178 | /* This internal function is used by ENGINE_atalla() and possibly by the |
153 | &atalla_rsa, | 179 | * "dynamic" ENGINE support too */ |
154 | &atalla_dsa, | 180 | static int bind_helper(ENGINE *e) |
155 | &atalla_dh, | ||
156 | NULL, | ||
157 | atalla_mod_exp, | ||
158 | NULL, | ||
159 | atalla_init, | ||
160 | atalla_finish, | ||
161 | NULL, /* no ctrl() */ | ||
162 | NULL, /* no load_privkey() */ | ||
163 | NULL, /* no load_pubkey() */ | ||
164 | 0, /* no flags */ | ||
165 | 0, 0, /* no references */ | ||
166 | NULL, NULL /* unlinked */ | ||
167 | }; | ||
168 | |||
169 | /* As this is only ever called once, there's no need for locking | ||
170 | * (indeed - the lock will already be held by our caller!!!) */ | ||
171 | ENGINE *ENGINE_atalla() | ||
172 | { | 181 | { |
173 | RSA_METHOD *meth1; | 182 | #ifndef OPENSSL_NO_RSA |
174 | DSA_METHOD *meth2; | 183 | const RSA_METHOD *meth1; |
175 | DH_METHOD *meth3; | 184 | #endif |
185 | #ifndef OPENSSL_NO_DSA | ||
186 | const DSA_METHOD *meth2; | ||
187 | #endif | ||
188 | #ifndef OPENSSL_NO_DH | ||
189 | const DH_METHOD *meth3; | ||
190 | #endif | ||
191 | if(!ENGINE_set_id(e, engine_atalla_id) || | ||
192 | !ENGINE_set_name(e, engine_atalla_name) || | ||
193 | #ifndef OPENSSL_NO_RSA | ||
194 | !ENGINE_set_RSA(e, &atalla_rsa) || | ||
195 | #endif | ||
196 | #ifndef OPENSSL_NO_DSA | ||
197 | !ENGINE_set_DSA(e, &atalla_dsa) || | ||
198 | #endif | ||
199 | #ifndef OPENSSL_NO_DH | ||
200 | !ENGINE_set_DH(e, &atalla_dh) || | ||
201 | #endif | ||
202 | !ENGINE_set_destroy_function(e, atalla_destroy) || | ||
203 | !ENGINE_set_init_function(e, atalla_init) || | ||
204 | !ENGINE_set_finish_function(e, atalla_finish) || | ||
205 | !ENGINE_set_ctrl_function(e, atalla_ctrl) || | ||
206 | !ENGINE_set_cmd_defns(e, atalla_cmd_defns)) | ||
207 | return 0; | ||
176 | 208 | ||
209 | #ifndef OPENSSL_NO_RSA | ||
177 | /* We know that the "PKCS1_SSLeay()" functions hook properly | 210 | /* We know that the "PKCS1_SSLeay()" functions hook properly |
178 | * to the atalla-specific mod_exp and mod_exp_crt so we use | 211 | * to the atalla-specific mod_exp and mod_exp_crt so we use |
179 | * those functions. NB: We don't use ENGINE_openssl() or | 212 | * those functions. NB: We don't use ENGINE_openssl() or |
@@ -186,19 +219,50 @@ ENGINE *ENGINE_atalla() | |||
186 | atalla_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | 219 | atalla_rsa.rsa_pub_dec = meth1->rsa_pub_dec; |
187 | atalla_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | 220 | atalla_rsa.rsa_priv_enc = meth1->rsa_priv_enc; |
188 | atalla_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | 221 | atalla_rsa.rsa_priv_dec = meth1->rsa_priv_dec; |
222 | #endif | ||
189 | 223 | ||
224 | #ifndef OPENSSL_NO_DSA | ||
190 | /* Use the DSA_OpenSSL() method and just hook the mod_exp-ish | 225 | /* Use the DSA_OpenSSL() method and just hook the mod_exp-ish |
191 | * bits. */ | 226 | * bits. */ |
192 | meth2 = DSA_OpenSSL(); | 227 | meth2 = DSA_OpenSSL(); |
193 | atalla_dsa.dsa_do_sign = meth2->dsa_do_sign; | 228 | atalla_dsa.dsa_do_sign = meth2->dsa_do_sign; |
194 | atalla_dsa.dsa_sign_setup = meth2->dsa_sign_setup; | 229 | atalla_dsa.dsa_sign_setup = meth2->dsa_sign_setup; |
195 | atalla_dsa.dsa_do_verify = meth2->dsa_do_verify; | 230 | atalla_dsa.dsa_do_verify = meth2->dsa_do_verify; |
231 | #endif | ||
196 | 232 | ||
233 | #ifndef OPENSSL_NO_DH | ||
197 | /* Much the same for Diffie-Hellman */ | 234 | /* Much the same for Diffie-Hellman */ |
198 | meth3 = DH_OpenSSL(); | 235 | meth3 = DH_OpenSSL(); |
199 | atalla_dh.generate_key = meth3->generate_key; | 236 | atalla_dh.generate_key = meth3->generate_key; |
200 | atalla_dh.compute_key = meth3->compute_key; | 237 | atalla_dh.compute_key = meth3->compute_key; |
201 | return &engine_atalla; | 238 | #endif |
239 | |||
240 | /* Ensure the atalla error handling is set up */ | ||
241 | ERR_load_ATALLA_strings(); | ||
242 | return 1; | ||
243 | } | ||
244 | |||
245 | static ENGINE *engine_atalla(void) | ||
246 | { | ||
247 | ENGINE *ret = ENGINE_new(); | ||
248 | if(!ret) | ||
249 | return NULL; | ||
250 | if(!bind_helper(ret)) | ||
251 | { | ||
252 | ENGINE_free(ret); | ||
253 | return NULL; | ||
254 | } | ||
255 | return ret; | ||
256 | } | ||
257 | |||
258 | void ENGINE_load_atalla(void) | ||
259 | { | ||
260 | /* Copied from eng_[openssl|dyn].c */ | ||
261 | ENGINE *toadd = engine_atalla(); | ||
262 | if(!toadd) return; | ||
263 | ENGINE_add(toadd); | ||
264 | ENGINE_free(toadd); | ||
265 | ERR_clear_error(); | ||
202 | } | 266 | } |
203 | 267 | ||
204 | /* This is a process-global DSO handle used for loading and unloading | 268 | /* This is a process-global DSO handle used for loading and unloading |
@@ -214,8 +278,32 @@ static tfnASI_GetHardwareConfig *p_Atalla_GetHardwareConfig = NULL; | |||
214 | static tfnASI_RSAPrivateKeyOpFn *p_Atalla_RSAPrivateKeyOpFn = NULL; | 278 | static tfnASI_RSAPrivateKeyOpFn *p_Atalla_RSAPrivateKeyOpFn = NULL; |
215 | static tfnASI_GetPerformanceStatistics *p_Atalla_GetPerformanceStatistics = NULL; | 279 | static tfnASI_GetPerformanceStatistics *p_Atalla_GetPerformanceStatistics = NULL; |
216 | 280 | ||
281 | /* These are the static string constants for the DSO file name and the function | ||
282 | * symbol names to bind to. Regrettably, the DSO name on *nix appears to be | ||
283 | * "atasi.so" rather than something more consistent like "libatasi.so". At the | ||
284 | * time of writing, I'm not sure what the file name on win32 is but clearly | ||
285 | * native name translation is not possible (eg libatasi.so on *nix, and | ||
286 | * atasi.dll on win32). For the purposes of testing, I have created a symbollic | ||
287 | * link called "libatasi.so" so that we can use native name-translation - a | ||
288 | * better solution will be needed. */ | ||
289 | static const char def_ATALLA_LIBNAME[] = "atasi"; | ||
290 | static const char *ATALLA_LIBNAME = def_ATALLA_LIBNAME; | ||
291 | static const char *ATALLA_F1 = "ASI_GetHardwareConfig"; | ||
292 | static const char *ATALLA_F2 = "ASI_RSAPrivateKeyOpFn"; | ||
293 | static const char *ATALLA_F3 = "ASI_GetPerformanceStatistics"; | ||
294 | |||
295 | /* Destructor (complements the "ENGINE_atalla()" constructor) */ | ||
296 | static int atalla_destroy(ENGINE *e) | ||
297 | { | ||
298 | /* Unload the atalla error strings so any error state including our | ||
299 | * functs or reasons won't lead to a segfault (they simply get displayed | ||
300 | * without corresponding string data because none will be found). */ | ||
301 | ERR_unload_ATALLA_strings(); | ||
302 | return 1; | ||
303 | } | ||
304 | |||
217 | /* (de)initialisation functions. */ | 305 | /* (de)initialisation functions. */ |
218 | static int atalla_init() | 306 | static int atalla_init(ENGINE *e) |
219 | { | 307 | { |
220 | tfnASI_GetHardwareConfig *p1; | 308 | tfnASI_GetHardwareConfig *p1; |
221 | tfnASI_RSAPrivateKeyOpFn *p2; | 309 | tfnASI_RSAPrivateKeyOpFn *p2; |
@@ -226,7 +314,7 @@ static int atalla_init() | |||
226 | 314 | ||
227 | if(atalla_dso != NULL) | 315 | if(atalla_dso != NULL) |
228 | { | 316 | { |
229 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_ALREADY_LOADED); | 317 | ATALLAerr(ATALLA_F_ATALLA_INIT,ATALLA_R_ALREADY_LOADED); |
230 | goto err; | 318 | goto err; |
231 | } | 319 | } |
232 | /* Attempt to load libatasi.so/atasi.dll/whatever. Needs to be | 320 | /* Attempt to load libatasi.so/atasi.dll/whatever. Needs to be |
@@ -236,11 +324,10 @@ static int atalla_init() | |||
236 | * drivers really use - for now a symbollic link needs to be | 324 | * drivers really use - for now a symbollic link needs to be |
237 | * created on the host system from libatasi.so to atasi.so on | 325 | * created on the host system from libatasi.so to atasi.so on |
238 | * unix variants. */ | 326 | * unix variants. */ |
239 | atalla_dso = DSO_load(NULL, ATALLA_LIBNAME, NULL, | 327 | atalla_dso = DSO_load(NULL, ATALLA_LIBNAME, NULL, 0); |
240 | DSO_FLAG_NAME_TRANSLATION); | ||
241 | if(atalla_dso == NULL) | 328 | if(atalla_dso == NULL) |
242 | { | 329 | { |
243 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE); | 330 | ATALLAerr(ATALLA_F_ATALLA_INIT,ATALLA_R_NOT_LOADED); |
244 | goto err; | 331 | goto err; |
245 | } | 332 | } |
246 | if(!(p1 = (tfnASI_GetHardwareConfig *)DSO_bind_func( | 333 | if(!(p1 = (tfnASI_GetHardwareConfig *)DSO_bind_func( |
@@ -250,7 +337,7 @@ static int atalla_init() | |||
250 | !(p3 = (tfnASI_GetPerformanceStatistics *)DSO_bind_func( | 337 | !(p3 = (tfnASI_GetPerformanceStatistics *)DSO_bind_func( |
251 | atalla_dso, ATALLA_F3))) | 338 | atalla_dso, ATALLA_F3))) |
252 | { | 339 | { |
253 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_DSO_FAILURE); | 340 | ATALLAerr(ATALLA_F_ATALLA_INIT,ATALLA_R_NOT_LOADED); |
254 | goto err; | 341 | goto err; |
255 | } | 342 | } |
256 | /* Copy the pointers */ | 343 | /* Copy the pointers */ |
@@ -261,7 +348,7 @@ static int atalla_init() | |||
261 | * running. */ | 348 | * running. */ |
262 | if(p1(0L, config_buf) != 0) | 349 | if(p1(0L, config_buf) != 0) |
263 | { | 350 | { |
264 | ENGINEerr(ENGINE_F_ATALLA_INIT,ENGINE_R_UNIT_FAILURE); | 351 | ATALLAerr(ATALLA_F_ATALLA_INIT,ATALLA_R_UNIT_FAILURE); |
265 | goto err; | 352 | goto err; |
266 | } | 353 | } |
267 | /* Everything's fine. */ | 354 | /* Everything's fine. */ |
@@ -275,16 +362,16 @@ err: | |||
275 | return 0; | 362 | return 0; |
276 | } | 363 | } |
277 | 364 | ||
278 | static int atalla_finish() | 365 | static int atalla_finish(ENGINE *e) |
279 | { | 366 | { |
280 | if(atalla_dso == NULL) | 367 | if(atalla_dso == NULL) |
281 | { | 368 | { |
282 | ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_NOT_LOADED); | 369 | ATALLAerr(ATALLA_F_ATALLA_FINISH,ATALLA_R_NOT_LOADED); |
283 | return 0; | 370 | return 0; |
284 | } | 371 | } |
285 | if(!DSO_free(atalla_dso)) | 372 | if(!DSO_free(atalla_dso)) |
286 | { | 373 | { |
287 | ENGINEerr(ENGINE_F_ATALLA_FINISH,ENGINE_R_DSO_FAILURE); | 374 | ATALLAerr(ATALLA_F_ATALLA_FINISH,ATALLA_R_UNIT_FAILURE); |
288 | return 0; | 375 | return 0; |
289 | } | 376 | } |
290 | atalla_dso = NULL; | 377 | atalla_dso = NULL; |
@@ -294,7 +381,32 @@ static int atalla_finish() | |||
294 | return 1; | 381 | return 1; |
295 | } | 382 | } |
296 | 383 | ||
297 | static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 384 | static int atalla_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) |
385 | { | ||
386 | int initialised = ((atalla_dso == NULL) ? 0 : 1); | ||
387 | switch(cmd) | ||
388 | { | ||
389 | case ATALLA_CMD_SO_PATH: | ||
390 | if(p == NULL) | ||
391 | { | ||
392 | ATALLAerr(ATALLA_F_ATALLA_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
393 | return 0; | ||
394 | } | ||
395 | if(initialised) | ||
396 | { | ||
397 | ATALLAerr(ATALLA_F_ATALLA_CTRL,ATALLA_R_ALREADY_LOADED); | ||
398 | return 0; | ||
399 | } | ||
400 | ATALLA_LIBNAME = (const char *)p; | ||
401 | return 1; | ||
402 | default: | ||
403 | break; | ||
404 | } | ||
405 | ATALLAerr(ATALLA_F_ATALLA_CTRL,ATALLA_R_CTRL_COMMAND_NOT_IMPLEMENTED); | ||
406 | return 0; | ||
407 | } | ||
408 | |||
409 | static int atalla_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, | ||
298 | const BIGNUM *m, BN_CTX *ctx) | 410 | const BIGNUM *m, BN_CTX *ctx) |
299 | { | 411 | { |
300 | /* I need somewhere to store temporary serialised values for | 412 | /* I need somewhere to store temporary serialised values for |
@@ -313,26 +425,27 @@ static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
313 | to_return = 0; /* expect failure */ | 425 | to_return = 0; /* expect failure */ |
314 | 426 | ||
315 | if(!atalla_dso) | 427 | if(!atalla_dso) |
316 | { | 428 | { |
317 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_NOT_LOADED); | 429 | ATALLAerr(ATALLA_F_ATALLA_MOD_EXP,ATALLA_R_NOT_LOADED); |
318 | goto err; | 430 | goto err; |
319 | } | 431 | } |
320 | /* Prepare the params */ | 432 | /* Prepare the params */ |
433 | BN_CTX_start(ctx); | ||
321 | modulus = BN_CTX_get(ctx); | 434 | modulus = BN_CTX_get(ctx); |
322 | exponent = BN_CTX_get(ctx); | 435 | exponent = BN_CTX_get(ctx); |
323 | argument = BN_CTX_get(ctx); | 436 | argument = BN_CTX_get(ctx); |
324 | result = BN_CTX_get(ctx); | 437 | result = BN_CTX_get(ctx); |
325 | if(!modulus || !exponent || !argument || !result) | 438 | if (!result) |
326 | { | 439 | { |
327 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_CTX_FULL); | 440 | ATALLAerr(ATALLA_F_ATALLA_MOD_EXP,ATALLA_R_BN_CTX_FULL); |
328 | goto err; | 441 | goto err; |
329 | } | 442 | } |
330 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, m->top) || | 443 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, m->top) || |
331 | !bn_wexpand(argument, m->top) || !bn_wexpand(result, m->top)) | 444 | !bn_wexpand(argument, m->top) || !bn_wexpand(result, m->top)) |
332 | { | 445 | { |
333 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL); | 446 | ATALLAerr(ATALLA_F_ATALLA_MOD_EXP,ATALLA_R_BN_EXPAND_FAIL); |
334 | goto err; | 447 | goto err; |
335 | } | 448 | } |
336 | /* Prepare the key-data */ | 449 | /* Prepare the key-data */ |
337 | memset(&keydata, 0,sizeof keydata); | 450 | memset(&keydata, 0,sizeof keydata); |
338 | numbytes = BN_num_bytes(m); | 451 | numbytes = BN_num_bytes(m); |
@@ -352,36 +465,34 @@ static int atalla_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
352 | if(p_Atalla_RSAPrivateKeyOpFn(&keydata, (unsigned char *)result->d, | 465 | if(p_Atalla_RSAPrivateKeyOpFn(&keydata, (unsigned char *)result->d, |
353 | (unsigned char *)argument->d, | 466 | (unsigned char *)argument->d, |
354 | keydata.modulus.len) != 0) | 467 | keydata.modulus.len) != 0) |
355 | { | 468 | { |
356 | ENGINEerr(ENGINE_F_ATALLA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 469 | ATALLAerr(ATALLA_F_ATALLA_MOD_EXP,ATALLA_R_REQUEST_FAILED); |
357 | goto err; | 470 | goto err; |
358 | } | 471 | } |
359 | /* Convert the response */ | 472 | /* Convert the response */ |
360 | BN_bin2bn((unsigned char *)result->d, numbytes, r); | 473 | BN_bin2bn((unsigned char *)result->d, numbytes, r); |
361 | to_return = 1; | 474 | to_return = 1; |
362 | err: | 475 | err: |
363 | if(modulus) ctx->tos--; | 476 | BN_CTX_end(ctx); |
364 | if(exponent) ctx->tos--; | ||
365 | if(argument) ctx->tos--; | ||
366 | if(result) ctx->tos--; | ||
367 | return to_return; | 477 | return to_return; |
368 | } | 478 | } |
369 | 479 | ||
370 | static int atalla_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | 480 | #ifndef OPENSSL_NO_RSA |
481 | static int atalla_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa) | ||
371 | { | 482 | { |
372 | BN_CTX *ctx = NULL; | 483 | BN_CTX *ctx = NULL; |
373 | int to_return = 0; | 484 | int to_return = 0; |
374 | 485 | ||
375 | if(!atalla_dso) | 486 | if(!atalla_dso) |
376 | { | 487 | { |
377 | ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_NOT_LOADED); | 488 | ATALLAerr(ATALLA_F_ATALLA_RSA_MOD_EXP,ATALLA_R_NOT_LOADED); |
378 | goto err; | 489 | goto err; |
379 | } | 490 | } |
380 | if((ctx = BN_CTX_new()) == NULL) | 491 | if((ctx = BN_CTX_new()) == NULL) |
381 | goto err; | 492 | goto err; |
382 | if(!rsa->d || !rsa->n) | 493 | if(!rsa->d || !rsa->n) |
383 | { | 494 | { |
384 | ENGINEerr(ENGINE_F_ATALLA_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS); | 495 | ATALLAerr(ATALLA_F_ATALLA_RSA_MOD_EXP,ATALLA_R_MISSING_KEY_COMPONENTS); |
385 | goto err; | 496 | goto err; |
386 | } | 497 | } |
387 | to_return = atalla_mod_exp(r0, I, rsa->d, rsa->n, ctx); | 498 | to_return = atalla_mod_exp(r0, I, rsa->d, rsa->n, ctx); |
@@ -390,7 +501,9 @@ err: | |||
390 | BN_CTX_free(ctx); | 501 | BN_CTX_free(ctx); |
391 | return to_return; | 502 | return to_return; |
392 | } | 503 | } |
504 | #endif | ||
393 | 505 | ||
506 | #ifndef OPENSSL_NO_DSA | ||
394 | /* This code was liberated and adapted from the commented-out code in | 507 | /* This code was liberated and adapted from the commented-out code in |
395 | * dsa_ossl.c. Because of the unoptimised form of the Atalla acceleration | 508 | * dsa_ossl.c. Because of the unoptimised form of the Atalla acceleration |
396 | * (it doesn't have a CRT form for RSA), this function means that an | 509 | * (it doesn't have a CRT form for RSA), this function means that an |
@@ -418,27 +531,45 @@ end: | |||
418 | return to_return; | 531 | return to_return; |
419 | } | 532 | } |
420 | 533 | ||
421 | |||
422 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, | 534 | static int atalla_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a, |
423 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, | 535 | const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, |
424 | BN_MONT_CTX *m_ctx) | 536 | BN_MONT_CTX *m_ctx) |
425 | { | 537 | { |
426 | return atalla_mod_exp(r, a, p, m, ctx); | 538 | return atalla_mod_exp(r, a, p, m, ctx); |
427 | } | 539 | } |
540 | #endif | ||
428 | 541 | ||
429 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 542 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
430 | static int atalla_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 543 | static int atalla_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
431 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 544 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
432 | { | 545 | { |
433 | return atalla_mod_exp(r, a, p, m, ctx); | 546 | return atalla_mod_exp(r, a, p, m, ctx); |
434 | } | 547 | } |
435 | 548 | ||
549 | #ifndef OPENSSL_NO_DH | ||
436 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | 550 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ |
437 | static int atalla_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 551 | static int atalla_mod_exp_dh(const DH *dh, BIGNUM *r, |
552 | const BIGNUM *a, const BIGNUM *p, | ||
438 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 553 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
439 | { | 554 | { |
440 | return atalla_mod_exp(r, a, p, m, ctx); | 555 | return atalla_mod_exp(r, a, p, m, ctx); |
441 | } | 556 | } |
557 | #endif | ||
558 | |||
559 | /* This stuff is needed if this ENGINE is being compiled into a self-contained | ||
560 | * shared-library. */ | ||
561 | #ifdef ENGINE_DYNAMIC_SUPPORT | ||
562 | static int bind_fn(ENGINE *e, const char *id) | ||
563 | { | ||
564 | if(id && (strcmp(id, engine_atalla_id) != 0)) | ||
565 | return 0; | ||
566 | if(!bind_helper(e)) | ||
567 | return 0; | ||
568 | return 1; | ||
569 | } | ||
570 | IMPLEMENT_DYNAMIC_CHECK_FN() | ||
571 | IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) | ||
572 | #endif /* ENGINE_DYNAMIC_SUPPORT */ | ||
442 | 573 | ||
443 | #endif /* !NO_HW_ATALLA */ | 574 | #endif /* !OPENSSL_NO_HW_ATALLA */ |
444 | #endif /* !NO_HW */ | 575 | #endif /* !OPENSSL_NO_HW */ |
diff --git a/src/lib/libcrypto/engine/hw_cswift.c b/src/lib/libcrypto/engine/hw_cswift.c index 77608b8983..d8b380550f 100644 --- a/src/lib/libcrypto/engine/hw_cswift.c +++ b/src/lib/libcrypto/engine/hw_cswift.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
@@ -60,11 +60,10 @@ | |||
60 | #include <openssl/crypto.h> | 60 | #include <openssl/crypto.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/dso.h> | 62 | #include <openssl/dso.h> |
63 | #include "engine_int.h" | ||
64 | #include <openssl/engine.h> | 63 | #include <openssl/engine.h> |
65 | 64 | ||
66 | #ifndef NO_HW | 65 | #ifndef OPENSSL_NO_HW |
67 | #ifndef NO_HW_CSWIFT | 66 | #ifndef OPENSSL_NO_HW_CSWIFT |
68 | 67 | ||
69 | /* Attribution notice: Rainbow have generously allowed me to reproduce | 68 | /* Attribution notice: Rainbow have generously allowed me to reproduce |
70 | * the necessary definitions here from their API. This means the support | 69 | * the necessary definitions here from their API. This means the support |
@@ -84,33 +83,55 @@ | |||
84 | #include "vendor_defns/cswift.h" | 83 | #include "vendor_defns/cswift.h" |
85 | #endif | 84 | #endif |
86 | 85 | ||
87 | static int cswift_init(void); | 86 | #define CSWIFT_LIB_NAME "cswift engine" |
88 | static int cswift_finish(void); | 87 | #include "hw_cswift_err.c" |
88 | |||
89 | static int cswift_destroy(ENGINE *e); | ||
90 | static int cswift_init(ENGINE *e); | ||
91 | static int cswift_finish(ENGINE *e); | ||
92 | static int cswift_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); | ||
89 | 93 | ||
90 | /* BIGNUM stuff */ | 94 | /* BIGNUM stuff */ |
91 | static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 95 | static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
92 | const BIGNUM *m, BN_CTX *ctx); | 96 | const BIGNUM *m, BN_CTX *ctx); |
93 | static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 97 | static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
94 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | 98 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, |
95 | const BIGNUM *iqmp, BN_CTX *ctx); | 99 | const BIGNUM *iqmp, BN_CTX *ctx); |
96 | 100 | ||
101 | #ifndef OPENSSL_NO_RSA | ||
97 | /* RSA stuff */ | 102 | /* RSA stuff */ |
98 | static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa); | 103 | static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa); |
104 | #endif | ||
99 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 105 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
100 | static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 106 | static int cswift_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
101 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 107 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
102 | 108 | ||
109 | #ifndef OPENSSL_NO_DSA | ||
103 | /* DSA stuff */ | 110 | /* DSA stuff */ |
104 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa); | 111 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa); |
105 | static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | 112 | static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, |
106 | DSA_SIG *sig, DSA *dsa); | 113 | DSA_SIG *sig, DSA *dsa); |
114 | #endif | ||
107 | 115 | ||
116 | #ifndef OPENSSL_NO_DH | ||
108 | /* DH stuff */ | 117 | /* DH stuff */ |
109 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | 118 | /* This function is alised to mod_exp (with the DH and mont dropped). */ |
110 | static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 119 | static int cswift_mod_exp_dh(const DH *dh, BIGNUM *r, |
120 | const BIGNUM *a, const BIGNUM *p, | ||
111 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 121 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
122 | #endif | ||
112 | 123 | ||
124 | /* The definitions for control commands specific to this engine */ | ||
125 | #define CSWIFT_CMD_SO_PATH ENGINE_CMD_BASE | ||
126 | static const ENGINE_CMD_DEFN cswift_cmd_defns[] = { | ||
127 | {CSWIFT_CMD_SO_PATH, | ||
128 | "SO_PATH", | ||
129 | "Specifies the path to the 'cswift' shared library", | ||
130 | ENGINE_CMD_FLAG_STRING}, | ||
131 | {0, NULL, NULL, 0} | ||
132 | }; | ||
113 | 133 | ||
134 | #ifndef OPENSSL_NO_RSA | ||
114 | /* Our internal RSA_METHOD that we provide pointers to */ | 135 | /* Our internal RSA_METHOD that we provide pointers to */ |
115 | static RSA_METHOD cswift_rsa = | 136 | static RSA_METHOD cswift_rsa = |
116 | { | 137 | { |
@@ -128,7 +149,9 @@ static RSA_METHOD cswift_rsa = | |||
128 | NULL, | 149 | NULL, |
129 | NULL | 150 | NULL |
130 | }; | 151 | }; |
152 | #endif | ||
131 | 153 | ||
154 | #ifndef OPENSSL_NO_DSA | ||
132 | /* Our internal DSA_METHOD that we provide pointers to */ | 155 | /* Our internal DSA_METHOD that we provide pointers to */ |
133 | static DSA_METHOD cswift_dsa = | 156 | static DSA_METHOD cswift_dsa = |
134 | { | 157 | { |
@@ -143,7 +166,9 @@ static DSA_METHOD cswift_dsa = | |||
143 | 0, /* flags */ | 166 | 0, /* flags */ |
144 | NULL /* app_data */ | 167 | NULL /* app_data */ |
145 | }; | 168 | }; |
169 | #endif | ||
146 | 170 | ||
171 | #ifndef OPENSSL_NO_DH | ||
147 | /* Our internal DH_METHOD that we provide pointers to */ | 172 | /* Our internal DH_METHOD that we provide pointers to */ |
148 | static DH_METHOD cswift_dh = | 173 | static DH_METHOD cswift_dh = |
149 | { | 174 | { |
@@ -156,35 +181,41 @@ static DH_METHOD cswift_dh = | |||
156 | 0, | 181 | 0, |
157 | NULL | 182 | NULL |
158 | }; | 183 | }; |
184 | #endif | ||
159 | 185 | ||
160 | /* Our ENGINE structure. */ | 186 | /* Constants used when creating the ENGINE */ |
161 | static ENGINE engine_cswift = | 187 | static const char *engine_cswift_id = "cswift"; |
162 | { | 188 | static const char *engine_cswift_name = "CryptoSwift hardware engine support"; |
163 | "cswift", | 189 | |
164 | "CryptoSwift hardware engine support", | 190 | /* This internal function is used by ENGINE_cswift() and possibly by the |
165 | &cswift_rsa, | 191 | * "dynamic" ENGINE support too */ |
166 | &cswift_dsa, | 192 | static int bind_helper(ENGINE *e) |
167 | &cswift_dh, | ||
168 | NULL, | ||
169 | cswift_mod_exp, | ||
170 | cswift_mod_exp_crt, | ||
171 | cswift_init, | ||
172 | cswift_finish, | ||
173 | NULL, /* no ctrl() */ | ||
174 | NULL, /* no load_privkey() */ | ||
175 | NULL, /* no load_pubkey() */ | ||
176 | 0, /* no flags */ | ||
177 | 0, 0, /* no references */ | ||
178 | NULL, NULL /* unlinked */ | ||
179 | }; | ||
180 | |||
181 | /* As this is only ever called once, there's no need for locking | ||
182 | * (indeed - the lock will already be held by our caller!!!) */ | ||
183 | ENGINE *ENGINE_cswift() | ||
184 | { | 193 | { |
185 | RSA_METHOD *meth1; | 194 | #ifndef OPENSSL_NO_RSA |
186 | DH_METHOD *meth2; | 195 | const RSA_METHOD *meth1; |
196 | #endif | ||
197 | #ifndef OPENSSL_NO_DH | ||
198 | const DH_METHOD *meth2; | ||
199 | #endif | ||
200 | if(!ENGINE_set_id(e, engine_cswift_id) || | ||
201 | !ENGINE_set_name(e, engine_cswift_name) || | ||
202 | #ifndef OPENSSL_NO_RSA | ||
203 | !ENGINE_set_RSA(e, &cswift_rsa) || | ||
204 | #endif | ||
205 | #ifndef OPENSSL_NO_DSA | ||
206 | !ENGINE_set_DSA(e, &cswift_dsa) || | ||
207 | #endif | ||
208 | #ifndef OPENSSL_NO_DH | ||
209 | !ENGINE_set_DH(e, &cswift_dh) || | ||
210 | #endif | ||
211 | !ENGINE_set_destroy_function(e, cswift_destroy) || | ||
212 | !ENGINE_set_init_function(e, cswift_init) || | ||
213 | !ENGINE_set_finish_function(e, cswift_finish) || | ||
214 | !ENGINE_set_ctrl_function(e, cswift_ctrl) || | ||
215 | !ENGINE_set_cmd_defns(e, cswift_cmd_defns)) | ||
216 | return 0; | ||
187 | 217 | ||
218 | #ifndef OPENSSL_NO_RSA | ||
188 | /* We know that the "PKCS1_SSLeay()" functions hook properly | 219 | /* We know that the "PKCS1_SSLeay()" functions hook properly |
189 | * to the cswift-specific mod_exp and mod_exp_crt so we use | 220 | * to the cswift-specific mod_exp and mod_exp_crt so we use |
190 | * those functions. NB: We don't use ENGINE_openssl() or | 221 | * those functions. NB: We don't use ENGINE_openssl() or |
@@ -197,12 +228,41 @@ ENGINE *ENGINE_cswift() | |||
197 | cswift_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | 228 | cswift_rsa.rsa_pub_dec = meth1->rsa_pub_dec; |
198 | cswift_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | 229 | cswift_rsa.rsa_priv_enc = meth1->rsa_priv_enc; |
199 | cswift_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | 230 | cswift_rsa.rsa_priv_dec = meth1->rsa_priv_dec; |
231 | #endif | ||
200 | 232 | ||
233 | #ifndef OPENSSL_NO_DH | ||
201 | /* Much the same for Diffie-Hellman */ | 234 | /* Much the same for Diffie-Hellman */ |
202 | meth2 = DH_OpenSSL(); | 235 | meth2 = DH_OpenSSL(); |
203 | cswift_dh.generate_key = meth2->generate_key; | 236 | cswift_dh.generate_key = meth2->generate_key; |
204 | cswift_dh.compute_key = meth2->compute_key; | 237 | cswift_dh.compute_key = meth2->compute_key; |
205 | return &engine_cswift; | 238 | #endif |
239 | |||
240 | /* Ensure the cswift error handling is set up */ | ||
241 | ERR_load_CSWIFT_strings(); | ||
242 | return 1; | ||
243 | } | ||
244 | |||
245 | static ENGINE *engine_cswift(void) | ||
246 | { | ||
247 | ENGINE *ret = ENGINE_new(); | ||
248 | if(!ret) | ||
249 | return NULL; | ||
250 | if(!bind_helper(ret)) | ||
251 | { | ||
252 | ENGINE_free(ret); | ||
253 | return NULL; | ||
254 | } | ||
255 | return ret; | ||
256 | } | ||
257 | |||
258 | void ENGINE_load_cswift(void) | ||
259 | { | ||
260 | /* Copied from eng_[openssl|dyn].c */ | ||
261 | ENGINE *toadd = engine_cswift(); | ||
262 | if(!toadd) return; | ||
263 | ENGINE_add(toadd); | ||
264 | ENGINE_free(toadd); | ||
265 | ERR_clear_error(); | ||
206 | } | 266 | } |
207 | 267 | ||
208 | /* This is a process-global DSO handle used for loading and unloading | 268 | /* This is a process-global DSO handle used for loading and unloading |
@@ -220,7 +280,8 @@ t_swSimpleRequest *p_CSwift_SimpleRequest = NULL; | |||
220 | t_swReleaseAccContext *p_CSwift_ReleaseAccContext = NULL; | 280 | t_swReleaseAccContext *p_CSwift_ReleaseAccContext = NULL; |
221 | 281 | ||
222 | /* Used in the DSO operations. */ | 282 | /* Used in the DSO operations. */ |
223 | static const char *CSWIFT_LIBNAME = "swift"; | 283 | static const char def_CSWIFT_LIBNAME[] = "swift"; |
284 | static const char *CSWIFT_LIBNAME = def_CSWIFT_LIBNAME; | ||
224 | static const char *CSWIFT_F1 = "swAcquireAccContext"; | 285 | static const char *CSWIFT_F1 = "swAcquireAccContext"; |
225 | static const char *CSWIFT_F2 = "swAttachKeyParam"; | 286 | static const char *CSWIFT_F2 = "swAttachKeyParam"; |
226 | static const char *CSWIFT_F3 = "swSimpleRequest"; | 287 | static const char *CSWIFT_F3 = "swSimpleRequest"; |
@@ -249,8 +310,15 @@ static void release_context(SW_CONTEXT_HANDLE hac) | |||
249 | p_CSwift_ReleaseAccContext(hac); | 310 | p_CSwift_ReleaseAccContext(hac); |
250 | } | 311 | } |
251 | 312 | ||
313 | /* Destructor (complements the "ENGINE_cswift()" constructor) */ | ||
314 | static int cswift_destroy(ENGINE *e) | ||
315 | { | ||
316 | ERR_unload_CSWIFT_strings(); | ||
317 | return 1; | ||
318 | } | ||
319 | |||
252 | /* (de)initialisation functions. */ | 320 | /* (de)initialisation functions. */ |
253 | static int cswift_init() | 321 | static int cswift_init(ENGINE *e) |
254 | { | 322 | { |
255 | SW_CONTEXT_HANDLE hac; | 323 | SW_CONTEXT_HANDLE hac; |
256 | t_swAcquireAccContext *p1; | 324 | t_swAcquireAccContext *p1; |
@@ -260,15 +328,14 @@ static int cswift_init() | |||
260 | 328 | ||
261 | if(cswift_dso != NULL) | 329 | if(cswift_dso != NULL) |
262 | { | 330 | { |
263 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_ALREADY_LOADED); | 331 | CSWIFTerr(CSWIFT_F_CSWIFT_INIT,CSWIFT_R_ALREADY_LOADED); |
264 | goto err; | 332 | goto err; |
265 | } | 333 | } |
266 | /* Attempt to load libswift.so/swift.dll/whatever. */ | 334 | /* Attempt to load libswift.so/swift.dll/whatever. */ |
267 | cswift_dso = DSO_load(NULL, CSWIFT_LIBNAME, NULL, | 335 | cswift_dso = DSO_load(NULL, CSWIFT_LIBNAME, NULL, 0); |
268 | DSO_FLAG_NAME_TRANSLATION); | ||
269 | if(cswift_dso == NULL) | 336 | if(cswift_dso == NULL) |
270 | { | 337 | { |
271 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE); | 338 | CSWIFTerr(CSWIFT_F_CSWIFT_INIT,CSWIFT_R_NOT_LOADED); |
272 | goto err; | 339 | goto err; |
273 | } | 340 | } |
274 | if(!(p1 = (t_swAcquireAccContext *) | 341 | if(!(p1 = (t_swAcquireAccContext *) |
@@ -280,7 +347,7 @@ static int cswift_init() | |||
280 | !(p4 = (t_swReleaseAccContext *) | 347 | !(p4 = (t_swReleaseAccContext *) |
281 | DSO_bind_func(cswift_dso, CSWIFT_F4))) | 348 | DSO_bind_func(cswift_dso, CSWIFT_F4))) |
282 | { | 349 | { |
283 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_DSO_FAILURE); | 350 | CSWIFTerr(CSWIFT_F_CSWIFT_INIT,CSWIFT_R_NOT_LOADED); |
284 | goto err; | 351 | goto err; |
285 | } | 352 | } |
286 | /* Copy the pointers */ | 353 | /* Copy the pointers */ |
@@ -292,7 +359,7 @@ static int cswift_init() | |||
292 | * accelerator! */ | 359 | * accelerator! */ |
293 | if(!get_context(&hac)) | 360 | if(!get_context(&hac)) |
294 | { | 361 | { |
295 | ENGINEerr(ENGINE_F_CSWIFT_INIT,ENGINE_R_UNIT_FAILURE); | 362 | CSWIFTerr(CSWIFT_F_CSWIFT_INIT,CSWIFT_R_UNIT_FAILURE); |
296 | goto err; | 363 | goto err; |
297 | } | 364 | } |
298 | release_context(hac); | 365 | release_context(hac); |
@@ -308,16 +375,16 @@ err: | |||
308 | return 0; | 375 | return 0; |
309 | } | 376 | } |
310 | 377 | ||
311 | static int cswift_finish() | 378 | static int cswift_finish(ENGINE *e) |
312 | { | 379 | { |
313 | if(cswift_dso == NULL) | 380 | if(cswift_dso == NULL) |
314 | { | 381 | { |
315 | ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_NOT_LOADED); | 382 | CSWIFTerr(CSWIFT_F_CSWIFT_FINISH,CSWIFT_R_NOT_LOADED); |
316 | return 0; | 383 | return 0; |
317 | } | 384 | } |
318 | if(!DSO_free(cswift_dso)) | 385 | if(!DSO_free(cswift_dso)) |
319 | { | 386 | { |
320 | ENGINEerr(ENGINE_F_CSWIFT_FINISH,ENGINE_R_DSO_FAILURE); | 387 | CSWIFTerr(CSWIFT_F_CSWIFT_FINISH,CSWIFT_R_UNIT_FAILURE); |
321 | return 0; | 388 | return 0; |
322 | } | 389 | } |
323 | cswift_dso = NULL; | 390 | cswift_dso = NULL; |
@@ -328,8 +395,33 @@ static int cswift_finish() | |||
328 | return 1; | 395 | return 1; |
329 | } | 396 | } |
330 | 397 | ||
398 | static int cswift_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) | ||
399 | { | ||
400 | int initialised = ((cswift_dso == NULL) ? 0 : 1); | ||
401 | switch(cmd) | ||
402 | { | ||
403 | case CSWIFT_CMD_SO_PATH: | ||
404 | if(p == NULL) | ||
405 | { | ||
406 | CSWIFTerr(CSWIFT_F_CSWIFT_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
407 | return 0; | ||
408 | } | ||
409 | if(initialised) | ||
410 | { | ||
411 | CSWIFTerr(CSWIFT_F_CSWIFT_CTRL,CSWIFT_R_ALREADY_LOADED); | ||
412 | return 0; | ||
413 | } | ||
414 | CSWIFT_LIBNAME = (const char *)p; | ||
415 | return 1; | ||
416 | default: | ||
417 | break; | ||
418 | } | ||
419 | CSWIFTerr(CSWIFT_F_CSWIFT_CTRL,CSWIFT_R_CTRL_COMMAND_NOT_IMPLEMENTED); | ||
420 | return 0; | ||
421 | } | ||
422 | |||
331 | /* Un petit mod_exp */ | 423 | /* Un petit mod_exp */ |
332 | static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 424 | static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
333 | const BIGNUM *m, BN_CTX *ctx) | 425 | const BIGNUM *m, BN_CTX *ctx) |
334 | { | 426 | { |
335 | /* I need somewhere to store temporary serialised values for | 427 | /* I need somewhere to store temporary serialised values for |
@@ -353,24 +445,25 @@ static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
353 | 445 | ||
354 | if(!get_context(&hac)) | 446 | if(!get_context(&hac)) |
355 | { | 447 | { |
356 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_GET_HANDLE_FAILED); | 448 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_UNIT_FAILURE); |
357 | goto err; | 449 | goto err; |
358 | } | 450 | } |
359 | acquired = 1; | 451 | acquired = 1; |
360 | /* Prepare the params */ | 452 | /* Prepare the params */ |
453 | BN_CTX_start(ctx); | ||
361 | modulus = BN_CTX_get(ctx); | 454 | modulus = BN_CTX_get(ctx); |
362 | exponent = BN_CTX_get(ctx); | 455 | exponent = BN_CTX_get(ctx); |
363 | argument = BN_CTX_get(ctx); | 456 | argument = BN_CTX_get(ctx); |
364 | result = BN_CTX_get(ctx); | 457 | result = BN_CTX_get(ctx); |
365 | if(!modulus || !exponent || !argument || !result) | 458 | if(!result) |
366 | { | 459 | { |
367 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_CTX_FULL); | 460 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_BN_CTX_FULL); |
368 | goto err; | 461 | goto err; |
369 | } | 462 | } |
370 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, p->top) || | 463 | if(!bn_wexpand(modulus, m->top) || !bn_wexpand(exponent, p->top) || |
371 | !bn_wexpand(argument, a->top) || !bn_wexpand(result, m->top)) | 464 | !bn_wexpand(argument, a->top) || !bn_wexpand(result, m->top)) |
372 | { | 465 | { |
373 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_BN_EXPAND_FAIL); | 466 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_BN_EXPAND_FAIL); |
374 | goto err; | 467 | goto err; |
375 | } | 468 | } |
376 | sw_param.type = SW_ALG_EXP; | 469 | sw_param.type = SW_ALG_EXP; |
@@ -387,13 +480,12 @@ static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
387 | case SW_OK: | 480 | case SW_OK: |
388 | break; | 481 | break; |
389 | case SW_ERR_INPUT_SIZE: | 482 | case SW_ERR_INPUT_SIZE: |
390 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP, | 483 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_BAD_KEY_SIZE); |
391 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
392 | goto err; | 484 | goto err; |
393 | default: | 485 | default: |
394 | { | 486 | { |
395 | char tmpbuf[20]; | 487 | char tmpbuf[20]; |
396 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 488 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); |
397 | sprintf(tmpbuf, "%ld", sw_status); | 489 | sprintf(tmpbuf, "%ld", sw_status); |
398 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 490 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
399 | } | 491 | } |
@@ -410,7 +502,7 @@ static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
410 | &res, 1)) != SW_OK) | 502 | &res, 1)) != SW_OK) |
411 | { | 503 | { |
412 | char tmpbuf[20]; | 504 | char tmpbuf[20]; |
413 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 505 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); |
414 | sprintf(tmpbuf, "%ld", sw_status); | 506 | sprintf(tmpbuf, "%ld", sw_status); |
415 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 507 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
416 | goto err; | 508 | goto err; |
@@ -421,15 +513,12 @@ static int cswift_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
421 | err: | 513 | err: |
422 | if(acquired) | 514 | if(acquired) |
423 | release_context(hac); | 515 | release_context(hac); |
424 | if(modulus) ctx->tos--; | 516 | BN_CTX_end(ctx); |
425 | if(exponent) ctx->tos--; | ||
426 | if(argument) ctx->tos--; | ||
427 | if(result) ctx->tos--; | ||
428 | return to_return; | 517 | return to_return; |
429 | } | 518 | } |
430 | 519 | ||
431 | /* Un petit mod_exp chinois */ | 520 | /* Un petit mod_exp chinois */ |
432 | static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 521 | static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
433 | const BIGNUM *q, const BIGNUM *dmp1, | 522 | const BIGNUM *q, const BIGNUM *dmp1, |
434 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) | 523 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) |
435 | { | 524 | { |
@@ -449,11 +538,12 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
449 | 538 | ||
450 | if(!get_context(&hac)) | 539 | if(!get_context(&hac)) |
451 | { | 540 | { |
452 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_GET_HANDLE_FAILED); | 541 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_UNIT_FAILURE); |
453 | goto err; | 542 | goto err; |
454 | } | 543 | } |
455 | acquired = 1; | 544 | acquired = 1; |
456 | /* Prepare the params */ | 545 | /* Prepare the params */ |
546 | BN_CTX_start(ctx); | ||
457 | rsa_p = BN_CTX_get(ctx); | 547 | rsa_p = BN_CTX_get(ctx); |
458 | rsa_q = BN_CTX_get(ctx); | 548 | rsa_q = BN_CTX_get(ctx); |
459 | rsa_dmp1 = BN_CTX_get(ctx); | 549 | rsa_dmp1 = BN_CTX_get(ctx); |
@@ -461,10 +551,9 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
461 | rsa_iqmp = BN_CTX_get(ctx); | 551 | rsa_iqmp = BN_CTX_get(ctx); |
462 | argument = BN_CTX_get(ctx); | 552 | argument = BN_CTX_get(ctx); |
463 | result = BN_CTX_get(ctx); | 553 | result = BN_CTX_get(ctx); |
464 | if(!rsa_p || !rsa_q || !rsa_dmp1 || !rsa_dmq1 || !rsa_iqmp || | 554 | if(!result) |
465 | !argument || !result) | ||
466 | { | 555 | { |
467 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_CTX_FULL); | 556 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_CTX_FULL); |
468 | goto err; | 557 | goto err; |
469 | } | 558 | } |
470 | if(!bn_wexpand(rsa_p, p->top) || !bn_wexpand(rsa_q, q->top) || | 559 | if(!bn_wexpand(rsa_p, p->top) || !bn_wexpand(rsa_q, q->top) || |
@@ -474,7 +563,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
474 | !bn_wexpand(argument, a->top) || | 563 | !bn_wexpand(argument, a->top) || |
475 | !bn_wexpand(result, p->top + q->top)) | 564 | !bn_wexpand(result, p->top + q->top)) |
476 | { | 565 | { |
477 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_BN_EXPAND_FAIL); | 566 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BN_EXPAND_FAIL); |
478 | goto err; | 567 | goto err; |
479 | } | 568 | } |
480 | sw_param.type = SW_ALG_CRT; | 569 | sw_param.type = SW_ALG_CRT; |
@@ -498,13 +587,12 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
498 | case SW_OK: | 587 | case SW_OK: |
499 | break; | 588 | break; |
500 | case SW_ERR_INPUT_SIZE: | 589 | case SW_ERR_INPUT_SIZE: |
501 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT, | 590 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_BAD_KEY_SIZE); |
502 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
503 | goto err; | 591 | goto err; |
504 | default: | 592 | default: |
505 | { | 593 | { |
506 | char tmpbuf[20]; | 594 | char tmpbuf[20]; |
507 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED); | 595 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); |
508 | sprintf(tmpbuf, "%ld", sw_status); | 596 | sprintf(tmpbuf, "%ld", sw_status); |
509 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 597 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
510 | } | 598 | } |
@@ -521,7 +609,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
521 | &res, 1)) != SW_OK) | 609 | &res, 1)) != SW_OK) |
522 | { | 610 | { |
523 | char tmpbuf[20]; | 611 | char tmpbuf[20]; |
524 | ENGINEerr(ENGINE_F_CSWIFT_MOD_EXP_CRT,ENGINE_R_REQUEST_FAILED); | 612 | CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); |
525 | sprintf(tmpbuf, "%ld", sw_status); | 613 | sprintf(tmpbuf, "%ld", sw_status); |
526 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 614 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
527 | goto err; | 615 | goto err; |
@@ -532,17 +620,12 @@ static int cswift_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
532 | err: | 620 | err: |
533 | if(acquired) | 621 | if(acquired) |
534 | release_context(hac); | 622 | release_context(hac); |
535 | if(rsa_p) ctx->tos--; | 623 | BN_CTX_end(ctx); |
536 | if(rsa_q) ctx->tos--; | ||
537 | if(rsa_dmp1) ctx->tos--; | ||
538 | if(rsa_dmq1) ctx->tos--; | ||
539 | if(rsa_iqmp) ctx->tos--; | ||
540 | if(argument) ctx->tos--; | ||
541 | if(result) ctx->tos--; | ||
542 | return to_return; | 624 | return to_return; |
543 | } | 625 | } |
544 | 626 | ||
545 | static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | 627 | #ifndef OPENSSL_NO_RSA |
628 | static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa) | ||
546 | { | 629 | { |
547 | BN_CTX *ctx; | 630 | BN_CTX *ctx; |
548 | int to_return = 0; | 631 | int to_return = 0; |
@@ -551,7 +634,7 @@ static int cswift_rsa_mod_exp(BIGNUM *r0, BIGNUM *I, RSA *rsa) | |||
551 | goto err; | 634 | goto err; |
552 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) | 635 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) |
553 | { | 636 | { |
554 | ENGINEerr(ENGINE_F_CSWIFT_RSA_MOD_EXP,ENGINE_R_MISSING_KEY_COMPONENTS); | 637 | CSWIFTerr(CSWIFT_F_CSWIFT_RSA_MOD_EXP,CSWIFT_R_MISSING_KEY_COMPONENTS); |
555 | goto err; | 638 | goto err; |
556 | } | 639 | } |
557 | to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1, | 640 | to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1, |
@@ -561,14 +644,16 @@ err: | |||
561 | BN_CTX_free(ctx); | 644 | BN_CTX_free(ctx); |
562 | return to_return; | 645 | return to_return; |
563 | } | 646 | } |
647 | #endif | ||
564 | 648 | ||
565 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 649 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
566 | static int cswift_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 650 | static int cswift_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
567 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 651 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
568 | { | 652 | { |
569 | return cswift_mod_exp(r, a, p, m, ctx); | 653 | return cswift_mod_exp(r, a, p, m, ctx); |
570 | } | 654 | } |
571 | 655 | ||
656 | #ifndef OPENSSL_NO_DSA | ||
572 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | 657 | static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) |
573 | { | 658 | { |
574 | SW_CONTEXT_HANDLE hac; | 659 | SW_CONTEXT_HANDLE hac; |
@@ -589,19 +674,20 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
589 | goto err; | 674 | goto err; |
590 | if(!get_context(&hac)) | 675 | if(!get_context(&hac)) |
591 | { | 676 | { |
592 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_GET_HANDLE_FAILED); | 677 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_UNIT_FAILURE); |
593 | goto err; | 678 | goto err; |
594 | } | 679 | } |
595 | acquired = 1; | 680 | acquired = 1; |
596 | /* Prepare the params */ | 681 | /* Prepare the params */ |
682 | BN_CTX_start(ctx); | ||
597 | dsa_p = BN_CTX_get(ctx); | 683 | dsa_p = BN_CTX_get(ctx); |
598 | dsa_q = BN_CTX_get(ctx); | 684 | dsa_q = BN_CTX_get(ctx); |
599 | dsa_g = BN_CTX_get(ctx); | 685 | dsa_g = BN_CTX_get(ctx); |
600 | dsa_key = BN_CTX_get(ctx); | 686 | dsa_key = BN_CTX_get(ctx); |
601 | result = BN_CTX_get(ctx); | 687 | result = BN_CTX_get(ctx); |
602 | if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !result) | 688 | if(!result) |
603 | { | 689 | { |
604 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_CTX_FULL); | 690 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_BN_CTX_FULL); |
605 | goto err; | 691 | goto err; |
606 | } | 692 | } |
607 | if(!bn_wexpand(dsa_p, dsa->p->top) || | 693 | if(!bn_wexpand(dsa_p, dsa->p->top) || |
@@ -610,7 +696,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
610 | !bn_wexpand(dsa_key, dsa->priv_key->top) || | 696 | !bn_wexpand(dsa_key, dsa->priv_key->top) || |
611 | !bn_wexpand(result, dsa->p->top)) | 697 | !bn_wexpand(result, dsa->p->top)) |
612 | { | 698 | { |
613 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_BN_EXPAND_FAIL); | 699 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_BN_EXPAND_FAIL); |
614 | goto err; | 700 | goto err; |
615 | } | 701 | } |
616 | sw_param.type = SW_ALG_DSA; | 702 | sw_param.type = SW_ALG_DSA; |
@@ -633,13 +719,12 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
633 | case SW_OK: | 719 | case SW_OK: |
634 | break; | 720 | break; |
635 | case SW_ERR_INPUT_SIZE: | 721 | case SW_ERR_INPUT_SIZE: |
636 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN, | 722 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_BAD_KEY_SIZE); |
637 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
638 | goto err; | 723 | goto err; |
639 | default: | 724 | default: |
640 | { | 725 | { |
641 | char tmpbuf[20]; | 726 | char tmpbuf[20]; |
642 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED); | 727 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); |
643 | sprintf(tmpbuf, "%ld", sw_status); | 728 | sprintf(tmpbuf, "%ld", sw_status); |
644 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 729 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
645 | } | 730 | } |
@@ -657,7 +742,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
657 | if(sw_status != SW_OK) | 742 | if(sw_status != SW_OK) |
658 | { | 743 | { |
659 | char tmpbuf[20]; | 744 | char tmpbuf[20]; |
660 | ENGINEerr(ENGINE_F_CSWIFT_DSA_SIGN,ENGINE_R_REQUEST_FAILED); | 745 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); |
661 | sprintf(tmpbuf, "%ld", sw_status); | 746 | sprintf(tmpbuf, "%ld", sw_status); |
662 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 747 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
663 | goto err; | 748 | goto err; |
@@ -672,13 +757,11 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) | |||
672 | err: | 757 | err: |
673 | if(acquired) | 758 | if(acquired) |
674 | release_context(hac); | 759 | release_context(hac); |
675 | if(dsa_p) ctx->tos--; | ||
676 | if(dsa_q) ctx->tos--; | ||
677 | if(dsa_g) ctx->tos--; | ||
678 | if(dsa_key) ctx->tos--; | ||
679 | if(result) ctx->tos--; | ||
680 | if(ctx) | 760 | if(ctx) |
761 | { | ||
762 | BN_CTX_end(ctx); | ||
681 | BN_CTX_free(ctx); | 763 | BN_CTX_free(ctx); |
764 | } | ||
682 | return to_return; | 765 | return to_return; |
683 | } | 766 | } |
684 | 767 | ||
@@ -703,19 +786,20 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | |||
703 | goto err; | 786 | goto err; |
704 | if(!get_context(&hac)) | 787 | if(!get_context(&hac)) |
705 | { | 788 | { |
706 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_GET_HANDLE_FAILED); | 789 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_UNIT_FAILURE); |
707 | goto err; | 790 | goto err; |
708 | } | 791 | } |
709 | acquired = 1; | 792 | acquired = 1; |
710 | /* Prepare the params */ | 793 | /* Prepare the params */ |
794 | BN_CTX_start(ctx); | ||
711 | dsa_p = BN_CTX_get(ctx); | 795 | dsa_p = BN_CTX_get(ctx); |
712 | dsa_q = BN_CTX_get(ctx); | 796 | dsa_q = BN_CTX_get(ctx); |
713 | dsa_g = BN_CTX_get(ctx); | 797 | dsa_g = BN_CTX_get(ctx); |
714 | dsa_key = BN_CTX_get(ctx); | 798 | dsa_key = BN_CTX_get(ctx); |
715 | argument = BN_CTX_get(ctx); | 799 | argument = BN_CTX_get(ctx); |
716 | if(!dsa_p || !dsa_q || !dsa_g || !dsa_key || !argument) | 800 | if(!argument) |
717 | { | 801 | { |
718 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_CTX_FULL); | 802 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_BN_CTX_FULL); |
719 | goto err; | 803 | goto err; |
720 | } | 804 | } |
721 | if(!bn_wexpand(dsa_p, dsa->p->top) || | 805 | if(!bn_wexpand(dsa_p, dsa->p->top) || |
@@ -724,7 +808,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | |||
724 | !bn_wexpand(dsa_key, dsa->pub_key->top) || | 808 | !bn_wexpand(dsa_key, dsa->pub_key->top) || |
725 | !bn_wexpand(argument, 40)) | 809 | !bn_wexpand(argument, 40)) |
726 | { | 810 | { |
727 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_BN_EXPAND_FAIL); | 811 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_BN_EXPAND_FAIL); |
728 | goto err; | 812 | goto err; |
729 | } | 813 | } |
730 | sw_param.type = SW_ALG_DSA; | 814 | sw_param.type = SW_ALG_DSA; |
@@ -747,13 +831,12 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | |||
747 | case SW_OK: | 831 | case SW_OK: |
748 | break; | 832 | break; |
749 | case SW_ERR_INPUT_SIZE: | 833 | case SW_ERR_INPUT_SIZE: |
750 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY, | 834 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_BAD_KEY_SIZE); |
751 | ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL); | ||
752 | goto err; | 835 | goto err; |
753 | default: | 836 | default: |
754 | { | 837 | { |
755 | char tmpbuf[20]; | 838 | char tmpbuf[20]; |
756 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED); | 839 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); |
757 | sprintf(tmpbuf, "%ld", sw_status); | 840 | sprintf(tmpbuf, "%ld", sw_status); |
758 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 841 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
759 | } | 842 | } |
@@ -775,7 +858,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | |||
775 | if(sw_status != SW_OK) | 858 | if(sw_status != SW_OK) |
776 | { | 859 | { |
777 | char tmpbuf[20]; | 860 | char tmpbuf[20]; |
778 | ENGINEerr(ENGINE_F_CSWIFT_DSA_VERIFY,ENGINE_R_REQUEST_FAILED); | 861 | CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); |
779 | sprintf(tmpbuf, "%ld", sw_status); | 862 | sprintf(tmpbuf, "%ld", sw_status); |
780 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); | 863 | ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); |
781 | goto err; | 864 | goto err; |
@@ -786,22 +869,39 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, | |||
786 | err: | 869 | err: |
787 | if(acquired) | 870 | if(acquired) |
788 | release_context(hac); | 871 | release_context(hac); |
789 | if(dsa_p) ctx->tos--; | ||
790 | if(dsa_q) ctx->tos--; | ||
791 | if(dsa_g) ctx->tos--; | ||
792 | if(dsa_key) ctx->tos--; | ||
793 | if(argument) ctx->tos--; | ||
794 | if(ctx) | 872 | if(ctx) |
873 | { | ||
874 | BN_CTX_end(ctx); | ||
795 | BN_CTX_free(ctx); | 875 | BN_CTX_free(ctx); |
876 | } | ||
796 | return to_return; | 877 | return to_return; |
797 | } | 878 | } |
879 | #endif | ||
798 | 880 | ||
881 | #ifndef OPENSSL_NO_DH | ||
799 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | 882 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ |
800 | static int cswift_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 883 | static int cswift_mod_exp_dh(const DH *dh, BIGNUM *r, |
884 | const BIGNUM *a, const BIGNUM *p, | ||
801 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 885 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
802 | { | 886 | { |
803 | return cswift_mod_exp(r, a, p, m, ctx); | 887 | return cswift_mod_exp(r, a, p, m, ctx); |
804 | } | 888 | } |
889 | #endif | ||
890 | |||
891 | /* This stuff is needed if this ENGINE is being compiled into a self-contained | ||
892 | * shared-library. */ | ||
893 | #ifdef ENGINE_DYNAMIC_SUPPORT | ||
894 | static int bind_fn(ENGINE *e, const char *id) | ||
895 | { | ||
896 | if(id && (strcmp(id, engine_cswift_id) != 0)) | ||
897 | return 0; | ||
898 | if(!bind_helper(e)) | ||
899 | return 0; | ||
900 | return 1; | ||
901 | } | ||
902 | IMPLEMENT_DYNAMIC_CHECK_FN() | ||
903 | IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) | ||
904 | #endif /* ENGINE_DYNAMIC_SUPPORT */ | ||
805 | 905 | ||
806 | #endif /* !NO_HW_CSWIFT */ | 906 | #endif /* !OPENSSL_NO_HW_CSWIFT */ |
807 | #endif /* !NO_HW */ | 907 | #endif /* !OPENSSL_NO_HW */ |
diff --git a/src/lib/libcrypto/engine/hw_ncipher.c b/src/lib/libcrypto/engine/hw_ncipher.c index 41f5900676..4762a54e3d 100644 --- a/src/lib/libcrypto/engine/hw_ncipher.c +++ b/src/lib/libcrypto/engine/hw_ncipher.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for the OpenSSL project 2000. | 4 | * for the OpenSSL project 2000. |
5 | */ | 5 | */ |
6 | /* ==================================================================== | 6 | /* ==================================================================== |
7 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 7 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
8 | * | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions |
@@ -58,15 +58,16 @@ | |||
58 | */ | 58 | */ |
59 | 59 | ||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include <string.h> | ||
61 | #include <openssl/crypto.h> | 62 | #include <openssl/crypto.h> |
62 | #include <openssl/pem.h> | 63 | #include <openssl/pem.h> |
63 | #include "cryptlib.h" | 64 | #include "cryptlib.h" |
64 | #include <openssl/dso.h> | 65 | #include <openssl/dso.h> |
65 | #include "engine_int.h" | ||
66 | #include <openssl/engine.h> | 66 | #include <openssl/engine.h> |
67 | #include <openssl/ui.h> | ||
67 | 68 | ||
68 | #ifndef NO_HW | 69 | #ifndef OPENSSL_NO_HW |
69 | #ifndef NO_HW_NCIPHER | 70 | #ifndef OPENSSL_NO_HW_NCIPHER |
70 | 71 | ||
71 | /* Attribution notice: nCipher have said several times that it's OK for | 72 | /* Attribution notice: nCipher have said several times that it's OK for |
72 | * us to implement a general interface to their boxes, and recently declared | 73 | * us to implement a general interface to their boxes, and recently declared |
@@ -82,9 +83,13 @@ | |||
82 | #include "vendor_defns/hwcryptohook.h" | 83 | #include "vendor_defns/hwcryptohook.h" |
83 | #endif | 84 | #endif |
84 | 85 | ||
85 | static int hwcrhk_init(void); | 86 | #define HWCRHK_LIB_NAME "hwcrhk engine" |
86 | static int hwcrhk_finish(void); | 87 | #include "hw_ncipher_err.c" |
87 | static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()); | 88 | |
89 | static int hwcrhk_destroy(ENGINE *e); | ||
90 | static int hwcrhk_init(ENGINE *e); | ||
91 | static int hwcrhk_finish(ENGINE *e); | ||
92 | static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); | ||
88 | 93 | ||
89 | /* Functions to handle mutexes */ | 94 | /* Functions to handle mutexes */ |
90 | static int hwcrhk_mutex_init(HWCryptoHook_Mutex*, HWCryptoHook_CallerContext*); | 95 | static int hwcrhk_mutex_init(HWCryptoHook_Mutex*, HWCryptoHook_CallerContext*); |
@@ -93,39 +98,77 @@ static void hwcrhk_mutex_unlock(HWCryptoHook_Mutex*); | |||
93 | static void hwcrhk_mutex_destroy(HWCryptoHook_Mutex*); | 98 | static void hwcrhk_mutex_destroy(HWCryptoHook_Mutex*); |
94 | 99 | ||
95 | /* BIGNUM stuff */ | 100 | /* BIGNUM stuff */ |
96 | static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 101 | static int hwcrhk_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
97 | const BIGNUM *m, BN_CTX *ctx); | 102 | const BIGNUM *m, BN_CTX *ctx); |
98 | 103 | ||
104 | #ifndef OPENSSL_NO_RSA | ||
99 | /* RSA stuff */ | 105 | /* RSA stuff */ |
100 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa); | 106 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa); |
107 | #endif | ||
101 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 108 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
102 | static int hwcrhk_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 109 | static int hwcrhk_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
103 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 110 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
104 | 111 | ||
105 | /* DH stuff */ | 112 | /* DH stuff */ |
106 | /* This function is alised to mod_exp (with the DH and mont dropped). */ | 113 | /* This function is alised to mod_exp (with the DH and mont dropped). */ |
107 | static int hwcrhk_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 114 | static int hwcrhk_mod_exp_dh(const DH *dh, BIGNUM *r, |
108 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 115 | const BIGNUM *a, const BIGNUM *p, |
116 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
109 | 117 | ||
110 | /* RAND stuff */ | 118 | /* RAND stuff */ |
111 | static int hwcrhk_rand_bytes(unsigned char *buf, int num); | 119 | static int hwcrhk_rand_bytes(unsigned char *buf, int num); |
112 | static int hwcrhk_rand_status(void); | 120 | static int hwcrhk_rand_status(void); |
113 | 121 | ||
114 | /* KM stuff */ | 122 | /* KM stuff */ |
115 | static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | 123 | static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id, |
116 | const char *passphrase); | 124 | UI_METHOD *ui_method, void *callback_data); |
117 | static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, | 125 | static EVP_PKEY *hwcrhk_load_pubkey(ENGINE *eng, const char *key_id, |
118 | const char *passphrase); | 126 | UI_METHOD *ui_method, void *callback_data); |
119 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, | 127 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, |
120 | int index,long argl, void *argp); | 128 | int ind,long argl, void *argp); |
121 | 129 | ||
122 | /* Interaction stuff */ | 130 | /* Interaction stuff */ |
131 | static int hwcrhk_insert_card(const char *prompt_info, | ||
132 | const char *wrong_info, | ||
133 | HWCryptoHook_PassphraseContext *ppctx, | ||
134 | HWCryptoHook_CallerContext *cactx); | ||
123 | static int hwcrhk_get_pass(const char *prompt_info, | 135 | static int hwcrhk_get_pass(const char *prompt_info, |
124 | int *len_io, char *buf, | 136 | int *len_io, char *buf, |
125 | HWCryptoHook_PassphraseContext *ppctx, | 137 | HWCryptoHook_PassphraseContext *ppctx, |
126 | HWCryptoHook_CallerContext *cactx); | 138 | HWCryptoHook_CallerContext *cactx); |
127 | static void hwcrhk_log_message(void *logstream, const char *message); | 139 | static void hwcrhk_log_message(void *logstr, const char *message); |
140 | |||
141 | /* The definitions for control commands specific to this engine */ | ||
142 | #define HWCRHK_CMD_SO_PATH ENGINE_CMD_BASE | ||
143 | #define HWCRHK_CMD_FORK_CHECK (ENGINE_CMD_BASE + 1) | ||
144 | #define HWCRHK_CMD_THREAD_LOCKING (ENGINE_CMD_BASE + 2) | ||
145 | #define HWCRHK_CMD_SET_USER_INTERFACE (ENGINE_CMD_BASE + 3) | ||
146 | #define HWCRHK_CMD_SET_CALLBACK_DATA (ENGINE_CMD_BASE + 4) | ||
147 | static const ENGINE_CMD_DEFN hwcrhk_cmd_defns[] = { | ||
148 | {HWCRHK_CMD_SO_PATH, | ||
149 | "SO_PATH", | ||
150 | "Specifies the path to the 'hwcrhk' shared library", | ||
151 | ENGINE_CMD_FLAG_STRING}, | ||
152 | {HWCRHK_CMD_FORK_CHECK, | ||
153 | "FORK_CHECK", | ||
154 | "Turns fork() checking on or off (boolean)", | ||
155 | ENGINE_CMD_FLAG_NUMERIC}, | ||
156 | {HWCRHK_CMD_THREAD_LOCKING, | ||
157 | "THREAD_LOCKING", | ||
158 | "Turns thread-safe locking on or off (boolean)", | ||
159 | ENGINE_CMD_FLAG_NUMERIC}, | ||
160 | {HWCRHK_CMD_SET_USER_INTERFACE, | ||
161 | "SET_USER_INTERFACE", | ||
162 | "Set the global user interface (internal)", | ||
163 | ENGINE_CMD_FLAG_INTERNAL}, | ||
164 | {HWCRHK_CMD_SET_CALLBACK_DATA, | ||
165 | "SET_CALLBACK_DATA", | ||
166 | "Set the global user interface extra data (internal)", | ||
167 | ENGINE_CMD_FLAG_INTERNAL}, | ||
168 | {0, NULL, NULL, 0} | ||
169 | }; | ||
128 | 170 | ||
171 | #ifndef OPENSSL_NO_RSA | ||
129 | /* Our internal RSA_METHOD that we provide pointers to */ | 172 | /* Our internal RSA_METHOD that we provide pointers to */ |
130 | static RSA_METHOD hwcrhk_rsa = | 173 | static RSA_METHOD hwcrhk_rsa = |
131 | { | 174 | { |
@@ -143,7 +186,9 @@ static RSA_METHOD hwcrhk_rsa = | |||
143 | NULL, | 186 | NULL, |
144 | NULL | 187 | NULL |
145 | }; | 188 | }; |
189 | #endif | ||
146 | 190 | ||
191 | #ifndef OPENSSL_NO_DH | ||
147 | /* Our internal DH_METHOD that we provide pointers to */ | 192 | /* Our internal DH_METHOD that we provide pointers to */ |
148 | static DH_METHOD hwcrhk_dh = | 193 | static DH_METHOD hwcrhk_dh = |
149 | { | 194 | { |
@@ -156,6 +201,7 @@ static DH_METHOD hwcrhk_dh = | |||
156 | 0, | 201 | 0, |
157 | NULL | 202 | NULL |
158 | }; | 203 | }; |
204 | #endif | ||
159 | 205 | ||
160 | static RAND_METHOD hwcrhk_rand = | 206 | static RAND_METHOD hwcrhk_rand = |
161 | { | 207 | { |
@@ -168,26 +214,9 @@ static RAND_METHOD hwcrhk_rand = | |||
168 | hwcrhk_rand_status, | 214 | hwcrhk_rand_status, |
169 | }; | 215 | }; |
170 | 216 | ||
171 | /* Our ENGINE structure. */ | 217 | /* Constants used when creating the ENGINE */ |
172 | static ENGINE engine_hwcrhk = | 218 | static const char *engine_hwcrhk_id = "chil"; |
173 | { | 219 | static const char *engine_hwcrhk_name = "nCipher hardware engine support"; |
174 | "chil", | ||
175 | "nCipher hardware engine support", | ||
176 | &hwcrhk_rsa, | ||
177 | NULL, | ||
178 | &hwcrhk_dh, | ||
179 | &hwcrhk_rand, | ||
180 | hwcrhk_mod_exp, | ||
181 | NULL, | ||
182 | hwcrhk_init, | ||
183 | hwcrhk_finish, | ||
184 | hwcrhk_ctrl, | ||
185 | hwcrhk_load_privkey, | ||
186 | hwcrhk_load_pubkey, | ||
187 | 0, /* no flags */ | ||
188 | 0, 0, /* no references */ | ||
189 | NULL, NULL /* unlinked */ | ||
190 | }; | ||
191 | 220 | ||
192 | /* Internal stuff for HWCryptoHook */ | 221 | /* Internal stuff for HWCryptoHook */ |
193 | 222 | ||
@@ -204,7 +233,8 @@ struct HWCryptoHook_MutexValue | |||
204 | into HWCryptoHook_PassphraseContext */ | 233 | into HWCryptoHook_PassphraseContext */ |
205 | struct HWCryptoHook_PassphraseContextValue | 234 | struct HWCryptoHook_PassphraseContextValue |
206 | { | 235 | { |
207 | void *any; | 236 | UI_METHOD *ui_method; |
237 | void *callback_data; | ||
208 | }; | 238 | }; |
209 | 239 | ||
210 | /* hwcryptohook.h has some typedefs that turn | 240 | /* hwcryptohook.h has some typedefs that turn |
@@ -212,7 +242,10 @@ struct HWCryptoHook_PassphraseContextValue | |||
212 | into HWCryptoHook_CallerContext */ | 242 | into HWCryptoHook_CallerContext */ |
213 | struct HWCryptoHook_CallerContextValue | 243 | struct HWCryptoHook_CallerContextValue |
214 | { | 244 | { |
215 | void *any; | 245 | pem_password_cb *password_callback; /* Deprecated! Only present for |
246 | backward compatibility! */ | ||
247 | UI_METHOD *ui_method; | ||
248 | void *callback_data; | ||
216 | }; | 249 | }; |
217 | 250 | ||
218 | /* The MPI structure in HWCryptoHook is pretty compatible with OpenSSL | 251 | /* The MPI structure in HWCryptoHook is pretty compatible with OpenSSL |
@@ -222,31 +255,27 @@ struct HWCryptoHook_CallerContextValue | |||
222 | #define MPI2BN(bn, mp) \ | 255 | #define MPI2BN(bn, mp) \ |
223 | {mp.size = bn->dmax * sizeof(BN_ULONG); mp.buf = (unsigned char *)bn->d;} | 256 | {mp.size = bn->dmax * sizeof(BN_ULONG); mp.buf = (unsigned char *)bn->d;} |
224 | 257 | ||
225 | #if 0 /* Card and password management is not yet supported */ | ||
226 | /* HWCryptoHook callbacks. insert_card() and get_pass() are not yet | ||
227 | defined, because we haven't quite decided on the proper form yet. | ||
228 | log_message() just adds an entry in the error stack. I don't know | ||
229 | if that's good or bad... */ | ||
230 | static int insert_card(const char *prompt_info, | ||
231 | const char *wrong_info, | ||
232 | HWCryptoHook_PassphraseContext *ppctx, | ||
233 | HWCryptoHook_CallerContext *cactx); | ||
234 | static int get_pass(const char *prompt_info, | ||
235 | int *len_io, char *buf, | ||
236 | HWCryptoHook_PassphraseContext *ppctx, | ||
237 | HWCryptoHook_CallerContext *cactx); | ||
238 | #endif | ||
239 | |||
240 | static BIO *logstream = NULL; | 258 | static BIO *logstream = NULL; |
241 | static pem_password_cb *password_callback = NULL; | ||
242 | #if 0 | ||
243 | static void *password_callback_userdata = NULL; | ||
244 | #endif | ||
245 | static int disable_mutex_callbacks = 0; | 259 | static int disable_mutex_callbacks = 0; |
246 | 260 | ||
261 | /* One might wonder why these are needed, since one can pass down at least | ||
262 | a UI_METHOD and a pointer to callback data to the key-loading functions. | ||
263 | The thing is that the ModExp and RSAImmed functions can load keys as well, | ||
264 | if the data they get is in a special, nCipher-defined format (hint: if you | ||
265 | look at the private exponent of the RSA data as a string, you'll see this | ||
266 | string: "nCipher KM tool key id", followed by some bytes, followed a key | ||
267 | identity string, followed by more bytes. This happens when you use "embed" | ||
268 | keys instead of "hwcrhk" keys). Unfortunately, those functions do not take | ||
269 | any passphrase or caller context, and our functions can't really take any | ||
270 | callback data either. Still, the "insert_card" and "get_passphrase" | ||
271 | callbacks may be called down the line, and will need to know what user | ||
272 | interface callbacks to call, and having callback data from the application | ||
273 | may be a nice thing as well, so we need to keep track of that globally. */ | ||
274 | static HWCryptoHook_CallerContext password_context = { NULL, NULL, NULL }; | ||
275 | |||
247 | /* Stuff to pass to the HWCryptoHook library */ | 276 | /* Stuff to pass to the HWCryptoHook library */ |
248 | static HWCryptoHook_InitInfo hwcrhk_globals = { | 277 | static HWCryptoHook_InitInfo hwcrhk_globals = { |
249 | 0, /* Flags */ | 278 | HWCryptoHook_InitFlags_SimpleForkCheck, /* Flags */ |
250 | &logstream, /* logstream */ | 279 | &logstream, /* logstream */ |
251 | sizeof(BN_ULONG), /* limbsize */ | 280 | sizeof(BN_ULONG), /* limbsize */ |
252 | 0, /* mslimb first: false for BNs */ | 281 | 0, /* mslimb first: false for BNs */ |
@@ -280,20 +309,42 @@ static HWCryptoHook_InitInfo hwcrhk_globals = { | |||
280 | 0, /* hwcrhk_cv_destroy, */ | 309 | 0, /* hwcrhk_cv_destroy, */ |
281 | 310 | ||
282 | hwcrhk_get_pass, /* pass phrase */ | 311 | hwcrhk_get_pass, /* pass phrase */ |
283 | 0, /* insert_card, */ /* insert a card */ | 312 | hwcrhk_insert_card, /* insert a card */ |
284 | hwcrhk_log_message /* Log message */ | 313 | hwcrhk_log_message /* Log message */ |
285 | }; | 314 | }; |
286 | 315 | ||
287 | 316 | ||
288 | /* Now, to our own code */ | 317 | /* Now, to our own code */ |
289 | 318 | ||
290 | /* As this is only ever called once, there's no need for locking | 319 | /* This internal function is used by ENGINE_ncipher() and possibly by the |
291 | * (indeed - the lock will already be held by our caller!!!) */ | 320 | * "dynamic" ENGINE support too */ |
292 | ENGINE *ENGINE_ncipher() | 321 | static int bind_helper(ENGINE *e) |
293 | { | 322 | { |
294 | RSA_METHOD *meth1; | 323 | #ifndef OPENSSL_NO_RSA |
295 | DH_METHOD *meth2; | 324 | const RSA_METHOD *meth1; |
325 | #endif | ||
326 | #ifndef OPENSSL_NO_DH | ||
327 | const DH_METHOD *meth2; | ||
328 | #endif | ||
329 | if(!ENGINE_set_id(e, engine_hwcrhk_id) || | ||
330 | !ENGINE_set_name(e, engine_hwcrhk_name) || | ||
331 | #ifndef OPENSSL_NO_RSA | ||
332 | !ENGINE_set_RSA(e, &hwcrhk_rsa) || | ||
333 | #endif | ||
334 | #ifndef OPENSSL_NO_DH | ||
335 | !ENGINE_set_DH(e, &hwcrhk_dh) || | ||
336 | #endif | ||
337 | !ENGINE_set_RAND(e, &hwcrhk_rand) || | ||
338 | !ENGINE_set_destroy_function(e, hwcrhk_destroy) || | ||
339 | !ENGINE_set_init_function(e, hwcrhk_init) || | ||
340 | !ENGINE_set_finish_function(e, hwcrhk_finish) || | ||
341 | !ENGINE_set_ctrl_function(e, hwcrhk_ctrl) || | ||
342 | !ENGINE_set_load_privkey_function(e, hwcrhk_load_privkey) || | ||
343 | !ENGINE_set_load_pubkey_function(e, hwcrhk_load_pubkey) || | ||
344 | !ENGINE_set_cmd_defns(e, hwcrhk_cmd_defns)) | ||
345 | return 0; | ||
296 | 346 | ||
347 | #ifndef OPENSSL_NO_RSA | ||
297 | /* We know that the "PKCS1_SSLeay()" functions hook properly | 348 | /* We know that the "PKCS1_SSLeay()" functions hook properly |
298 | * to the cswift-specific mod_exp and mod_exp_crt so we use | 349 | * to the cswift-specific mod_exp and mod_exp_crt so we use |
299 | * those functions. NB: We don't use ENGINE_openssl() or | 350 | * those functions. NB: We don't use ENGINE_openssl() or |
@@ -306,12 +357,41 @@ ENGINE *ENGINE_ncipher() | |||
306 | hwcrhk_rsa.rsa_pub_dec = meth1->rsa_pub_dec; | 357 | hwcrhk_rsa.rsa_pub_dec = meth1->rsa_pub_dec; |
307 | hwcrhk_rsa.rsa_priv_enc = meth1->rsa_priv_enc; | 358 | hwcrhk_rsa.rsa_priv_enc = meth1->rsa_priv_enc; |
308 | hwcrhk_rsa.rsa_priv_dec = meth1->rsa_priv_dec; | 359 | hwcrhk_rsa.rsa_priv_dec = meth1->rsa_priv_dec; |
360 | #endif | ||
309 | 361 | ||
362 | #ifndef OPENSSL_NO_DH | ||
310 | /* Much the same for Diffie-Hellman */ | 363 | /* Much the same for Diffie-Hellman */ |
311 | meth2 = DH_OpenSSL(); | 364 | meth2 = DH_OpenSSL(); |
312 | hwcrhk_dh.generate_key = meth2->generate_key; | 365 | hwcrhk_dh.generate_key = meth2->generate_key; |
313 | hwcrhk_dh.compute_key = meth2->compute_key; | 366 | hwcrhk_dh.compute_key = meth2->compute_key; |
314 | return &engine_hwcrhk; | 367 | #endif |
368 | |||
369 | /* Ensure the hwcrhk error handling is set up */ | ||
370 | ERR_load_HWCRHK_strings(); | ||
371 | return 1; | ||
372 | } | ||
373 | |||
374 | static ENGINE *engine_ncipher(void) | ||
375 | { | ||
376 | ENGINE *ret = ENGINE_new(); | ||
377 | if(!ret) | ||
378 | return NULL; | ||
379 | if(!bind_helper(ret)) | ||
380 | { | ||
381 | ENGINE_free(ret); | ||
382 | return NULL; | ||
383 | } | ||
384 | return ret; | ||
385 | } | ||
386 | |||
387 | void ENGINE_load_chil(void) | ||
388 | { | ||
389 | /* Copied from eng_[openssl|dyn].c */ | ||
390 | ENGINE *toadd = engine_ncipher(); | ||
391 | if(!toadd) return; | ||
392 | ENGINE_add(toadd); | ||
393 | ENGINE_free(toadd); | ||
394 | ERR_clear_error(); | ||
315 | } | 395 | } |
316 | 396 | ||
317 | /* This is a process-global DSO handle used for loading and unloading | 397 | /* This is a process-global DSO handle used for loading and unloading |
@@ -321,30 +401,41 @@ ENGINE *ENGINE_ncipher() | |||
321 | * implicitly. */ | 401 | * implicitly. */ |
322 | static DSO *hwcrhk_dso = NULL; | 402 | static DSO *hwcrhk_dso = NULL; |
323 | static HWCryptoHook_ContextHandle hwcrhk_context = 0; | 403 | static HWCryptoHook_ContextHandle hwcrhk_context = 0; |
324 | static int hndidx = -1; /* Index for KM handle. Not really used yet. */ | 404 | #ifndef OPENSSL_NO_RSA |
405 | static int hndidx_rsa = -1; /* Index for KM handle. Not really used yet. */ | ||
406 | #endif | ||
325 | 407 | ||
326 | /* These are the function pointers that are (un)set when the library has | 408 | /* These are the function pointers that are (un)set when the library has |
327 | * successfully (un)loaded. */ | 409 | * successfully (un)loaded. */ |
328 | static HWCryptoHook_Init_t *p_hwcrhk_Init = NULL; | 410 | static HWCryptoHook_Init_t *p_hwcrhk_Init = NULL; |
329 | static HWCryptoHook_Finish_t *p_hwcrhk_Finish = NULL; | 411 | static HWCryptoHook_Finish_t *p_hwcrhk_Finish = NULL; |
330 | static HWCryptoHook_ModExp_t *p_hwcrhk_ModExp = NULL; | 412 | static HWCryptoHook_ModExp_t *p_hwcrhk_ModExp = NULL; |
413 | #ifndef OPENSSL_NO_RSA | ||
331 | static HWCryptoHook_RSA_t *p_hwcrhk_RSA = NULL; | 414 | static HWCryptoHook_RSA_t *p_hwcrhk_RSA = NULL; |
415 | #endif | ||
332 | static HWCryptoHook_RandomBytes_t *p_hwcrhk_RandomBytes = NULL; | 416 | static HWCryptoHook_RandomBytes_t *p_hwcrhk_RandomBytes = NULL; |
417 | #ifndef OPENSSL_NO_RSA | ||
333 | static HWCryptoHook_RSALoadKey_t *p_hwcrhk_RSALoadKey = NULL; | 418 | static HWCryptoHook_RSALoadKey_t *p_hwcrhk_RSALoadKey = NULL; |
334 | static HWCryptoHook_RSAGetPublicKey_t *p_hwcrhk_RSAGetPublicKey = NULL; | 419 | static HWCryptoHook_RSAGetPublicKey_t *p_hwcrhk_RSAGetPublicKey = NULL; |
335 | static HWCryptoHook_RSAUnloadKey_t *p_hwcrhk_RSAUnloadKey = NULL; | 420 | static HWCryptoHook_RSAUnloadKey_t *p_hwcrhk_RSAUnloadKey = NULL; |
421 | #endif | ||
336 | static HWCryptoHook_ModExpCRT_t *p_hwcrhk_ModExpCRT = NULL; | 422 | static HWCryptoHook_ModExpCRT_t *p_hwcrhk_ModExpCRT = NULL; |
337 | 423 | ||
338 | /* Used in the DSO operations. */ | 424 | /* Used in the DSO operations. */ |
339 | static const char *HWCRHK_LIBNAME = "nfhwcrhk"; | 425 | static const char def_HWCRHK_LIBNAME[] = "nfhwcrhk"; |
426 | static const char *HWCRHK_LIBNAME = def_HWCRHK_LIBNAME; | ||
340 | static const char *n_hwcrhk_Init = "HWCryptoHook_Init"; | 427 | static const char *n_hwcrhk_Init = "HWCryptoHook_Init"; |
341 | static const char *n_hwcrhk_Finish = "HWCryptoHook_Finish"; | 428 | static const char *n_hwcrhk_Finish = "HWCryptoHook_Finish"; |
342 | static const char *n_hwcrhk_ModExp = "HWCryptoHook_ModExp"; | 429 | static const char *n_hwcrhk_ModExp = "HWCryptoHook_ModExp"; |
430 | #ifndef OPENSSL_NO_RSA | ||
343 | static const char *n_hwcrhk_RSA = "HWCryptoHook_RSA"; | 431 | static const char *n_hwcrhk_RSA = "HWCryptoHook_RSA"; |
432 | #endif | ||
344 | static const char *n_hwcrhk_RandomBytes = "HWCryptoHook_RandomBytes"; | 433 | static const char *n_hwcrhk_RandomBytes = "HWCryptoHook_RandomBytes"; |
434 | #ifndef OPENSSL_NO_RSA | ||
345 | static const char *n_hwcrhk_RSALoadKey = "HWCryptoHook_RSALoadKey"; | 435 | static const char *n_hwcrhk_RSALoadKey = "HWCryptoHook_RSALoadKey"; |
346 | static const char *n_hwcrhk_RSAGetPublicKey = "HWCryptoHook_RSAGetPublicKey"; | 436 | static const char *n_hwcrhk_RSAGetPublicKey = "HWCryptoHook_RSAGetPublicKey"; |
347 | static const char *n_hwcrhk_RSAUnloadKey = "HWCryptoHook_RSAUnloadKey"; | 437 | static const char *n_hwcrhk_RSAUnloadKey = "HWCryptoHook_RSAUnloadKey"; |
438 | #endif | ||
348 | static const char *n_hwcrhk_ModExpCRT = "HWCryptoHook_ModExpCRT"; | 439 | static const char *n_hwcrhk_ModExpCRT = "HWCryptoHook_ModExpCRT"; |
349 | 440 | ||
350 | /* HWCryptoHook library functions and mechanics - these are used by the | 441 | /* HWCryptoHook library functions and mechanics - these are used by the |
@@ -353,16 +444,17 @@ static const char *n_hwcrhk_ModExpCRT = "HWCryptoHook_ModExpCRT"; | |||
353 | * called, the checking and error handling is probably down there. */ | 444 | * called, the checking and error handling is probably down there. */ |
354 | 445 | ||
355 | /* utility function to obtain a context */ | 446 | /* utility function to obtain a context */ |
356 | static int get_context(HWCryptoHook_ContextHandle *hac) | 447 | static int get_context(HWCryptoHook_ContextHandle *hac, |
448 | HWCryptoHook_CallerContext *cac) | ||
357 | { | 449 | { |
358 | char tempbuf[1024]; | 450 | char tempbuf[1024]; |
359 | HWCryptoHook_ErrMsgBuf rmsg; | 451 | HWCryptoHook_ErrMsgBuf rmsg; |
360 | 452 | ||
361 | rmsg.buf = tempbuf; | 453 | rmsg.buf = tempbuf; |
362 | rmsg.size = 1024; | 454 | rmsg.size = sizeof(tempbuf); |
363 | 455 | ||
364 | *hac = p_hwcrhk_Init(&hwcrhk_globals, sizeof(hwcrhk_globals), &rmsg, | 456 | *hac = p_hwcrhk_Init(&hwcrhk_globals, sizeof(hwcrhk_globals), &rmsg, |
365 | NULL); | 457 | cac); |
366 | if (!*hac) | 458 | if (!*hac) |
367 | return 0; | 459 | return 0; |
368 | return 1; | 460 | return 1; |
@@ -374,30 +466,38 @@ static void release_context(HWCryptoHook_ContextHandle hac) | |||
374 | p_hwcrhk_Finish(hac); | 466 | p_hwcrhk_Finish(hac); |
375 | } | 467 | } |
376 | 468 | ||
469 | /* Destructor (complements the "ENGINE_ncipher()" constructor) */ | ||
470 | static int hwcrhk_destroy(ENGINE *e) | ||
471 | { | ||
472 | ERR_unload_HWCRHK_strings(); | ||
473 | return 1; | ||
474 | } | ||
475 | |||
377 | /* (de)initialisation functions. */ | 476 | /* (de)initialisation functions. */ |
378 | static int hwcrhk_init() | 477 | static int hwcrhk_init(ENGINE *e) |
379 | { | 478 | { |
380 | HWCryptoHook_Init_t *p1; | 479 | HWCryptoHook_Init_t *p1; |
381 | HWCryptoHook_Finish_t *p2; | 480 | HWCryptoHook_Finish_t *p2; |
382 | HWCryptoHook_ModExp_t *p3; | 481 | HWCryptoHook_ModExp_t *p3; |
482 | #ifndef OPENSSL_NO_RSA | ||
383 | HWCryptoHook_RSA_t *p4; | 483 | HWCryptoHook_RSA_t *p4; |
384 | HWCryptoHook_RSALoadKey_t *p5; | 484 | HWCryptoHook_RSALoadKey_t *p5; |
385 | HWCryptoHook_RSAGetPublicKey_t *p6; | 485 | HWCryptoHook_RSAGetPublicKey_t *p6; |
386 | HWCryptoHook_RSAUnloadKey_t *p7; | 486 | HWCryptoHook_RSAUnloadKey_t *p7; |
487 | #endif | ||
387 | HWCryptoHook_RandomBytes_t *p8; | 488 | HWCryptoHook_RandomBytes_t *p8; |
388 | HWCryptoHook_ModExpCRT_t *p9; | 489 | HWCryptoHook_ModExpCRT_t *p9; |
389 | 490 | ||
390 | if(hwcrhk_dso != NULL) | 491 | if(hwcrhk_dso != NULL) |
391 | { | 492 | { |
392 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_ALREADY_LOADED); | 493 | HWCRHKerr(HWCRHK_F_HWCRHK_INIT,HWCRHK_R_ALREADY_LOADED); |
393 | goto err; | 494 | goto err; |
394 | } | 495 | } |
395 | /* Attempt to load libnfhwcrhk.so/nfhwcrhk.dll/whatever. */ | 496 | /* Attempt to load libnfhwcrhk.so/nfhwcrhk.dll/whatever. */ |
396 | hwcrhk_dso = DSO_load(NULL, HWCRHK_LIBNAME, NULL, | 497 | hwcrhk_dso = DSO_load(NULL, HWCRHK_LIBNAME, NULL, 0); |
397 | DSO_FLAG_NAME_TRANSLATION); | ||
398 | if(hwcrhk_dso == NULL) | 498 | if(hwcrhk_dso == NULL) |
399 | { | 499 | { |
400 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_DSO_FAILURE); | 500 | HWCRHKerr(HWCRHK_F_HWCRHK_INIT,HWCRHK_R_DSO_FAILURE); |
401 | goto err; | 501 | goto err; |
402 | } | 502 | } |
403 | if(!(p1 = (HWCryptoHook_Init_t *) | 503 | if(!(p1 = (HWCryptoHook_Init_t *) |
@@ -406,6 +506,7 @@ static int hwcrhk_init() | |||
406 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_Finish)) || | 506 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_Finish)) || |
407 | !(p3 = (HWCryptoHook_ModExp_t *) | 507 | !(p3 = (HWCryptoHook_ModExp_t *) |
408 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExp)) || | 508 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExp)) || |
509 | #ifndef OPENSSL_NO_RSA | ||
409 | !(p4 = (HWCryptoHook_RSA_t *) | 510 | !(p4 = (HWCryptoHook_RSA_t *) |
410 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSA)) || | 511 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSA)) || |
411 | !(p5 = (HWCryptoHook_RSALoadKey_t *) | 512 | !(p5 = (HWCryptoHook_RSALoadKey_t *) |
@@ -414,22 +515,25 @@ static int hwcrhk_init() | |||
414 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAGetPublicKey)) || | 515 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAGetPublicKey)) || |
415 | !(p7 = (HWCryptoHook_RSAUnloadKey_t *) | 516 | !(p7 = (HWCryptoHook_RSAUnloadKey_t *) |
416 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAUnloadKey)) || | 517 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RSAUnloadKey)) || |
518 | #endif | ||
417 | !(p8 = (HWCryptoHook_RandomBytes_t *) | 519 | !(p8 = (HWCryptoHook_RandomBytes_t *) |
418 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RandomBytes)) || | 520 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_RandomBytes)) || |
419 | !(p9 = (HWCryptoHook_ModExpCRT_t *) | 521 | !(p9 = (HWCryptoHook_ModExpCRT_t *) |
420 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExpCRT))) | 522 | DSO_bind_func(hwcrhk_dso, n_hwcrhk_ModExpCRT))) |
421 | { | 523 | { |
422 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_DSO_FAILURE); | 524 | HWCRHKerr(HWCRHK_F_HWCRHK_INIT,HWCRHK_R_DSO_FAILURE); |
423 | goto err; | 525 | goto err; |
424 | } | 526 | } |
425 | /* Copy the pointers */ | 527 | /* Copy the pointers */ |
426 | p_hwcrhk_Init = p1; | 528 | p_hwcrhk_Init = p1; |
427 | p_hwcrhk_Finish = p2; | 529 | p_hwcrhk_Finish = p2; |
428 | p_hwcrhk_ModExp = p3; | 530 | p_hwcrhk_ModExp = p3; |
531 | #ifndef OPENSSL_NO_RSA | ||
429 | p_hwcrhk_RSA = p4; | 532 | p_hwcrhk_RSA = p4; |
430 | p_hwcrhk_RSALoadKey = p5; | 533 | p_hwcrhk_RSALoadKey = p5; |
431 | p_hwcrhk_RSAGetPublicKey = p6; | 534 | p_hwcrhk_RSAGetPublicKey = p6; |
432 | p_hwcrhk_RSAUnloadKey = p7; | 535 | p_hwcrhk_RSAUnloadKey = p7; |
536 | #endif | ||
433 | p_hwcrhk_RandomBytes = p8; | 537 | p_hwcrhk_RandomBytes = p8; |
434 | p_hwcrhk_ModExpCRT = p9; | 538 | p_hwcrhk_ModExpCRT = p9; |
435 | 539 | ||
@@ -448,16 +552,18 @@ static int hwcrhk_init() | |||
448 | 552 | ||
449 | /* Try and get a context - if not, we may have a DSO but no | 553 | /* Try and get a context - if not, we may have a DSO but no |
450 | * accelerator! */ | 554 | * accelerator! */ |
451 | if(!get_context(&hwcrhk_context)) | 555 | if(!get_context(&hwcrhk_context, &password_context)) |
452 | { | 556 | { |
453 | ENGINEerr(ENGINE_F_HWCRHK_INIT,ENGINE_R_UNIT_FAILURE); | 557 | HWCRHKerr(HWCRHK_F_HWCRHK_INIT,HWCRHK_R_UNIT_FAILURE); |
454 | goto err; | 558 | goto err; |
455 | } | 559 | } |
456 | /* Everything's fine. */ | 560 | /* Everything's fine. */ |
457 | if (hndidx == -1) | 561 | #ifndef OPENSSL_NO_RSA |
458 | hndidx = RSA_get_ex_new_index(0, | 562 | if (hndidx_rsa == -1) |
563 | hndidx_rsa = RSA_get_ex_new_index(0, | ||
459 | "nFast HWCryptoHook RSA key handle", | 564 | "nFast HWCryptoHook RSA key handle", |
460 | NULL, NULL, hwcrhk_ex_free); | 565 | NULL, NULL, hwcrhk_ex_free); |
566 | #endif | ||
461 | return 1; | 567 | return 1; |
462 | err: | 568 | err: |
463 | if(hwcrhk_dso) | 569 | if(hwcrhk_dso) |
@@ -466,28 +572,30 @@ err: | |||
466 | p_hwcrhk_Init = NULL; | 572 | p_hwcrhk_Init = NULL; |
467 | p_hwcrhk_Finish = NULL; | 573 | p_hwcrhk_Finish = NULL; |
468 | p_hwcrhk_ModExp = NULL; | 574 | p_hwcrhk_ModExp = NULL; |
575 | #ifndef OPENSSL_NO_RSA | ||
469 | p_hwcrhk_RSA = NULL; | 576 | p_hwcrhk_RSA = NULL; |
470 | p_hwcrhk_RSALoadKey = NULL; | 577 | p_hwcrhk_RSALoadKey = NULL; |
471 | p_hwcrhk_RSAGetPublicKey = NULL; | 578 | p_hwcrhk_RSAGetPublicKey = NULL; |
472 | p_hwcrhk_RSAUnloadKey = NULL; | 579 | p_hwcrhk_RSAUnloadKey = NULL; |
580 | #endif | ||
473 | p_hwcrhk_ModExpCRT = NULL; | 581 | p_hwcrhk_ModExpCRT = NULL; |
474 | p_hwcrhk_RandomBytes = NULL; | 582 | p_hwcrhk_RandomBytes = NULL; |
475 | return 0; | 583 | return 0; |
476 | } | 584 | } |
477 | 585 | ||
478 | static int hwcrhk_finish() | 586 | static int hwcrhk_finish(ENGINE *e) |
479 | { | 587 | { |
480 | int to_return = 1; | 588 | int to_return = 1; |
481 | if(hwcrhk_dso == NULL) | 589 | if(hwcrhk_dso == NULL) |
482 | { | 590 | { |
483 | ENGINEerr(ENGINE_F_HWCRHK_FINISH,ENGINE_R_NOT_LOADED); | 591 | HWCRHKerr(HWCRHK_F_HWCRHK_FINISH,HWCRHK_R_NOT_LOADED); |
484 | to_return = 0; | 592 | to_return = 0; |
485 | goto err; | 593 | goto err; |
486 | } | 594 | } |
487 | release_context(hwcrhk_context); | 595 | release_context(hwcrhk_context); |
488 | if(!DSO_free(hwcrhk_dso)) | 596 | if(!DSO_free(hwcrhk_dso)) |
489 | { | 597 | { |
490 | ENGINEerr(ENGINE_F_HWCRHK_FINISH,ENGINE_R_DSO_FAILURE); | 598 | HWCRHKerr(HWCRHK_F_HWCRHK_FINISH,HWCRHK_R_DSO_FAILURE); |
491 | to_return = 0; | 599 | to_return = 0; |
492 | goto err; | 600 | goto err; |
493 | } | 601 | } |
@@ -498,21 +606,36 @@ static int hwcrhk_finish() | |||
498 | p_hwcrhk_Init = NULL; | 606 | p_hwcrhk_Init = NULL; |
499 | p_hwcrhk_Finish = NULL; | 607 | p_hwcrhk_Finish = NULL; |
500 | p_hwcrhk_ModExp = NULL; | 608 | p_hwcrhk_ModExp = NULL; |
609 | #ifndef OPENSSL_NO_RSA | ||
501 | p_hwcrhk_RSA = NULL; | 610 | p_hwcrhk_RSA = NULL; |
502 | p_hwcrhk_RSALoadKey = NULL; | 611 | p_hwcrhk_RSALoadKey = NULL; |
503 | p_hwcrhk_RSAGetPublicKey = NULL; | 612 | p_hwcrhk_RSAGetPublicKey = NULL; |
504 | p_hwcrhk_RSAUnloadKey = NULL; | 613 | p_hwcrhk_RSAUnloadKey = NULL; |
614 | #endif | ||
505 | p_hwcrhk_ModExpCRT = NULL; | 615 | p_hwcrhk_ModExpCRT = NULL; |
506 | p_hwcrhk_RandomBytes = NULL; | 616 | p_hwcrhk_RandomBytes = NULL; |
507 | return to_return; | 617 | return to_return; |
508 | } | 618 | } |
509 | 619 | ||
510 | static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()) | 620 | static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) |
511 | { | 621 | { |
512 | int to_return = 1; | 622 | int to_return = 1; |
513 | 623 | ||
514 | switch(cmd) | 624 | switch(cmd) |
515 | { | 625 | { |
626 | case HWCRHK_CMD_SO_PATH: | ||
627 | if(hwcrhk_dso) | ||
628 | { | ||
629 | HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,HWCRHK_R_ALREADY_LOADED); | ||
630 | return 0; | ||
631 | } | ||
632 | if(p == NULL) | ||
633 | { | ||
634 | HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
635 | return 0; | ||
636 | } | ||
637 | HWCRHK_LIBNAME = (const char *)p; | ||
638 | return 1; | ||
516 | case ENGINE_CTRL_SET_LOGSTREAM: | 639 | case ENGINE_CTRL_SET_LOGSTREAM: |
517 | { | 640 | { |
518 | BIO *bio = (BIO *)p; | 641 | BIO *bio = (BIO *)p; |
@@ -526,18 +649,31 @@ static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()) | |||
526 | if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1) | 649 | if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1) |
527 | logstream = bio; | 650 | logstream = bio; |
528 | else | 651 | else |
529 | ENGINEerr(ENGINE_F_HWCRHK_CTRL,ENGINE_R_BIO_WAS_FREED); | 652 | HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,HWCRHK_R_BIO_WAS_FREED); |
530 | } | 653 | } |
531 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | 654 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
532 | break; | 655 | break; |
533 | case ENGINE_CTRL_SET_PASSWORD_CALLBACK: | 656 | case ENGINE_CTRL_SET_PASSWORD_CALLBACK: |
534 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | 657 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
535 | password_callback = (pem_password_cb *)f; | 658 | password_context.password_callback = (pem_password_cb *)f; |
659 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
660 | break; | ||
661 | case ENGINE_CTRL_SET_USER_INTERFACE: | ||
662 | case HWCRHK_CMD_SET_USER_INTERFACE: | ||
663 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
664 | password_context.ui_method = (UI_METHOD *)p; | ||
665 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
666 | break; | ||
667 | case ENGINE_CTRL_SET_CALLBACK_DATA: | ||
668 | case HWCRHK_CMD_SET_CALLBACK_DATA: | ||
669 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
670 | password_context.callback_data = p; | ||
536 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | 671 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
537 | break; | 672 | break; |
538 | /* this enables or disables the "SimpleForkCheck" flag used in the | 673 | /* this enables or disables the "SimpleForkCheck" flag used in the |
539 | * initialisation structure. */ | 674 | * initialisation structure. */ |
540 | case ENGINE_CTRL_CHIL_SET_FORKCHECK: | 675 | case ENGINE_CTRL_CHIL_SET_FORKCHECK: |
676 | case HWCRHK_CMD_FORK_CHECK: | ||
541 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | 677 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
542 | if(i) | 678 | if(i) |
543 | hwcrhk_globals.flags |= | 679 | hwcrhk_globals.flags |= |
@@ -557,11 +693,16 @@ static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()) | |||
557 | disable_mutex_callbacks = 1; | 693 | disable_mutex_callbacks = 1; |
558 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | 694 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
559 | break; | 695 | break; |
696 | case HWCRHK_CMD_THREAD_LOCKING: | ||
697 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
698 | disable_mutex_callbacks = ((i == 0) ? 0 : 1); | ||
699 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
700 | break; | ||
560 | 701 | ||
561 | /* The command isn't understood by this engine */ | 702 | /* The command isn't understood by this engine */ |
562 | default: | 703 | default: |
563 | ENGINEerr(ENGINE_F_HWCRHK_CTRL, | 704 | HWCRHKerr(HWCRHK_F_HWCRHK_CTRL, |
564 | ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED); | 705 | HWCRHK_R_CTRL_COMMAND_NOT_IMPLEMENTED); |
565 | to_return = 0; | 706 | to_return = 0; |
566 | break; | 707 | break; |
567 | } | 708 | } |
@@ -569,44 +710,62 @@ static int hwcrhk_ctrl(int cmd, long i, void *p, void (*f)()) | |||
569 | return to_return; | 710 | return to_return; |
570 | } | 711 | } |
571 | 712 | ||
572 | static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | 713 | static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id, |
573 | const char *passphrase) | 714 | UI_METHOD *ui_method, void *callback_data) |
574 | { | 715 | { |
716 | #ifndef OPENSSL_NO_RSA | ||
575 | RSA *rtmp = NULL; | 717 | RSA *rtmp = NULL; |
718 | #endif | ||
576 | EVP_PKEY *res = NULL; | 719 | EVP_PKEY *res = NULL; |
720 | #ifndef OPENSSL_NO_RSA | ||
577 | HWCryptoHook_MPI e, n; | 721 | HWCryptoHook_MPI e, n; |
578 | HWCryptoHook_RSAKeyHandle *hptr; | 722 | HWCryptoHook_RSAKeyHandle *hptr; |
723 | #endif | ||
724 | #if !defined(OPENSSL_NO_RSA) | ||
725 | char tempbuf[1024]; | ||
579 | HWCryptoHook_ErrMsgBuf rmsg; | 726 | HWCryptoHook_ErrMsgBuf rmsg; |
727 | #endif | ||
728 | HWCryptoHook_PassphraseContext ppctx; | ||
729 | |||
730 | #if !defined(OPENSSL_NO_RSA) | ||
731 | rmsg.buf = tempbuf; | ||
732 | rmsg.size = sizeof(tempbuf); | ||
733 | #endif | ||
580 | 734 | ||
581 | if(!hwcrhk_context) | 735 | if(!hwcrhk_context) |
582 | { | 736 | { |
583 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | 737 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY, |
584 | ENGINE_R_NOT_INITIALISED); | 738 | HWCRHK_R_NOT_INITIALISED); |
585 | goto err; | 739 | goto err; |
586 | } | 740 | } |
741 | #ifndef OPENSSL_NO_RSA | ||
587 | hptr = OPENSSL_malloc(sizeof(HWCryptoHook_RSAKeyHandle)); | 742 | hptr = OPENSSL_malloc(sizeof(HWCryptoHook_RSAKeyHandle)); |
588 | if (!hptr) | 743 | if (!hptr) |
589 | { | 744 | { |
590 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | 745 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY, |
591 | ERR_R_MALLOC_FAILURE); | 746 | ERR_R_MALLOC_FAILURE); |
592 | goto err; | 747 | goto err; |
593 | } | 748 | } |
749 | ppctx.ui_method = ui_method; | ||
750 | ppctx.callback_data = callback_data; | ||
594 | if (p_hwcrhk_RSALoadKey(hwcrhk_context, key_id, hptr, | 751 | if (p_hwcrhk_RSALoadKey(hwcrhk_context, key_id, hptr, |
595 | &rmsg, NULL)) | 752 | &rmsg, &ppctx)) |
596 | { | 753 | { |
597 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | 754 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY, |
598 | ENGINE_R_CHIL_ERROR); | 755 | HWCRHK_R_CHIL_ERROR); |
599 | ERR_add_error_data(1,rmsg.buf); | 756 | ERR_add_error_data(1,rmsg.buf); |
600 | goto err; | 757 | goto err; |
601 | } | 758 | } |
602 | if (!*hptr) | 759 | if (!*hptr) |
603 | { | 760 | { |
604 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PRIVKEY, | 761 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PRIVKEY, |
605 | ENGINE_R_NO_KEY); | 762 | HWCRHK_R_NO_KEY); |
606 | goto err; | 763 | goto err; |
607 | } | 764 | } |
608 | rtmp = RSA_new_method(&engine_hwcrhk); | 765 | #endif |
609 | RSA_set_ex_data(rtmp, hndidx, (char *)hptr); | 766 | #ifndef OPENSSL_NO_RSA |
767 | rtmp = RSA_new_method(eng); | ||
768 | RSA_set_ex_data(rtmp, hndidx_rsa, (char *)hptr); | ||
610 | rtmp->e = BN_new(); | 769 | rtmp->e = BN_new(); |
611 | rtmp->n = BN_new(); | 770 | rtmp->n = BN_new(); |
612 | rtmp->flags |= RSA_FLAG_EXT_PKEY; | 771 | rtmp->flags |= RSA_FLAG_EXT_PKEY; |
@@ -615,11 +774,11 @@ static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | |||
615 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg) | 774 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg) |
616 | != HWCRYPTOHOOK_ERROR_MPISIZE) | 775 | != HWCRYPTOHOOK_ERROR_MPISIZE) |
617 | { | 776 | { |
618 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY,ENGINE_R_CHIL_ERROR); | 777 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY,HWCRHK_R_CHIL_ERROR); |
619 | ERR_add_error_data(1,rmsg.buf); | 778 | ERR_add_error_data(1,rmsg.buf); |
620 | goto err; | 779 | goto err; |
621 | } | 780 | } |
622 | 781 | ||
623 | bn_expand2(rtmp->e, e.size/sizeof(BN_ULONG)); | 782 | bn_expand2(rtmp->e, e.size/sizeof(BN_ULONG)); |
624 | bn_expand2(rtmp->n, n.size/sizeof(BN_ULONG)); | 783 | bn_expand2(rtmp->n, n.size/sizeof(BN_ULONG)); |
625 | MPI2BN(rtmp->e, e); | 784 | MPI2BN(rtmp->e, e); |
@@ -627,8 +786,8 @@ static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | |||
627 | 786 | ||
628 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg)) | 787 | if (p_hwcrhk_RSAGetPublicKey(*hptr, &n, &e, &rmsg)) |
629 | { | 788 | { |
630 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY, | 789 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY, |
631 | ENGINE_R_CHIL_ERROR); | 790 | HWCRHK_R_CHIL_ERROR); |
632 | ERR_add_error_data(1,rmsg.buf); | 791 | ERR_add_error_data(1,rmsg.buf); |
633 | goto err; | 792 | goto err; |
634 | } | 793 | } |
@@ -639,23 +798,37 @@ static EVP_PKEY *hwcrhk_load_privkey(const char *key_id, | |||
639 | 798 | ||
640 | res = EVP_PKEY_new(); | 799 | res = EVP_PKEY_new(); |
641 | EVP_PKEY_assign_RSA(res, rtmp); | 800 | EVP_PKEY_assign_RSA(res, rtmp); |
801 | #endif | ||
802 | |||
803 | if (!res) | ||
804 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY, | ||
805 | HWCRHK_R_PRIVATE_KEY_ALGORITHMS_DISABLED); | ||
642 | 806 | ||
643 | return res; | 807 | return res; |
644 | err: | 808 | err: |
645 | if (res) | 809 | if (res) |
646 | EVP_PKEY_free(res); | 810 | EVP_PKEY_free(res); |
811 | #ifndef OPENSSL_NO_RSA | ||
647 | if (rtmp) | 812 | if (rtmp) |
648 | RSA_free(rtmp); | 813 | RSA_free(rtmp); |
814 | #endif | ||
649 | return NULL; | 815 | return NULL; |
650 | } | 816 | } |
651 | 817 | ||
652 | static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, const char *passphrase) | 818 | static EVP_PKEY *hwcrhk_load_pubkey(ENGINE *eng, const char *key_id, |
819 | UI_METHOD *ui_method, void *callback_data) | ||
653 | { | 820 | { |
654 | EVP_PKEY *res = hwcrhk_load_privkey(key_id, passphrase); | 821 | EVP_PKEY *res = NULL; |
822 | |||
823 | #ifndef OPENSSL_NO_RSA | ||
824 | res = hwcrhk_load_privkey(eng, key_id, | ||
825 | ui_method, callback_data); | ||
826 | #endif | ||
655 | 827 | ||
656 | if (res) | 828 | if (res) |
657 | switch(res->type) | 829 | switch(res->type) |
658 | { | 830 | { |
831 | #ifndef OPENSSL_NO_RSA | ||
659 | case EVP_PKEY_RSA: | 832 | case EVP_PKEY_RSA: |
660 | { | 833 | { |
661 | RSA *rsa = NULL; | 834 | RSA *rsa = NULL; |
@@ -665,12 +838,16 @@ static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, const char *passphrase) | |||
665 | res->pkey.rsa = RSA_new(); | 838 | res->pkey.rsa = RSA_new(); |
666 | res->pkey.rsa->n = rsa->n; | 839 | res->pkey.rsa->n = rsa->n; |
667 | res->pkey.rsa->e = rsa->e; | 840 | res->pkey.rsa->e = rsa->e; |
841 | rsa->n = NULL; | ||
842 | rsa->e = NULL; | ||
668 | CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY); | 843 | CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY); |
669 | RSA_free(rsa); | 844 | RSA_free(rsa); |
670 | } | 845 | } |
846 | break; | ||
847 | #endif | ||
671 | default: | 848 | default: |
672 | ENGINEerr(ENGINE_F_HWCRHK_LOAD_PUBKEY, | 849 | HWCRHKerr(HWCRHK_F_HWCRHK_LOAD_PUBKEY, |
673 | ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED); | 850 | HWCRHK_R_CTRL_COMMAND_NOT_IMPLEMENTED); |
674 | goto err; | 851 | goto err; |
675 | } | 852 | } |
676 | 853 | ||
@@ -682,7 +859,7 @@ static EVP_PKEY *hwcrhk_load_pubkey(const char *key_id, const char *passphrase) | |||
682 | } | 859 | } |
683 | 860 | ||
684 | /* A little mod_exp */ | 861 | /* A little mod_exp */ |
685 | static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 862 | static int hwcrhk_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
686 | const BIGNUM *m, BN_CTX *ctx) | 863 | const BIGNUM *m, BN_CTX *ctx) |
687 | { | 864 | { |
688 | char tempbuf[1024]; | 865 | char tempbuf[1024]; |
@@ -695,11 +872,11 @@ static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
695 | 872 | ||
696 | to_return = 0; /* expect failure */ | 873 | to_return = 0; /* expect failure */ |
697 | rmsg.buf = tempbuf; | 874 | rmsg.buf = tempbuf; |
698 | rmsg.size = 1024; | 875 | rmsg.size = sizeof(tempbuf); |
699 | 876 | ||
700 | if(!hwcrhk_context) | 877 | if(!hwcrhk_context) |
701 | { | 878 | { |
702 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_NOT_INITIALISED); | 879 | HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_NOT_INITIALISED); |
703 | goto err; | 880 | goto err; |
704 | } | 881 | } |
705 | /* Prepare the params */ | 882 | /* Prepare the params */ |
@@ -723,11 +900,11 @@ static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
723 | might be a good thing. */ | 900 | might be a good thing. */ |
724 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | 901 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) |
725 | { | 902 | { |
726 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | 903 | HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_REQUEST_FALLBACK); |
727 | } | 904 | } |
728 | else | 905 | else |
729 | { | 906 | { |
730 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 907 | HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_REQUEST_FAILED); |
731 | } | 908 | } |
732 | ERR_add_error_data(1,rmsg.buf); | 909 | ERR_add_error_data(1,rmsg.buf); |
733 | goto err; | 910 | goto err; |
@@ -737,38 +914,39 @@ static int hwcrhk_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
737 | err: | 914 | err: |
738 | return to_return; | 915 | return to_return; |
739 | } | 916 | } |
740 | 917 | ||
741 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | 918 | #ifndef OPENSSL_NO_RSA |
919 | static int hwcrhk_rsa_mod_exp(BIGNUM *r, const BIGNUM *I, RSA *rsa) | ||
742 | { | 920 | { |
743 | char tempbuf[1024]; | 921 | char tempbuf[1024]; |
744 | HWCryptoHook_ErrMsgBuf rmsg; | 922 | HWCryptoHook_ErrMsgBuf rmsg; |
745 | HWCryptoHook_RSAKeyHandle *hptr; | 923 | HWCryptoHook_RSAKeyHandle *hptr; |
746 | int to_return = 0, ret; | 924 | int to_return = 0, ret; |
747 | 925 | ||
926 | rmsg.buf = tempbuf; | ||
927 | rmsg.size = sizeof(tempbuf); | ||
928 | |||
748 | if(!hwcrhk_context) | 929 | if(!hwcrhk_context) |
749 | { | 930 | { |
750 | ENGINEerr(ENGINE_F_HWCRHK_MOD_EXP,ENGINE_R_NOT_INITIALISED); | 931 | HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_NOT_INITIALISED); |
751 | goto err; | 932 | goto err; |
752 | } | 933 | } |
753 | 934 | ||
754 | /* This provides support for nForce keys. Since that's opaque data | 935 | /* This provides support for nForce keys. Since that's opaque data |
755 | all we do is provide a handle to the proper key and let HWCryptoHook | 936 | all we do is provide a handle to the proper key and let HWCryptoHook |
756 | take care of the rest. */ | 937 | take care of the rest. */ |
757 | if ((hptr = (HWCryptoHook_RSAKeyHandle *) RSA_get_ex_data(rsa, hndidx)) | 938 | if ((hptr = (HWCryptoHook_RSAKeyHandle *) RSA_get_ex_data(rsa, hndidx_rsa)) |
758 | != NULL) | 939 | != NULL) |
759 | { | 940 | { |
760 | HWCryptoHook_MPI m_a, m_r; | 941 | HWCryptoHook_MPI m_a, m_r; |
761 | 942 | ||
762 | if(!rsa->n) | 943 | if(!rsa->n) |
763 | { | 944 | { |
764 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP, | 945 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
765 | ENGINE_R_MISSING_KEY_COMPONENTS); | 946 | HWCRHK_R_MISSING_KEY_COMPONENTS); |
766 | goto err; | 947 | goto err; |
767 | } | 948 | } |
768 | 949 | ||
769 | rmsg.buf = tempbuf; | ||
770 | rmsg.size = 1024; | ||
771 | |||
772 | /* Prepare the params */ | 950 | /* Prepare the params */ |
773 | bn_expand2(r, rsa->n->top); /* Check for error !! */ | 951 | bn_expand2(r, rsa->n->top); /* Check for error !! */ |
774 | BN2MPI(m_a, I); | 952 | BN2MPI(m_a, I); |
@@ -788,11 +966,13 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | |||
788 | might be a good thing. */ | 966 | might be a good thing. */ |
789 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | 967 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) |
790 | { | 968 | { |
791 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | 969 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
970 | HWCRHK_R_REQUEST_FALLBACK); | ||
792 | } | 971 | } |
793 | else | 972 | else |
794 | { | 973 | { |
795 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 974 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
975 | HWCRHK_R_REQUEST_FAILED); | ||
796 | } | 976 | } |
797 | ERR_add_error_data(1,rmsg.buf); | 977 | ERR_add_error_data(1,rmsg.buf); |
798 | goto err; | 978 | goto err; |
@@ -804,14 +984,11 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | |||
804 | 984 | ||
805 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) | 985 | if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp) |
806 | { | 986 | { |
807 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP, | 987 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
808 | ENGINE_R_MISSING_KEY_COMPONENTS); | 988 | HWCRHK_R_MISSING_KEY_COMPONENTS); |
809 | goto err; | 989 | goto err; |
810 | } | 990 | } |
811 | 991 | ||
812 | rmsg.buf = tempbuf; | ||
813 | rmsg.size = 1024; | ||
814 | |||
815 | /* Prepare the params */ | 992 | /* Prepare the params */ |
816 | bn_expand2(r, rsa->n->top); /* Check for error !! */ | 993 | bn_expand2(r, rsa->n->top); /* Check for error !! */ |
817 | BN2MPI(m_a, I); | 994 | BN2MPI(m_a, I); |
@@ -837,11 +1014,13 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | |||
837 | might be a good thing. */ | 1014 | might be a good thing. */ |
838 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | 1015 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) |
839 | { | 1016 | { |
840 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FALLBACK); | 1017 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
1018 | HWCRHK_R_REQUEST_FALLBACK); | ||
841 | } | 1019 | } |
842 | else | 1020 | else |
843 | { | 1021 | { |
844 | ENGINEerr(ENGINE_F_HWCRHK_RSA_MOD_EXP,ENGINE_R_REQUEST_FAILED); | 1022 | HWCRHKerr(HWCRHK_F_HWCRHK_RSA_MOD_EXP, |
1023 | HWCRHK_R_REQUEST_FAILED); | ||
845 | } | 1024 | } |
846 | ERR_add_error_data(1,rmsg.buf); | 1025 | ERR_add_error_data(1,rmsg.buf); |
847 | goto err; | 1026 | goto err; |
@@ -852,16 +1031,18 @@ static int hwcrhk_rsa_mod_exp(BIGNUM *r, BIGNUM *I, RSA *rsa) | |||
852 | err: | 1031 | err: |
853 | return to_return; | 1032 | return to_return; |
854 | } | 1033 | } |
1034 | #endif | ||
855 | 1035 | ||
856 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ | 1036 | /* This function is aliased to mod_exp (with the mont stuff dropped). */ |
857 | static int hwcrhk_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 1037 | static int hwcrhk_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, |
858 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 1038 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
859 | { | 1039 | { |
860 | return hwcrhk_mod_exp(r, a, p, m, ctx); | 1040 | return hwcrhk_mod_exp(r, a, p, m, ctx); |
861 | } | 1041 | } |
862 | 1042 | ||
863 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ | 1043 | /* This function is aliased to mod_exp (with the dh and mont dropped). */ |
864 | static int hwcrhk_mod_exp_dh(DH *dh, BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 1044 | static int hwcrhk_mod_exp_dh(const DH *dh, BIGNUM *r, |
1045 | const BIGNUM *a, const BIGNUM *p, | ||
865 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) | 1046 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) |
866 | { | 1047 | { |
867 | return hwcrhk_mod_exp(r, a, p, m, ctx); | 1048 | return hwcrhk_mod_exp(r, a, p, m, ctx); |
@@ -876,11 +1057,11 @@ static int hwcrhk_rand_bytes(unsigned char *buf, int num) | |||
876 | int ret; | 1057 | int ret; |
877 | 1058 | ||
878 | rmsg.buf = tempbuf; | 1059 | rmsg.buf = tempbuf; |
879 | rmsg.size = 1024; | 1060 | rmsg.size = sizeof(tempbuf); |
880 | 1061 | ||
881 | if(!hwcrhk_context) | 1062 | if(!hwcrhk_context) |
882 | { | 1063 | { |
883 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_NOT_INITIALISED); | 1064 | HWCRHKerr(HWCRHK_F_HWCRHK_RAND_BYTES,HWCRHK_R_NOT_INITIALISED); |
884 | goto err; | 1065 | goto err; |
885 | } | 1066 | } |
886 | 1067 | ||
@@ -892,11 +1073,13 @@ static int hwcrhk_rand_bytes(unsigned char *buf, int num) | |||
892 | might be a good thing. */ | 1073 | might be a good thing. */ |
893 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) | 1074 | if(ret == HWCRYPTOHOOK_ERROR_FALLBACK) |
894 | { | 1075 | { |
895 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_REQUEST_FALLBACK); | 1076 | HWCRHKerr(HWCRHK_F_HWCRHK_RAND_BYTES, |
1077 | HWCRHK_R_REQUEST_FALLBACK); | ||
896 | } | 1078 | } |
897 | else | 1079 | else |
898 | { | 1080 | { |
899 | ENGINEerr(ENGINE_F_HWCRHK_RAND_BYTES,ENGINE_R_REQUEST_FAILED); | 1081 | HWCRHKerr(HWCRHK_F_HWCRHK_RAND_BYTES, |
1082 | HWCRHK_R_REQUEST_FAILED); | ||
900 | } | 1083 | } |
901 | ERR_add_error_data(1,rmsg.buf); | 1084 | ERR_add_error_data(1,rmsg.buf); |
902 | goto err; | 1085 | goto err; |
@@ -914,20 +1097,28 @@ static int hwcrhk_rand_status(void) | |||
914 | /* This cleans up an RSA KM key, called when ex_data is freed */ | 1097 | /* This cleans up an RSA KM key, called when ex_data is freed */ |
915 | 1098 | ||
916 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, | 1099 | static void hwcrhk_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, |
917 | int index,long argl, void *argp) | 1100 | int ind,long argl, void *argp) |
918 | { | 1101 | { |
919 | char tempbuf[1024]; | 1102 | char tempbuf[1024]; |
920 | HWCryptoHook_ErrMsgBuf rmsg; | 1103 | HWCryptoHook_ErrMsgBuf rmsg; |
1104 | #ifndef OPENSSL_NO_RSA | ||
921 | HWCryptoHook_RSAKeyHandle *hptr; | 1105 | HWCryptoHook_RSAKeyHandle *hptr; |
1106 | #endif | ||
1107 | #if !defined(OPENSSL_NO_RSA) | ||
922 | int ret; | 1108 | int ret; |
1109 | #endif | ||
923 | 1110 | ||
924 | rmsg.buf = tempbuf; | 1111 | rmsg.buf = tempbuf; |
925 | rmsg.size = 1024; | 1112 | rmsg.size = sizeof(tempbuf); |
926 | 1113 | ||
1114 | #ifndef OPENSSL_NO_RSA | ||
927 | hptr = (HWCryptoHook_RSAKeyHandle *) item; | 1115 | hptr = (HWCryptoHook_RSAKeyHandle *) item; |
928 | if(!hptr) return; | 1116 | if(hptr) |
929 | ret = p_hwcrhk_RSAUnloadKey(*hptr, NULL); | 1117 | { |
930 | OPENSSL_free(hptr); | 1118 | ret = p_hwcrhk_RSAUnloadKey(*hptr, NULL); |
1119 | OPENSSL_free(hptr); | ||
1120 | } | ||
1121 | #endif | ||
931 | } | 1122 | } |
932 | 1123 | ||
933 | /* Mutex calls: since the HWCryptoHook model closely follows the POSIX model | 1124 | /* Mutex calls: since the HWCryptoHook model closely follows the POSIX model |
@@ -939,17 +1130,17 @@ static int hwcrhk_mutex_init(HWCryptoHook_Mutex* mt, | |||
939 | { | 1130 | { |
940 | mt->lockid = CRYPTO_get_new_dynlockid(); | 1131 | mt->lockid = CRYPTO_get_new_dynlockid(); |
941 | if (mt->lockid == 0) | 1132 | if (mt->lockid == 0) |
942 | return 0; | 1133 | return 1; /* failure */ |
943 | return 1; | 1134 | return 0; /* success */ |
944 | } | 1135 | } |
945 | 1136 | ||
946 | static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt) | 1137 | static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt) |
947 | { | 1138 | { |
948 | CRYPTO_w_lock(mt->lockid); | 1139 | CRYPTO_w_lock(mt->lockid); |
949 | return 1; | 1140 | return 0; |
950 | } | 1141 | } |
951 | 1142 | ||
952 | void hwcrhk_mutex_unlock(HWCryptoHook_Mutex * mt) | 1143 | static void hwcrhk_mutex_unlock(HWCryptoHook_Mutex * mt) |
953 | { | 1144 | { |
954 | CRYPTO_w_unlock(mt->lockid); | 1145 | CRYPTO_w_unlock(mt->lockid); |
955 | } | 1146 | } |
@@ -964,50 +1155,146 @@ static int hwcrhk_get_pass(const char *prompt_info, | |||
964 | HWCryptoHook_PassphraseContext *ppctx, | 1155 | HWCryptoHook_PassphraseContext *ppctx, |
965 | HWCryptoHook_CallerContext *cactx) | 1156 | HWCryptoHook_CallerContext *cactx) |
966 | { | 1157 | { |
967 | int l = 0; | 1158 | pem_password_cb *callback = NULL; |
968 | char prompt[1024]; | 1159 | void *callback_data = NULL; |
969 | 1160 | UI_METHOD *ui_method = NULL; | |
970 | if (password_callback == NULL) | 1161 | |
971 | { | 1162 | if (cactx) |
972 | ENGINEerr(ENGINE_F_HWCRHK_GET_PASS,ENGINE_R_NO_CALLBACK); | 1163 | { |
973 | return -1; | 1164 | if (cactx->ui_method) |
974 | } | 1165 | ui_method = cactx->ui_method; |
975 | if (prompt_info) | 1166 | if (cactx->password_callback) |
1167 | callback = cactx->password_callback; | ||
1168 | if (cactx->callback_data) | ||
1169 | callback_data = cactx->callback_data; | ||
1170 | } | ||
1171 | if (ppctx) | ||
976 | { | 1172 | { |
977 | strncpy(prompt, "Card: \"", sizeof(prompt)); | 1173 | if (ppctx->ui_method) |
978 | l += 5; | 1174 | { |
979 | strncpy(prompt + l, prompt_info, sizeof(prompt) - l); | 1175 | ui_method = ppctx->ui_method; |
980 | l += strlen(prompt_info); | 1176 | callback = NULL; |
981 | if (l + 2 < sizeof(prompt)) | 1177 | } |
982 | { | 1178 | if (ppctx->callback_data) |
983 | strncpy(prompt + l, "\"\n", sizeof(prompt) - l); | 1179 | callback_data = ppctx->callback_data; |
984 | l += 2; | ||
985 | } | ||
986 | } | 1180 | } |
987 | if (l < sizeof(prompt) - 1) | 1181 | if (callback == NULL && ui_method == NULL) |
988 | { | 1182 | { |
989 | strncpy(prompt, "Enter Passphrase <enter to cancel>:", | 1183 | HWCRHKerr(HWCRHK_F_HWCRHK_GET_PASS,HWCRHK_R_NO_CALLBACK); |
990 | sizeof(prompt) - l); | 1184 | return -1; |
991 | l += 35; | ||
992 | } | 1185 | } |
993 | prompt[l] = '\0'; | ||
994 | 1186 | ||
995 | /* I know, passing on the prompt instead of the user data *is* | 1187 | if (ui_method) |
996 | a bad thing. However, that's all we have right now. | 1188 | { |
997 | -- Richard Levitte */ | 1189 | UI *ui = UI_new_method(ui_method); |
998 | *len_io = password_callback(buf, *len_io, 0, prompt); | 1190 | if (ui) |
1191 | { | ||
1192 | int ok; | ||
1193 | char *prompt = UI_construct_prompt(ui, | ||
1194 | "pass phrase", prompt_info); | ||
1195 | |||
1196 | ok = UI_add_input_string(ui,prompt, | ||
1197 | UI_INPUT_FLAG_DEFAULT_PWD, | ||
1198 | buf,0,(*len_io) - 1); | ||
1199 | UI_add_user_data(ui, callback_data); | ||
1200 | UI_ctrl(ui, UI_CTRL_PRINT_ERRORS, 1, 0, 0); | ||
1201 | |||
1202 | if (ok >= 0) | ||
1203 | do | ||
1204 | { | ||
1205 | ok=UI_process(ui); | ||
1206 | } | ||
1207 | while (ok < 0 && UI_ctrl(ui, UI_CTRL_IS_REDOABLE, 0, 0, 0)); | ||
1208 | |||
1209 | if (ok >= 0) | ||
1210 | *len_io = strlen(buf); | ||
1211 | |||
1212 | UI_free(ui); | ||
1213 | OPENSSL_free(prompt); | ||
1214 | } | ||
1215 | } | ||
1216 | else | ||
1217 | { | ||
1218 | *len_io = callback(buf, *len_io, 0, callback_data); | ||
1219 | } | ||
999 | if(!*len_io) | 1220 | if(!*len_io) |
1000 | return -1; | 1221 | return -1; |
1001 | return 0; | 1222 | return 0; |
1002 | } | 1223 | } |
1003 | 1224 | ||
1004 | static void hwcrhk_log_message(void *logstream, const char *message) | 1225 | static int hwcrhk_insert_card(const char *prompt_info, |
1226 | const char *wrong_info, | ||
1227 | HWCryptoHook_PassphraseContext *ppctx, | ||
1228 | HWCryptoHook_CallerContext *cactx) | ||
1229 | { | ||
1230 | int ok = -1; | ||
1231 | UI *ui; | ||
1232 | void *callback_data = NULL; | ||
1233 | UI_METHOD *ui_method = NULL; | ||
1234 | |||
1235 | if (cactx) | ||
1236 | { | ||
1237 | if (cactx->ui_method) | ||
1238 | ui_method = cactx->ui_method; | ||
1239 | if (cactx->callback_data) | ||
1240 | callback_data = cactx->callback_data; | ||
1241 | } | ||
1242 | if (ppctx) | ||
1243 | { | ||
1244 | if (ppctx->ui_method) | ||
1245 | ui_method = ppctx->ui_method; | ||
1246 | if (ppctx->callback_data) | ||
1247 | callback_data = ppctx->callback_data; | ||
1248 | } | ||
1249 | if (ui_method == NULL) | ||
1250 | { | ||
1251 | HWCRHKerr(HWCRHK_F_HWCRHK_INSERT_CARD, | ||
1252 | HWCRHK_R_NO_CALLBACK); | ||
1253 | return -1; | ||
1254 | } | ||
1255 | |||
1256 | ui = UI_new_method(ui_method); | ||
1257 | |||
1258 | if (ui) | ||
1259 | { | ||
1260 | char answer; | ||
1261 | char buf[BUFSIZ]; | ||
1262 | |||
1263 | if (wrong_info) | ||
1264 | BIO_snprintf(buf, sizeof(buf)-1, | ||
1265 | "Current card: \"%s\"\n", wrong_info); | ||
1266 | ok = UI_dup_info_string(ui, buf); | ||
1267 | if (ok >= 0 && prompt_info) | ||
1268 | { | ||
1269 | BIO_snprintf(buf, sizeof(buf)-1, | ||
1270 | "Insert card \"%s\"", prompt_info); | ||
1271 | ok = UI_dup_input_boolean(ui, buf, | ||
1272 | "\n then hit <enter> or C<enter> to cancel\n", | ||
1273 | "\r\n", "Cc", UI_INPUT_FLAG_ECHO, &answer); | ||
1274 | } | ||
1275 | UI_add_user_data(ui, callback_data); | ||
1276 | |||
1277 | if (ok >= 0) | ||
1278 | ok = UI_process(ui); | ||
1279 | UI_free(ui); | ||
1280 | |||
1281 | if (ok == -2 || (ok >= 0 && answer == 'C')) | ||
1282 | ok = 1; | ||
1283 | else if (ok < 0) | ||
1284 | ok = -1; | ||
1285 | else | ||
1286 | ok = 0; | ||
1287 | } | ||
1288 | return ok; | ||
1289 | } | ||
1290 | |||
1291 | static void hwcrhk_log_message(void *logstr, const char *message) | ||
1005 | { | 1292 | { |
1006 | BIO *lstream = NULL; | 1293 | BIO *lstream = NULL; |
1007 | 1294 | ||
1008 | CRYPTO_w_lock(CRYPTO_LOCK_BIO); | 1295 | CRYPTO_w_lock(CRYPTO_LOCK_BIO); |
1009 | if (logstream) | 1296 | if (logstr) |
1010 | lstream=*(BIO **)logstream; | 1297 | lstream=*(BIO **)logstr; |
1011 | if (lstream) | 1298 | if (lstream) |
1012 | { | 1299 | { |
1013 | BIO_write(lstream, message, strlen(message)); | 1300 | BIO_write(lstream, message, strlen(message)); |
@@ -1015,5 +1302,20 @@ static void hwcrhk_log_message(void *logstream, const char *message) | |||
1015 | CRYPTO_w_unlock(CRYPTO_LOCK_BIO); | 1302 | CRYPTO_w_unlock(CRYPTO_LOCK_BIO); |
1016 | } | 1303 | } |
1017 | 1304 | ||
1018 | #endif /* !NO_HW_NCIPHER */ | 1305 | /* This stuff is needed if this ENGINE is being compiled into a self-contained |
1019 | #endif /* !NO_HW */ | 1306 | * shared-library. */ |
1307 | #ifdef ENGINE_DYNAMIC_SUPPORT | ||
1308 | static int bind_fn(ENGINE *e, const char *id) | ||
1309 | { | ||
1310 | if(id && (strcmp(id, engine_hwcrhk_id) != 0)) | ||
1311 | return 0; | ||
1312 | if(!bind_helper(e)) | ||
1313 | return 0; | ||
1314 | return 1; | ||
1315 | } | ||
1316 | IMPLEMENT_DYNAMIC_CHECK_FN() | ||
1317 | IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) | ||
1318 | #endif /* ENGINE_DYNAMIC_SUPPORT */ | ||
1319 | |||
1320 | #endif /* !OPENSSL_NO_HW_NCIPHER */ | ||
1321 | #endif /* !OPENSSL_NO_HW */ | ||
diff --git a/src/lib/libcrypto/engine/vendor_defns/atalla.h b/src/lib/libcrypto/engine/vendor_defns/atalla.h index 8111649c54..149970d441 100644 --- a/src/lib/libcrypto/engine/vendor_defns/atalla.h +++ b/src/lib/libcrypto/engine/vendor_defns/atalla.h | |||
@@ -46,16 +46,3 @@ typedef int tfnASI_RSAPrivateKeyOpFn(RSAPrivateKey * rsaKey, | |||
46 | unsigned char *input, | 46 | unsigned char *input, |
47 | unsigned int modulus_len); | 47 | unsigned int modulus_len); |
48 | 48 | ||
49 | /* These are the static string constants for the DSO file name and the function | ||
50 | * symbol names to bind to. Regrettably, the DSO name on *nix appears to be | ||
51 | * "atasi.so" rather than something more consistent like "libatasi.so". At the | ||
52 | * time of writing, I'm not sure what the file name on win32 is but clearly | ||
53 | * native name translation is not possible (eg libatasi.so on *nix, and | ||
54 | * atasi.dll on win32). For the purposes of testing, I have created a symbollic | ||
55 | * link called "libatasi.so" so that we can use native name-translation - a | ||
56 | * better solution will be needed. */ | ||
57 | static const char *ATALLA_LIBNAME = "atasi"; | ||
58 | static const char *ATALLA_F1 = "ASI_GetHardwareConfig"; | ||
59 | static const char *ATALLA_F2 = "ASI_RSAPrivateKeyOpFn"; | ||
60 | static const char *ATALLA_F3 = "ASI_GetPerformanceStatistics"; | ||
61 | |||
diff --git a/src/lib/libcrypto/engine/vendor_defns/cswift.h b/src/lib/libcrypto/engine/vendor_defns/cswift.h index 0af14a1a92..60079326bb 100644 --- a/src/lib/libcrypto/engine/vendor_defns/cswift.h +++ b/src/lib/libcrypto/engine/vendor_defns/cswift.h | |||
@@ -32,12 +32,12 @@ typedef __uint32_t SW_U32; | |||
32 | typedef unsigned long SW_U32; /* 32 bit integer */ | 32 | typedef unsigned long SW_U32; /* 32 bit integer */ |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #if defined(WIN32) | 35 | #if defined(OPENSSL_SYS_WIN32) |
36 | typedef struct _SW_U64 { | 36 | typedef struct _SW_U64 { |
37 | SW_U32 low32; | 37 | SW_U32 low32; |
38 | SW_U32 high32; | 38 | SW_U32 high32; |
39 | } SW_U64; /* 64 bit integer */ | 39 | } SW_U64; /* 64 bit integer */ |
40 | #elif defined(MAC) | 40 | #elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC) |
41 | typedef longlong SW_U64 | 41 | typedef longlong SW_U64 |
42 | #else /* Unix variants */ | 42 | #else /* Unix variants */ |
43 | typedef struct _SW_U64 { | 43 | typedef struct _SW_U64 { |
@@ -156,6 +156,27 @@ typedef struct _SW_LARGENUMBER { | |||
156 | /* bytes in network (big endian) order */ | 156 | /* bytes in network (big endian) order */ |
157 | } SW_LARGENUMBER; | 157 | } SW_LARGENUMBER; |
158 | 158 | ||
159 | #if defined(OPENSSL_SYS_WIN32) | ||
160 | #include <windows.h> | ||
161 | typedef HANDLE SW_OSHANDLE; /* handle to kernel object */ | ||
162 | #define SW_OS_INVALID_HANDLE INVALID_HANDLE_VALUE | ||
163 | #define SW_CALLCONV _stdcall | ||
164 | #elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC) | ||
165 | /* async callback mechanisms */ | ||
166 | /* swiftCallbackLevel */ | ||
167 | #define SW_MAC_CALLBACK_LEVEL_NO 0 | ||
168 | #define SW_MAC_CALLBACK_LEVEL_HARDWARE 1 /* from the hardware ISR */ | ||
169 | #define SW_MAC_CALLBACK_LEVEL_SECONDARY 2 /* as secondary ISR */ | ||
170 | typedef int SW_MAC_CALLBACK_LEVEL; | ||
171 | typedef int SW_OSHANDLE; | ||
172 | #define SW_OS_INVALID_HANDLE (-1) | ||
173 | #define SW_CALLCONV | ||
174 | #else /* Unix variants */ | ||
175 | typedef int SW_OSHANDLE; /* handle to driver */ | ||
176 | #define SW_OS_INVALID_HANDLE (-1) | ||
177 | #define SW_CALLCONV | ||
178 | #endif | ||
179 | |||
159 | typedef struct _SW_CRT { | 180 | typedef struct _SW_CRT { |
160 | SW_LARGENUMBER p; /* prime number p */ | 181 | SW_LARGENUMBER p; /* prime number p */ |
161 | SW_LARGENUMBER q; /* prime number q */ | 182 | SW_LARGENUMBER q; /* prime number q */ |
@@ -196,16 +217,16 @@ typedef SW_U32 SW_CONTEXT_HANDLE; /* opaque context handle */ | |||
196 | 217 | ||
197 | /* Now the OpenSSL bits, these function types are the for the function | 218 | /* Now the OpenSSL bits, these function types are the for the function |
198 | * pointers that will bound into the Rainbow shared libraries. */ | 219 | * pointers that will bound into the Rainbow shared libraries. */ |
199 | typedef SW_STATUS t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac); | 220 | typedef SW_STATUS SW_CALLCONV t_swAcquireAccContext(SW_CONTEXT_HANDLE *hac); |
200 | typedef SW_STATUS t_swAttachKeyParam(SW_CONTEXT_HANDLE hac, | 221 | typedef SW_STATUS SW_CALLCONV t_swAttachKeyParam(SW_CONTEXT_HANDLE hac, |
201 | SW_PARAM *key_params); | 222 | SW_PARAM *key_params); |
202 | typedef SW_STATUS t_swSimpleRequest(SW_CONTEXT_HANDLE hac, | 223 | typedef SW_STATUS SW_CALLCONV t_swSimpleRequest(SW_CONTEXT_HANDLE hac, |
203 | SW_COMMAND_CODE cmd, | 224 | SW_COMMAND_CODE cmd, |
204 | SW_LARGENUMBER pin[], | 225 | SW_LARGENUMBER pin[], |
205 | SW_U32 pin_count, | 226 | SW_U32 pin_count, |
206 | SW_LARGENUMBER pout[], | 227 | SW_LARGENUMBER pout[], |
207 | SW_U32 pout_count); | 228 | SW_U32 pout_count); |
208 | typedef SW_STATUS t_swReleaseAccContext(SW_CONTEXT_HANDLE hac); | 229 | typedef SW_STATUS SW_CALLCONV t_swReleaseAccContext(SW_CONTEXT_HANDLE hac); |
209 | 230 | ||
210 | #ifdef __cplusplus | 231 | #ifdef __cplusplus |
211 | } | 232 | } |
diff --git a/src/lib/libcrypto/evp/bio_ok.c b/src/lib/libcrypto/evp/bio_ok.c index 101275d648..3cbc6e7848 100644 --- a/src/lib/libcrypto/evp/bio_ok.c +++ b/src/lib/libcrypto/evp/bio_ok.c | |||
@@ -67,7 +67,7 @@ | |||
67 | and everything was OK. BUT if user types wrong password | 67 | and everything was OK. BUT if user types wrong password |
68 | BIO_f_cipher outputs only garbage and my function crashes. Yes | 68 | BIO_f_cipher outputs only garbage and my function crashes. Yes |
69 | I can and I should fix my function, but BIO_f_cipher is | 69 | I can and I should fix my function, but BIO_f_cipher is |
70 | easy way to add encryption support to many exisiting applications | 70 | easy way to add encryption support to many existing applications |
71 | and it's hard to debug and fix them all. | 71 | and it's hard to debug and fix them all. |
72 | 72 | ||
73 | So I wanted another BIO which would catch the incorrect passwords and | 73 | So I wanted another BIO which would catch the incorrect passwords and |
@@ -80,10 +80,10 @@ | |||
80 | 1) you must somehow separate checksum from actual data. | 80 | 1) you must somehow separate checksum from actual data. |
81 | 2) you need lot's of memory when reading the file, because you | 81 | 2) you need lot's of memory when reading the file, because you |
82 | must read to the end of the file and verify the checksum before | 82 | must read to the end of the file and verify the checksum before |
83 | leting the application to read the data. | 83 | letting the application to read the data. |
84 | 84 | ||
85 | BIO_f_reliable tries to solve both problems, so that you can | 85 | BIO_f_reliable tries to solve both problems, so that you can |
86 | read and write arbitraly long streams using only fixed amount | 86 | read and write arbitrary long streams using only fixed amount |
87 | of memory. | 87 | of memory. |
88 | 88 | ||
89 | BIO_f_reliable splits data stream into blocks. Each block is prefixed | 89 | BIO_f_reliable splits data stream into blocks. Each block is prefixed |
@@ -91,7 +91,7 @@ | |||
91 | several Kbytes of memory to buffer single block before verifying | 91 | several Kbytes of memory to buffer single block before verifying |
92 | it's digest. | 92 | it's digest. |
93 | 93 | ||
94 | BIO_f_reliable goes futher and adds several important capabilities: | 94 | BIO_f_reliable goes further and adds several important capabilities: |
95 | 95 | ||
96 | 1) the digest of the block is computed over the whole stream | 96 | 1) the digest of the block is computed over the whole stream |
97 | -- so nobody can rearrange the blocks or remove or replace them. | 97 | -- so nobody can rearrange the blocks or remove or replace them. |
@@ -110,7 +110,7 @@ | |||
110 | and then compare the digest output. | 110 | and then compare the digest output. |
111 | 111 | ||
112 | Bad things: BIO_f_reliable knows what's going on in EVP_Digest. I | 112 | Bad things: BIO_f_reliable knows what's going on in EVP_Digest. I |
113 | initialy wrote and tested this code on x86 machine and wrote the | 113 | initially wrote and tested this code on x86 machine and wrote the |
114 | digests out in machine-dependent order :( There are people using | 114 | digests out in machine-dependent order :( There are people using |
115 | this code and I cannot change this easily without making existing | 115 | this code and I cannot change this easily without making existing |
116 | data files unreadable. | 116 | data files unreadable. |
@@ -125,11 +125,13 @@ | |||
125 | #include <openssl/evp.h> | 125 | #include <openssl/evp.h> |
126 | #include <openssl/rand.h> | 126 | #include <openssl/rand.h> |
127 | 127 | ||
128 | static int ok_write(BIO *h,char *buf,int num); | 128 | static int ok_write(BIO *h, const char *buf, int num); |
129 | static int ok_read(BIO *h,char *buf,int size); | 129 | static int ok_read(BIO *h, char *buf, int size); |
130 | static long ok_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 130 | static long ok_ctrl(BIO *h, int cmd, long arg1, void *arg2); |
131 | static int ok_new(BIO *h); | 131 | static int ok_new(BIO *h); |
132 | static int ok_free(BIO *data); | 132 | static int ok_free(BIO *data); |
133 | static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | ||
134 | |||
133 | static void sig_out(BIO* b); | 135 | static void sig_out(BIO* b); |
134 | static void sig_in(BIO* b); | 136 | static void sig_in(BIO* b); |
135 | static void block_out(BIO* b); | 137 | static void block_out(BIO* b); |
@@ -160,7 +162,7 @@ typedef struct ok_struct | |||
160 | EVP_MD_CTX md; | 162 | EVP_MD_CTX md; |
161 | int blockout; /* output block is ready */ | 163 | int blockout; /* output block is ready */ |
162 | int sigio; /* must process signature */ | 164 | int sigio; /* must process signature */ |
163 | char buf[IOBS]; | 165 | unsigned char buf[IOBS]; |
164 | } BIO_OK_CTX; | 166 | } BIO_OK_CTX; |
165 | 167 | ||
166 | static BIO_METHOD methods_ok= | 168 | static BIO_METHOD methods_ok= |
@@ -173,6 +175,7 @@ static BIO_METHOD methods_ok= | |||
173 | ok_ctrl, | 175 | ok_ctrl, |
174 | ok_new, | 176 | ok_new, |
175 | ok_free, | 177 | ok_free, |
178 | ok_callback_ctrl, | ||
176 | }; | 179 | }; |
177 | 180 | ||
178 | BIO_METHOD *BIO_f_reliable(void) | 181 | BIO_METHOD *BIO_f_reliable(void) |
@@ -184,7 +187,7 @@ static int ok_new(BIO *bi) | |||
184 | { | 187 | { |
185 | BIO_OK_CTX *ctx; | 188 | BIO_OK_CTX *ctx; |
186 | 189 | ||
187 | ctx=(BIO_OK_CTX *)Malloc(sizeof(BIO_OK_CTX)); | 190 | ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); |
188 | if (ctx == NULL) return(0); | 191 | if (ctx == NULL) return(0); |
189 | 192 | ||
190 | ctx->buf_len=0; | 193 | ctx->buf_len=0; |
@@ -196,6 +199,8 @@ static int ok_new(BIO *bi) | |||
196 | ctx->blockout= 0; | 199 | ctx->blockout= 0; |
197 | ctx->sigio=1; | 200 | ctx->sigio=1; |
198 | 201 | ||
202 | EVP_MD_CTX_init(&ctx->md); | ||
203 | |||
199 | bi->init=0; | 204 | bi->init=0; |
200 | bi->ptr=(char *)ctx; | 205 | bi->ptr=(char *)ctx; |
201 | bi->flags=0; | 206 | bi->flags=0; |
@@ -205,8 +210,9 @@ static int ok_new(BIO *bi) | |||
205 | static int ok_free(BIO *a) | 210 | static int ok_free(BIO *a) |
206 | { | 211 | { |
207 | if (a == NULL) return(0); | 212 | if (a == NULL) return(0); |
213 | EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); | ||
208 | memset(a->ptr,0,sizeof(BIO_OK_CTX)); | 214 | memset(a->ptr,0,sizeof(BIO_OK_CTX)); |
209 | Free(a->ptr); | 215 | OPENSSL_free(a->ptr); |
210 | a->ptr=NULL; | 216 | a->ptr=NULL; |
211 | a->init=0; | 217 | a->init=0; |
212 | a->flags=0; | 218 | a->flags=0; |
@@ -284,7 +290,7 @@ static int ok_read(BIO *b, char *out, int outl) | |||
284 | return(ret); | 290 | return(ret); |
285 | } | 291 | } |
286 | 292 | ||
287 | static int ok_write(BIO *b, char *in, int inl) | 293 | static int ok_write(BIO *b, const char *in, int inl) |
288 | { | 294 | { |
289 | int ret=0,n,i; | 295 | int ret=0,n,i; |
290 | BIO_OK_CTX *ctx; | 296 | BIO_OK_CTX *ctx; |
@@ -342,7 +348,7 @@ static int ok_write(BIO *b, char *in, int inl) | |||
342 | return(ret); | 348 | return(ret); |
343 | } | 349 | } |
344 | 350 | ||
345 | static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | 351 | static long ok_ctrl(BIO *b, int cmd, long num, void *ptr) |
346 | { | 352 | { |
347 | BIO_OK_CTX *ctx; | 353 | BIO_OK_CTX *ctx; |
348 | EVP_MD *md; | 354 | EVP_MD *md; |
@@ -350,7 +356,7 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
350 | long ret=1; | 356 | long ret=1; |
351 | int i; | 357 | int i; |
352 | 358 | ||
353 | ctx=(BIO_OK_CTX *)b->ptr; | 359 | ctx=b->ptr; |
354 | 360 | ||
355 | switch (cmd) | 361 | switch (cmd) |
356 | { | 362 | { |
@@ -408,14 +414,14 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
408 | ret=(long)ctx->cont; | 414 | ret=(long)ctx->cont; |
409 | break; | 415 | break; |
410 | case BIO_C_SET_MD: | 416 | case BIO_C_SET_MD: |
411 | md=(EVP_MD *)ptr; | 417 | md=ptr; |
412 | EVP_DigestInit(&(ctx->md),md); | 418 | EVP_DigestInit_ex(&ctx->md, md, NULL); |
413 | b->init=1; | 419 | b->init=1; |
414 | break; | 420 | break; |
415 | case BIO_C_GET_MD: | 421 | case BIO_C_GET_MD: |
416 | if (b->init) | 422 | if (b->init) |
417 | { | 423 | { |
418 | ppmd=(const EVP_MD **)ptr; | 424 | ppmd=ptr; |
419 | *ppmd=ctx->md.digest; | 425 | *ppmd=ctx->md.digest; |
420 | } | 426 | } |
421 | else | 427 | else |
@@ -428,6 +434,20 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
428 | return(ret); | 434 | return(ret); |
429 | } | 435 | } |
430 | 436 | ||
437 | static long ok_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | ||
438 | { | ||
439 | long ret=1; | ||
440 | |||
441 | if (b->next_bio == NULL) return(0); | ||
442 | switch (cmd) | ||
443 | { | ||
444 | default: | ||
445 | ret=BIO_callback_ctrl(b->next_bio,cmd,fp); | ||
446 | break; | ||
447 | } | ||
448 | return(ret); | ||
449 | } | ||
450 | |||
431 | static void longswap(void *_ptr, int len) | 451 | static void longswap(void *_ptr, int len) |
432 | { | 452 | { |
433 | #ifndef L_ENDIAN | 453 | #ifndef L_ENDIAN |
@@ -445,19 +465,22 @@ static void sig_out(BIO* b) | |||
445 | BIO_OK_CTX *ctx; | 465 | BIO_OK_CTX *ctx; |
446 | EVP_MD_CTX *md; | 466 | EVP_MD_CTX *md; |
447 | 467 | ||
448 | ctx=(BIO_OK_CTX *)b->ptr; | 468 | ctx=b->ptr; |
449 | md= &(ctx->md); | 469 | md=&ctx->md; |
450 | 470 | ||
451 | if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; | 471 | if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; |
452 | 472 | ||
453 | EVP_DigestInit(md, md->digest); | 473 | EVP_DigestInit_ex(md, md->digest, NULL); |
454 | RAND_bytes(&(md->md.base[0]), md->digest->md_size); | 474 | /* FIXME: there's absolutely no guarantee this makes any sense at all, |
455 | memcpy(&(ctx->buf[ctx->buf_len]), &(md->md.base[0]), md->digest->md_size); | 475 | * particularly now EVP_MD_CTX has been restructured. |
476 | */ | ||
477 | RAND_pseudo_bytes(md->md_data, md->digest->md_size); | ||
478 | memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size); | ||
456 | longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size); | 479 | longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size); |
457 | ctx->buf_len+= md->digest->md_size; | 480 | ctx->buf_len+= md->digest->md_size; |
458 | 481 | ||
459 | EVP_DigestUpdate(md, (unsigned char*)WELLKNOWN, strlen(WELLKNOWN)); | 482 | EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); |
460 | md->digest->final(&(ctx->buf[ctx->buf_len]), &(md->md.base[0])); | 483 | EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); |
461 | ctx->buf_len+= md->digest->md_size; | 484 | ctx->buf_len+= md->digest->md_size; |
462 | ctx->blockout= 1; | 485 | ctx->blockout= 1; |
463 | ctx->sigio= 0; | 486 | ctx->sigio= 0; |
@@ -470,18 +493,18 @@ static void sig_in(BIO* b) | |||
470 | unsigned char tmp[EVP_MAX_MD_SIZE]; | 493 | unsigned char tmp[EVP_MAX_MD_SIZE]; |
471 | int ret= 0; | 494 | int ret= 0; |
472 | 495 | ||
473 | ctx=(BIO_OK_CTX *)b->ptr; | 496 | ctx=b->ptr; |
474 | md= &(ctx->md); | 497 | md=&ctx->md; |
475 | 498 | ||
476 | if(ctx->buf_len- ctx->buf_off < 2* md->digest->md_size) return; | 499 | if(ctx->buf_len- ctx->buf_off < 2* md->digest->md_size) return; |
477 | 500 | ||
478 | EVP_DigestInit(md, md->digest); | 501 | EVP_DigestInit_ex(md, md->digest, NULL); |
479 | memcpy(&(md->md.base[0]), &(ctx->buf[ctx->buf_off]), md->digest->md_size); | 502 | memcpy(md->md_data, &(ctx->buf[ctx->buf_off]), md->digest->md_size); |
480 | longswap(&(md->md.base[0]), md->digest->md_size); | 503 | longswap(md->md_data, md->digest->md_size); |
481 | ctx->buf_off+= md->digest->md_size; | 504 | ctx->buf_off+= md->digest->md_size; |
482 | 505 | ||
483 | EVP_DigestUpdate(md, (unsigned char*)WELLKNOWN, strlen(WELLKNOWN)); | 506 | EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); |
484 | md->digest->final(tmp, &(md->md.base[0])); | 507 | EVP_DigestFinal_ex(md, tmp, NULL); |
485 | ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0; | 508 | ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0; |
486 | ctx->buf_off+= md->digest->md_size; | 509 | ctx->buf_off+= md->digest->md_size; |
487 | if(ret == 1) | 510 | if(ret == 1) |
@@ -506,15 +529,15 @@ static void block_out(BIO* b) | |||
506 | EVP_MD_CTX *md; | 529 | EVP_MD_CTX *md; |
507 | unsigned long tl; | 530 | unsigned long tl; |
508 | 531 | ||
509 | ctx=(BIO_OK_CTX *)b->ptr; | 532 | ctx=b->ptr; |
510 | md= &(ctx->md); | 533 | md=&ctx->md; |
511 | 534 | ||
512 | tl= ctx->buf_len- OK_BLOCK_BLOCK; | 535 | tl= ctx->buf_len- OK_BLOCK_BLOCK; |
513 | tl= swapem(tl); | 536 | tl= swapem(tl); |
514 | memcpy(ctx->buf, &tl, OK_BLOCK_BLOCK); | 537 | memcpy(ctx->buf, &tl, OK_BLOCK_BLOCK); |
515 | tl= swapem(tl); | 538 | tl= swapem(tl); |
516 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); | 539 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); |
517 | md->digest->final(&(ctx->buf[ctx->buf_len]), &(md->md.base[0])); | 540 | EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); |
518 | ctx->buf_len+= md->digest->md_size; | 541 | ctx->buf_len+= md->digest->md_size; |
519 | ctx->blockout= 1; | 542 | ctx->blockout= 1; |
520 | } | 543 | } |
@@ -526,15 +549,15 @@ static void block_in(BIO* b) | |||
526 | long tl= 0; | 549 | long tl= 0; |
527 | unsigned char tmp[EVP_MAX_MD_SIZE]; | 550 | unsigned char tmp[EVP_MAX_MD_SIZE]; |
528 | 551 | ||
529 | ctx=(BIO_OK_CTX *)b->ptr; | 552 | ctx=b->ptr; |
530 | md= &(ctx->md); | 553 | md=&ctx->md; |
531 | 554 | ||
532 | memcpy(&tl, ctx->buf, OK_BLOCK_BLOCK); | 555 | memcpy(&tl, ctx->buf, OK_BLOCK_BLOCK); |
533 | tl= swapem(tl); | 556 | tl= swapem(tl); |
534 | if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return; | 557 | if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return; |
535 | 558 | ||
536 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); | 559 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); |
537 | md->digest->final(tmp, &(md->md.base[0])); | 560 | EVP_DigestFinal_ex(md, tmp, NULL); |
538 | if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0) | 561 | if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0) |
539 | { | 562 | { |
540 | /* there might be parts from next block lurking around ! */ | 563 | /* there might be parts from next block lurking around ! */ |
diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c index f24d3756c9..341a958fd4 100644 --- a/src/lib/libcrypto/evp/c_allc.c +++ b/src/lib/libcrypto/evp/c_allc.c | |||
@@ -64,7 +64,8 @@ | |||
64 | 64 | ||
65 | void OpenSSL_add_all_ciphers(void) | 65 | void OpenSSL_add_all_ciphers(void) |
66 | { | 66 | { |
67 | #ifndef NO_DES | 67 | |
68 | #ifndef OPENSSL_NO_DES | ||
68 | EVP_add_cipher(EVP_des_cfb()); | 69 | EVP_add_cipher(EVP_des_cfb()); |
69 | EVP_add_cipher(EVP_des_ede_cfb()); | 70 | EVP_add_cipher(EVP_des_ede_cfb()); |
70 | EVP_add_cipher(EVP_des_ede3_cfb()); | 71 | EVP_add_cipher(EVP_des_ede3_cfb()); |
@@ -90,12 +91,12 @@ void OpenSSL_add_all_ciphers(void) | |||
90 | EVP_add_cipher(EVP_des_ede3()); | 91 | EVP_add_cipher(EVP_des_ede3()); |
91 | #endif | 92 | #endif |
92 | 93 | ||
93 | #ifndef NO_RC4 | 94 | #ifndef OPENSSL_NO_RC4 |
94 | EVP_add_cipher(EVP_rc4()); | 95 | EVP_add_cipher(EVP_rc4()); |
95 | EVP_add_cipher(EVP_rc4_40()); | 96 | EVP_add_cipher(EVP_rc4_40()); |
96 | #endif | 97 | #endif |
97 | 98 | ||
98 | #ifndef NO_IDEA | 99 | #ifndef OPENSSL_NO_IDEA |
99 | EVP_add_cipher(EVP_idea_ecb()); | 100 | EVP_add_cipher(EVP_idea_ecb()); |
100 | EVP_add_cipher(EVP_idea_cfb()); | 101 | EVP_add_cipher(EVP_idea_cfb()); |
101 | EVP_add_cipher(EVP_idea_ofb()); | 102 | EVP_add_cipher(EVP_idea_ofb()); |
@@ -104,7 +105,7 @@ void OpenSSL_add_all_ciphers(void) | |||
104 | EVP_add_cipher_alias(SN_idea_cbc,"idea"); | 105 | EVP_add_cipher_alias(SN_idea_cbc,"idea"); |
105 | #endif | 106 | #endif |
106 | 107 | ||
107 | #ifndef NO_RC2 | 108 | #ifndef OPENSSL_NO_RC2 |
108 | EVP_add_cipher(EVP_rc2_ecb()); | 109 | EVP_add_cipher(EVP_rc2_ecb()); |
109 | EVP_add_cipher(EVP_rc2_cfb()); | 110 | EVP_add_cipher(EVP_rc2_cfb()); |
110 | EVP_add_cipher(EVP_rc2_ofb()); | 111 | EVP_add_cipher(EVP_rc2_ofb()); |
@@ -115,7 +116,7 @@ void OpenSSL_add_all_ciphers(void) | |||
115 | EVP_add_cipher_alias(SN_rc2_cbc,"rc2"); | 116 | EVP_add_cipher_alias(SN_rc2_cbc,"rc2"); |
116 | #endif | 117 | #endif |
117 | 118 | ||
118 | #ifndef NO_BF | 119 | #ifndef OPENSSL_NO_BF |
119 | EVP_add_cipher(EVP_bf_ecb()); | 120 | EVP_add_cipher(EVP_bf_ecb()); |
120 | EVP_add_cipher(EVP_bf_cfb()); | 121 | EVP_add_cipher(EVP_bf_cfb()); |
121 | EVP_add_cipher(EVP_bf_ofb()); | 122 | EVP_add_cipher(EVP_bf_ofb()); |
@@ -125,7 +126,7 @@ void OpenSSL_add_all_ciphers(void) | |||
125 | EVP_add_cipher_alias(SN_bf_cbc,"blowfish"); | 126 | EVP_add_cipher_alias(SN_bf_cbc,"blowfish"); |
126 | #endif | 127 | #endif |
127 | 128 | ||
128 | #ifndef NO_CAST | 129 | #ifndef OPENSSL_NO_CAST |
129 | EVP_add_cipher(EVP_cast5_ecb()); | 130 | EVP_add_cipher(EVP_cast5_ecb()); |
130 | EVP_add_cipher(EVP_cast5_cfb()); | 131 | EVP_add_cipher(EVP_cast5_cfb()); |
131 | EVP_add_cipher(EVP_cast5_ofb()); | 132 | EVP_add_cipher(EVP_cast5_ofb()); |
@@ -136,7 +137,7 @@ void OpenSSL_add_all_ciphers(void) | |||
136 | EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc"); | 137 | EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc"); |
137 | #endif | 138 | #endif |
138 | 139 | ||
139 | #ifndef NO_RC5 | 140 | #ifndef OPENSSL_NO_RC5 |
140 | EVP_add_cipher(EVP_rc5_32_12_16_ecb()); | 141 | EVP_add_cipher(EVP_rc5_32_12_16_ecb()); |
141 | EVP_add_cipher(EVP_rc5_32_12_16_cfb()); | 142 | EVP_add_cipher(EVP_rc5_32_12_16_cfb()); |
142 | EVP_add_cipher(EVP_rc5_32_12_16_ofb()); | 143 | EVP_add_cipher(EVP_rc5_32_12_16_ofb()); |
@@ -144,6 +145,36 @@ void OpenSSL_add_all_ciphers(void) | |||
144 | EVP_add_cipher_alias(SN_rc5_cbc,"rc5"); | 145 | EVP_add_cipher_alias(SN_rc5_cbc,"rc5"); |
145 | EVP_add_cipher_alias(SN_rc5_cbc,"RC5"); | 146 | EVP_add_cipher_alias(SN_rc5_cbc,"RC5"); |
146 | #endif | 147 | #endif |
148 | |||
149 | #ifndef OPENSSL_NO_AES | ||
150 | EVP_add_cipher(EVP_aes_128_ecb()); | ||
151 | EVP_add_cipher(EVP_aes_128_cbc()); | ||
152 | EVP_add_cipher(EVP_aes_128_cfb()); | ||
153 | EVP_add_cipher(EVP_aes_128_ofb()); | ||
154 | #if 0 | ||
155 | EVP_add_cipher(EVP_aes_128_ctr()); | ||
156 | #endif | ||
157 | EVP_add_cipher_alias(SN_aes_128_cbc,"AES128"); | ||
158 | EVP_add_cipher_alias(SN_aes_128_cbc,"aes128"); | ||
159 | EVP_add_cipher(EVP_aes_192_ecb()); | ||
160 | EVP_add_cipher(EVP_aes_192_cbc()); | ||
161 | EVP_add_cipher(EVP_aes_192_cfb()); | ||
162 | EVP_add_cipher(EVP_aes_192_ofb()); | ||
163 | #if 0 | ||
164 | EVP_add_cipher(EVP_aes_192_ctr()); | ||
165 | #endif | ||
166 | EVP_add_cipher_alias(SN_aes_192_cbc,"AES192"); | ||
167 | EVP_add_cipher_alias(SN_aes_192_cbc,"aes192"); | ||
168 | EVP_add_cipher(EVP_aes_256_ecb()); | ||
169 | EVP_add_cipher(EVP_aes_256_cbc()); | ||
170 | EVP_add_cipher(EVP_aes_256_cfb()); | ||
171 | EVP_add_cipher(EVP_aes_256_ofb()); | ||
172 | #if 0 | ||
173 | EVP_add_cipher(EVP_aes_256_ctr()); | ||
174 | #endif | ||
175 | EVP_add_cipher_alias(SN_aes_256_cbc,"AES256"); | ||
176 | EVP_add_cipher_alias(SN_aes_256_cbc,"aes256"); | ||
177 | #endif | ||
147 | PKCS12_PBE_add(); | 178 | PKCS12_PBE_add(); |
148 | PKCS5_PBE_add(); | 179 | PKCS5_PBE_add(); |
149 | } | 180 | } |
diff --git a/src/lib/libcrypto/evp/c_alld.c b/src/lib/libcrypto/evp/c_alld.c index febe51a3ee..be91cdb037 100644 --- a/src/lib/libcrypto/evp/c_alld.c +++ b/src/lib/libcrypto/evp/c_alld.c | |||
@@ -64,35 +64,38 @@ | |||
64 | 64 | ||
65 | void OpenSSL_add_all_digests(void) | 65 | void OpenSSL_add_all_digests(void) |
66 | { | 66 | { |
67 | #ifndef NO_MD2 | 67 | #ifndef OPENSSL_NO_MD2 |
68 | EVP_add_digest(EVP_md2()); | 68 | EVP_add_digest(EVP_md2()); |
69 | #endif | 69 | #endif |
70 | #ifndef NO_MD5 | 70 | #ifndef OPENSSL_NO_MD4 |
71 | EVP_add_digest(EVP_md4()); | ||
72 | #endif | ||
73 | #ifndef OPENSSL_NO_MD5 | ||
71 | EVP_add_digest(EVP_md5()); | 74 | EVP_add_digest(EVP_md5()); |
72 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); | 75 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); |
73 | EVP_add_digest_alias(SN_md5,"ssl3-md5"); | 76 | EVP_add_digest_alias(SN_md5,"ssl3-md5"); |
74 | #endif | 77 | #endif |
75 | #ifndef NO_SHA | 78 | #ifndef OPENSSL_NO_SHA |
76 | EVP_add_digest(EVP_sha()); | 79 | EVP_add_digest(EVP_sha()); |
77 | #ifndef NO_DSA | 80 | #ifndef OPENSSL_NO_DSA |
78 | EVP_add_digest(EVP_dss()); | 81 | EVP_add_digest(EVP_dss()); |
79 | #endif | 82 | #endif |
80 | #endif | 83 | #endif |
81 | #ifndef NO_SHA | 84 | #ifndef OPENSSL_NO_SHA |
82 | EVP_add_digest(EVP_sha1()); | 85 | EVP_add_digest(EVP_sha1()); |
83 | EVP_add_digest_alias(SN_sha1,"ssl3-sha1"); | 86 | EVP_add_digest_alias(SN_sha1,"ssl3-sha1"); |
84 | EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA); | 87 | EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA); |
85 | #ifndef NO_DSA | 88 | #ifndef OPENSSL_NO_DSA |
86 | EVP_add_digest(EVP_dss1()); | 89 | EVP_add_digest(EVP_dss1()); |
87 | EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2); | 90 | EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2); |
88 | EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1"); | 91 | EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1"); |
89 | EVP_add_digest_alias(SN_dsaWithSHA1,"dss1"); | 92 | EVP_add_digest_alias(SN_dsaWithSHA1,"dss1"); |
90 | #endif | 93 | #endif |
91 | #endif | 94 | #endif |
92 | #if !defined(NO_MDC2) && !defined(NO_DES) | 95 | #if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) |
93 | EVP_add_digest(EVP_mdc2()); | 96 | EVP_add_digest(EVP_mdc2()); |
94 | #endif | 97 | #endif |
95 | #ifndef NO_RIPEMD | 98 | #ifndef OPENSSL_NO_RIPEMD |
96 | EVP_add_digest(EVP_ripemd160()); | 99 | EVP_add_digest(EVP_ripemd160()); |
97 | EVP_add_digest_alias(SN_ripemd160,"ripemd"); | 100 | EVP_add_digest_alias(SN_ripemd160,"ripemd"); |
98 | EVP_add_digest_alias(SN_ripemd160,"rmd160"); | 101 | EVP_add_digest_alias(SN_ripemd160,"rmd160"); |
diff --git a/src/lib/libcrypto/evp/e_dsa.c b/src/lib/libcrypto/evp/e_dsa.c index 6715c3e95e..b96f2738b3 100644 --- a/src/lib/libcrypto/evp/e_dsa.c +++ b/src/lib/libcrypto/evp/e_dsa.c | |||
@@ -58,9 +58,9 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | #include "x509.h" | 63 | #include <openssl/x509.h> |
64 | 64 | ||
65 | static EVP_PKEY_METHOD dss_method= | 65 | static EVP_PKEY_METHOD dss_method= |
66 | { | 66 | { |
diff --git a/src/lib/libcrypto/evp/e_rc5.c b/src/lib/libcrypto/evp/e_rc5.c index 5885f1826b..3c7713b181 100644 --- a/src/lib/libcrypto/evp/e_rc5.c +++ b/src/lib/libcrypto/evp/e_rc5.c | |||
@@ -56,62 +56,69 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_RC5 | 59 | #ifndef OPENSSL_NO_RC5 |
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
65 | #include "evp_locl.h" | 65 | #include "evp_locl.h" |
66 | #include <openssl/rc5.h> | ||
66 | 67 | ||
67 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 68 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
68 | const unsigned char *iv,int enc); | 69 | const unsigned char *iv,int enc); |
69 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | 70 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); |
70 | 71 | ||
71 | IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, rc5.ks, RC5_32, rc5, NID_rc5, | 72 | typedef struct |
72 | 8, EVP_RC5_32_12_16_KEY_SIZE, 8, | 73 | { |
73 | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | 74 | int rounds; /* number of rounds */ |
74 | r_32_12_16_init_key, NULL, | 75 | RC5_32_KEY ks; /* key schedule */ |
75 | NULL, NULL, rc5_ctrl) | 76 | } EVP_RC5_KEY; |
76 | 77 | ||
78 | #define data(ctx) EVP_C_DATA(EVP_RC5_KEY,ctx) | ||
77 | 79 | ||
80 | IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, ks, RC5_32, EVP_RC5_KEY, NID_rc5, | ||
81 | 8, RC5_32_KEY_LENGTH, 8, 64, | ||
82 | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
83 | r_32_12_16_init_key, NULL, | ||
84 | NULL, NULL, rc5_ctrl) | ||
78 | 85 | ||
79 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 86 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) |
80 | { | 87 | { |
81 | switch(type) { | 88 | switch(type) |
82 | 89 | { | |
83 | case EVP_CTRL_INIT: | 90 | case EVP_CTRL_INIT: |
84 | c->c.rc5.rounds = RC5_12_ROUNDS; | 91 | data(c)->rounds = RC5_12_ROUNDS; |
85 | return 1; | 92 | return 1; |
86 | 93 | ||
87 | case EVP_CTRL_GET_RC5_ROUNDS: | 94 | case EVP_CTRL_GET_RC5_ROUNDS: |
88 | *(int *)ptr = c->c.rc5.rounds; | 95 | *(int *)ptr = data(c)->rounds; |
89 | return 1; | 96 | return 1; |
90 | |||
91 | 97 | ||
92 | case EVP_CTRL_SET_RC5_ROUNDS: | 98 | case EVP_CTRL_SET_RC5_ROUNDS: |
93 | switch(arg) { | 99 | switch(arg) |
94 | case RC5_8_ROUNDS: | 100 | { |
95 | case RC5_12_ROUNDS: | 101 | case RC5_8_ROUNDS: |
96 | case RC5_16_ROUNDS: | 102 | case RC5_12_ROUNDS: |
97 | c->c.rc5.rounds = arg; | 103 | case RC5_16_ROUNDS: |
98 | return 1; | 104 | data(c)->rounds = arg; |
105 | return 1; | ||
99 | 106 | ||
100 | default: | 107 | default: |
101 | EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS); | 108 | EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS); |
102 | return 0; | 109 | return 0; |
103 | } | 110 | } |
104 | 111 | ||
105 | default: | 112 | default: |
106 | return -1; | 113 | return -1; |
107 | } | 114 | } |
108 | } | 115 | } |
109 | 116 | ||
110 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 117 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
111 | const unsigned char *iv, int enc) | 118 | const unsigned char *iv, int enc) |
112 | { | 119 | { |
113 | RC5_32_set_key(&(ctx->c.rc5.ks),EVP_CIPHER_CTX_key_length(ctx), | 120 | RC5_32_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx), |
114 | key,ctx->c.rc5.rounds); | 121 | key,data(ctx)->rounds); |
115 | return 1; | 122 | return 1; |
116 | } | 123 | } |
117 | 124 | ||
diff --git a/src/lib/libcrypto/evp/evp_test.c b/src/lib/libcrypto/evp/evp_test.c index 3607fe7776..1bfffb34cf 100644 --- a/src/lib/libcrypto/evp/evp_test.c +++ b/src/lib/libcrypto/evp/evp_test.c | |||
@@ -123,13 +123,15 @@ static unsigned char *ustrsep(char **p,const char *sep) | |||
123 | static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, | 123 | static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, |
124 | const unsigned char *iv,int in, | 124 | const unsigned char *iv,int in, |
125 | const unsigned char *plaintext,int pn, | 125 | const unsigned char *plaintext,int pn, |
126 | const unsigned char *ciphertext,int cn) | 126 | const unsigned char *ciphertext,int cn, |
127 | int encdec) | ||
127 | { | 128 | { |
128 | EVP_CIPHER_CTX ctx; | 129 | EVP_CIPHER_CTX ctx; |
129 | unsigned char out[4096]; | 130 | unsigned char out[4096]; |
130 | int outl,outl2; | 131 | int outl,outl2; |
131 | 132 | ||
132 | printf("Testing cipher %s\n",EVP_CIPHER_name(c)); | 133 | printf("Testing cipher %s%s\n",EVP_CIPHER_name(c), |
134 | (encdec == 1 ? "(encrypt)" : (encdec == 0 ? "(decrypt)" : "(encrypt/decrypt)"))); | ||
133 | hexdump(stdout,"Key",key,kn); | 135 | hexdump(stdout,"Key",key,kn); |
134 | if(in) | 136 | if(in) |
135 | hexdump(stdout,"IV",iv,in); | 137 | hexdump(stdout,"IV",iv,in); |
@@ -143,79 +145,88 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, | |||
143 | exit(5); | 145 | exit(5); |
144 | } | 146 | } |
145 | EVP_CIPHER_CTX_init(&ctx); | 147 | EVP_CIPHER_CTX_init(&ctx); |
146 | if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv)) | 148 | if (encdec != 0) |
147 | { | 149 | { |
148 | fprintf(stderr,"EncryptInit failed\n"); | 150 | if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv)) |
149 | exit(10); | 151 | { |
150 | } | 152 | fprintf(stderr,"EncryptInit failed\n"); |
151 | EVP_CIPHER_CTX_set_padding(&ctx,0); | 153 | exit(10); |
154 | } | ||
155 | EVP_CIPHER_CTX_set_padding(&ctx,0); | ||
152 | 156 | ||
153 | if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn)) | 157 | if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn)) |
154 | { | 158 | { |
155 | fprintf(stderr,"Encrypt failed\n"); | 159 | fprintf(stderr,"Encrypt failed\n"); |
156 | exit(6); | 160 | exit(6); |
157 | } | 161 | } |
158 | if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2)) | 162 | if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2)) |
159 | { | 163 | { |
160 | fprintf(stderr,"EncryptFinal failed\n"); | 164 | fprintf(stderr,"EncryptFinal failed\n"); |
161 | exit(7); | 165 | exit(7); |
162 | } | 166 | } |
163 | 167 | ||
164 | if(outl+outl2 != cn) | 168 | if(outl+outl2 != cn) |
165 | { | 169 | { |
166 | fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n", | 170 | fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n", |
167 | outl+outl2,cn); | 171 | outl+outl2,cn); |
168 | exit(8); | 172 | exit(8); |
169 | } | 173 | } |
170 | 174 | ||
171 | if(memcmp(out,ciphertext,cn)) | 175 | if(memcmp(out,ciphertext,cn)) |
172 | { | 176 | { |
173 | fprintf(stderr,"Ciphertext mismatch\n"); | 177 | fprintf(stderr,"Ciphertext mismatch\n"); |
174 | hexdump(stderr,"Got",out,cn); | 178 | hexdump(stderr,"Got",out,cn); |
175 | hexdump(stderr,"Expected",ciphertext,cn); | 179 | hexdump(stderr,"Expected",ciphertext,cn); |
176 | exit(9); | 180 | exit(9); |
181 | } | ||
177 | } | 182 | } |
178 | 183 | ||
179 | if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv)) | 184 | if (encdec <= 0) |
180 | { | 185 | { |
181 | fprintf(stderr,"DecryptInit failed\n"); | 186 | if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv)) |
182 | exit(11); | 187 | { |
183 | } | 188 | fprintf(stderr,"DecryptInit failed\n"); |
184 | EVP_CIPHER_CTX_set_padding(&ctx,0); | 189 | exit(11); |
190 | } | ||
191 | EVP_CIPHER_CTX_set_padding(&ctx,0); | ||
185 | 192 | ||
186 | if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,pn)) | 193 | if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn)) |
187 | { | 194 | { |
188 | fprintf(stderr,"Decrypt failed\n"); | 195 | fprintf(stderr,"Decrypt failed\n"); |
189 | exit(6); | 196 | exit(6); |
190 | } | 197 | } |
191 | if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2)) | 198 | if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2)) |
192 | { | 199 | { |
193 | fprintf(stderr,"DecryptFinal failed\n"); | 200 | fprintf(stderr,"DecryptFinal failed\n"); |
194 | exit(7); | 201 | exit(7); |
195 | } | 202 | } |
196 | 203 | ||
197 | if(outl+outl2 != cn) | 204 | if(outl+outl2 != cn) |
198 | { | 205 | { |
199 | fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", | 206 | fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", |
200 | outl+outl2,cn); | 207 | outl+outl2,cn); |
201 | exit(8); | 208 | exit(8); |
202 | } | 209 | } |
203 | 210 | ||
204 | if(memcmp(out,plaintext,cn)) | 211 | if(memcmp(out,plaintext,cn)) |
205 | { | 212 | { |
206 | fprintf(stderr,"Plaintext mismatch\n"); | 213 | fprintf(stderr,"Plaintext mismatch\n"); |
207 | hexdump(stderr,"Got",out,cn); | 214 | hexdump(stderr,"Got",out,cn); |
208 | hexdump(stderr,"Expected",plaintext,cn); | 215 | hexdump(stderr,"Expected",plaintext,cn); |
209 | exit(9); | 216 | exit(9); |
217 | } | ||
210 | } | 218 | } |
211 | 219 | ||
220 | EVP_CIPHER_CTX_cleanup(&ctx); | ||
221 | |||
212 | printf("\n"); | 222 | printf("\n"); |
213 | } | 223 | } |
214 | 224 | ||
215 | static int test_cipher(const char *cipher,const unsigned char *key,int kn, | 225 | static int test_cipher(const char *cipher,const unsigned char *key,int kn, |
216 | const unsigned char *iv,int in, | 226 | const unsigned char *iv,int in, |
217 | const unsigned char *plaintext,int pn, | 227 | const unsigned char *plaintext,int pn, |
218 | const unsigned char *ciphertext,int cn) | 228 | const unsigned char *ciphertext,int cn, |
229 | int encdec) | ||
219 | { | 230 | { |
220 | const EVP_CIPHER *c; | 231 | const EVP_CIPHER *c; |
221 | 232 | ||
@@ -223,7 +234,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn, | |||
223 | if(!c) | 234 | if(!c) |
224 | return 0; | 235 | return 0; |
225 | 236 | ||
226 | test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn); | 237 | test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec); |
227 | 238 | ||
228 | return 1; | 239 | return 1; |
229 | } | 240 | } |
@@ -279,6 +290,8 @@ static int test_digest(const char *digest, | |||
279 | 290 | ||
280 | printf("\n"); | 291 | printf("\n"); |
281 | 292 | ||
293 | EVP_MD_CTX_cleanup(&ctx); | ||
294 | |||
282 | return 1; | 295 | return 1; |
283 | } | 296 | } |
284 | 297 | ||
@@ -328,6 +341,7 @@ int main(int argc,char **argv) | |||
328 | char *p; | 341 | char *p; |
329 | char *cipher; | 342 | char *cipher; |
330 | unsigned char *iv,*key,*plaintext,*ciphertext; | 343 | unsigned char *iv,*key,*plaintext,*ciphertext; |
344 | int encdec; | ||
331 | int kn,in,pn,cn; | 345 | int kn,in,pn,cn; |
332 | 346 | ||
333 | if(!fgets((char *)line,sizeof line,f)) | 347 | if(!fgets((char *)line,sizeof line,f)) |
@@ -339,14 +353,21 @@ int main(int argc,char **argv) | |||
339 | key=ustrsep(&p,":"); | 353 | key=ustrsep(&p,":"); |
340 | iv=ustrsep(&p,":"); | 354 | iv=ustrsep(&p,":"); |
341 | plaintext=ustrsep(&p,":"); | 355 | plaintext=ustrsep(&p,":"); |
342 | ciphertext=ustrsep(&p,"\n"); | 356 | ciphertext=ustrsep(&p,":"); |
357 | if (p[-1] == '\n') { | ||
358 | p[-1] = '\0'; | ||
359 | encdec = -1; | ||
360 | } else { | ||
361 | encdec = atoi(strsep(&p,"\n")); | ||
362 | } | ||
363 | |||
343 | 364 | ||
344 | kn=convert(key); | 365 | kn=convert(key); |
345 | in=convert(iv); | 366 | in=convert(iv); |
346 | pn=convert(plaintext); | 367 | pn=convert(plaintext); |
347 | cn=convert(ciphertext); | 368 | cn=convert(ciphertext); |
348 | 369 | ||
349 | if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn) | 370 | if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec) |
350 | && !test_digest(cipher,plaintext,pn,ciphertext,cn)) | 371 | && !test_digest(cipher,plaintext,pn,ciphertext,cn)) |
351 | { | 372 | { |
352 | fprintf(stderr,"Can't find %s\n",cipher); | 373 | fprintf(stderr,"Can't find %s\n",cipher); |
diff --git a/src/lib/libcrypto/evp/evptests.txt b/src/lib/libcrypto/evp/evptests.txt index 6c1529db37..80bd9c7765 100644 --- a/src/lib/libcrypto/evp/evptests.txt +++ b/src/lib/libcrypto/evp/evptests.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | #cipher:key:iv:input:output | 1 | #cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt) |
2 | #digest:::input:output | 2 | #digest:::input:output |
3 | 3 | ||
4 | # SHA(1) tests (from shatest.c) | 4 | # SHA(1) tests (from shatest.c) |
@@ -15,47 +15,148 @@ MD5:::31323334353637383930313233343536373839303132333435363738393031323334353637 | |||
15 | 15 | ||
16 | # AES 128 ECB tests (from FIPS-197 test vectors, encrypt) | 16 | # AES 128 ECB tests (from FIPS-197 test vectors, encrypt) |
17 | 17 | ||
18 | AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A | 18 | AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1 |
19 | 19 | ||
20 | # AES 192 ECB tests (from FIPS-197 test vectors, encrypt) | 20 | # AES 192 ECB tests (from FIPS-197 test vectors, encrypt) |
21 | 21 | ||
22 | AES-192-ECB:000102030405060708090A0B0C0D0E0F1011121314151617::00112233445566778899AABBCCDDEEFF:DDA97CA4864CDFE06EAF70A0EC0D7191 | 22 | AES-192-ECB:000102030405060708090A0B0C0D0E0F1011121314151617::00112233445566778899AABBCCDDEEFF:DDA97CA4864CDFE06EAF70A0EC0D7191:1 |
23 | 23 | ||
24 | # AES 256 ECB tests (from FIPS-197 test vectors, encrypt) | 24 | # AES 256 ECB tests (from FIPS-197 test vectors, encrypt) |
25 | 25 | ||
26 | AES-256-ECB:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F::00112233445566778899AABBCCDDEEFF:8EA2B7CA516745BFEAFC49904B496089 | 26 | AES-256-ECB:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F::00112233445566778899AABBCCDDEEFF:8EA2B7CA516745BFEAFC49904B496089:1 |
27 | 27 | ||
28 | # AES 128 ECB tests (from NIST test vectors, encrypt) | 28 | # AES 128 ECB tests (from NIST test vectors, encrypt) |
29 | 29 | ||
30 | #AES-128-ECB:00000000000000000000000000000000::00000000000000000000000000000000:C34C052CC0DA8D73451AFE5F03BE297F | 30 | #AES-128-ECB:00000000000000000000000000000000::00000000000000000000000000000000:C34C052CC0DA8D73451AFE5F03BE297F:1 |
31 | 31 | ||
32 | # AES 128 ECB tests (from NIST test vectors, decrypt) | 32 | # AES 128 ECB tests (from NIST test vectors, decrypt) |
33 | 33 | ||
34 | #AES-128-ECB:00000000000000000000000000000000::44416AC2D1F53C583303917E6BE9EBE0:00000000000000000000000000000000 | 34 | #AES-128-ECB:00000000000000000000000000000000::44416AC2D1F53C583303917E6BE9EBE0:00000000000000000000000000000000:0 |
35 | 35 | ||
36 | # AES 192 ECB tests (from NIST test vectors, decrypt) | 36 | # AES 192 ECB tests (from NIST test vectors, decrypt) |
37 | 37 | ||
38 | #AES-192-ECB:000000000000000000000000000000000000000000000000::48E31E9E256718F29229319C19F15BA4:00000000000000000000000000000000 | 38 | #AES-192-ECB:000000000000000000000000000000000000000000000000::48E31E9E256718F29229319C19F15BA4:00000000000000000000000000000000:0 |
39 | 39 | ||
40 | # AES 256 ECB tests (from NIST test vectors, decrypt) | 40 | # AES 256 ECB tests (from NIST test vectors, decrypt) |
41 | 41 | ||
42 | #AES-256-ECB:0000000000000000000000000000000000000000000000000000000000000000::058CCFFDBBCB382D1F6F56585D8A4ADE:00000000000000000000000000000000 | 42 | #AES-256-ECB:0000000000000000000000000000000000000000000000000000000000000000::058CCFFDBBCB382D1F6F56585D8A4ADE:00000000000000000000000000000000:0 |
43 | 43 | ||
44 | # AES 128 CBC tests (from NIST test vectors, encrypt) | 44 | # AES 128 CBC tests (from NIST test vectors, encrypt) |
45 | 45 | ||
46 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:8A05FC5E095AF4848A08D328D3688E3D | 46 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:8A05FC5E095AF4848A08D328D3688E3D:1 |
47 | 47 | ||
48 | # AES 192 CBC tests (from NIST test vectors, encrypt) | 48 | # AES 192 CBC tests (from NIST test vectors, encrypt) |
49 | 49 | ||
50 | #AES-192-CBC:000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:7BD966D53AD8C1BB85D2ADFAE87BB104 | 50 | #AES-192-CBC:000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:7BD966D53AD8C1BB85D2ADFAE87BB104:1 |
51 | 51 | ||
52 | # AES 256 CBC tests (from NIST test vectors, encrypt) | 52 | # AES 256 CBC tests (from NIST test vectors, encrypt) |
53 | 53 | ||
54 | #AES-256-CBC:0000000000000000000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:FE3C53653E2F45B56FCD88B2CC898FF0 | 54 | #AES-256-CBC:0000000000000000000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:FE3C53653E2F45B56FCD88B2CC898FF0:1 |
55 | 55 | ||
56 | # AES 128 CBC tests (from NIST test vectors, decrypt) | 56 | # AES 128 CBC tests (from NIST test vectors, decrypt) |
57 | 57 | ||
58 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:FACA37E0B0C85373DF706E73F7C9AF86:00000000000000000000000000000000 | 58 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:FACA37E0B0C85373DF706E73F7C9AF86:00000000000000000000000000000000:0 |
59 | |||
60 | # AES tests from NIST document SP800-38A | ||
61 | # For all ECB encrypts and decrypts, the transformed sequence is | ||
62 | # AES-bits-ECB:key::plaintext:ciphertext:encdec | ||
63 | # ECB-AES128.Encrypt and ECB-AES128.Decrypt | ||
64 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::6BC1BEE22E409F96E93D7E117393172A:3AD77BB40D7A3660A89ECAF32466EF97 | ||
65 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::AE2D8A571E03AC9C9EB76FAC45AF8E51:F5D3D58503B9699DE785895A96FDBAAF | ||
66 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::30C81C46A35CE411E5FBC1191A0A52EF:43B1CD7F598ECE23881B00E3ED030688 | ||
67 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::F69F2445DF4F9B17AD2B417BE66C3710:7B0C785E27E8AD3F8223207104725DD4 | ||
68 | # ECB-AES192.Encrypt and ECB-AES192.Decrypt | ||
69 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::6BC1BEE22E409F96E93D7E117393172A:BD334F1D6E45F25FF712A214571FA5CC | ||
70 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::AE2D8A571E03AC9C9EB76FAC45AF8E51:974104846D0AD3AD7734ECB3ECEE4EEF | ||
71 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::30C81C46A35CE411E5FBC1191A0A52EF:EF7AFD2270E2E60ADCE0BA2FACE6444E | ||
72 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::F69F2445DF4F9B17AD2B417BE66C3710:9A4B41BA738D6C72FB16691603C18E0E | ||
73 | # ECB-AES256.Encrypt and ECB-AES256.Decrypt | ||
74 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::6BC1BEE22E409F96E93D7E117393172A:F3EED1BDB5D2A03C064B5A7E3DB181F8 | ||
75 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::AE2D8A571E03AC9C9EB76FAC45AF8E51:591CCB10D410ED26DC5BA74A31362870 | ||
76 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::30C81C46A35CE411E5FBC1191A0A52EF:B6ED21B99CA6F4F9F153E7B1BEAFED1D | ||
77 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::F69F2445DF4F9B17AD2B417BE66C3710:23304B7A39F9F3FF067D8D8F9E24ECC7 | ||
78 | # For all CBC encrypts and decrypts, the transformed sequence is | ||
79 | # AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec | ||
80 | # CBC-AES128.Encrypt and CBC-AES128.Decrypt | ||
81 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:7649ABAC8119B246CEE98E9B12E9197D | ||
82 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:7649ABAC8119B246CEE98E9B12E9197D:AE2D8A571E03AC9C9EB76FAC45AF8E51:5086CB9B507219EE95DB113A917678B2 | ||
83 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:5086CB9B507219EE95DB113A917678B2:30C81C46A35CE411E5FBC1191A0A52EF:73BED6B8E3C1743B7116E69E22229516 | ||
84 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:73BED6B8E3C1743B7116E69E22229516:F69F2445DF4F9B17AD2B417BE66C3710:3FF1CAA1681FAC09120ECA307586E1A7 | ||
85 | # CBC-AES192.Encrypt and CBC-AES192.Decrypt | ||
86 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:4F021DB243BC633D7178183A9FA071E8 | ||
87 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:4F021DB243BC633D7178183A9FA071E8:AE2D8A571E03AC9C9EB76FAC45AF8E51:B4D9ADA9AD7DEDF4E5E738763F69145A | ||
88 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:B4D9ADA9AD7DEDF4E5E738763F69145A:30C81C46A35CE411E5FBC1191A0A52EF:571B242012FB7AE07FA9BAAC3DF102E0 | ||
89 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:571B242012FB7AE07FA9BAAC3DF102E0:F69F2445DF4F9B17AD2B417BE66C3710:08B0E27988598881D920A9E64F5615CD | ||
90 | # CBC-AES256.Encrypt and CBC-AES256.Decrypt | ||
91 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:F58C4C04D6E5F1BA779EABFB5F7BFBD6 | ||
92 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D | ||
93 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 | ||
94 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B | ||
95 | # We don't support CFB{1,8}-AESxxx.{En,De}crypt | ||
96 | # For all CFB128 encrypts and decrypts, the transformed sequence is | ||
97 | # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec | ||
98 | # CFB128-AES128.Encrypt | ||
99 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:1 | ||
100 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:3B3FD92EB72DAD20333449F8E83CFB4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:C8A64537A0B3A93FCDE3CDAD9F1CE58B:1 | ||
101 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:C8A64537A0B3A93FCDE3CDAD9F1CE58B:30C81C46A35CE411E5FBC1191A0A52EF:26751F67A3CBB140B1808CF187A4F4DF:1 | ||
102 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:26751F67A3CBB140B1808CF187A4F4DF:F69F2445DF4F9B17AD2B417BE66C3710:C04B05357C5D1C0EEAC4C66F9FF7F2E6:1 | ||
103 | # CFB128-AES128.Decrypt | ||
104 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:0 | ||
105 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:3B3FD92EB72DAD20333449F8E83CFB4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:C8A64537A0B3A93FCDE3CDAD9F1CE58B:0 | ||
106 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:C8A64537A0B3A93FCDE3CDAD9F1CE58B:30C81C46A35CE411E5FBC1191A0A52EF:26751F67A3CBB140B1808CF187A4F4DF:0 | ||
107 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:26751F67A3CBB140B1808CF187A4F4DF:F69F2445DF4F9B17AD2B417BE66C3710:C04B05357C5D1C0EEAC4C66F9FF7F2E6:0 | ||
108 | # CFB128-AES192.Encrypt | ||
109 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:1 | ||
110 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:CDC80D6FDDF18CAB34C25909C99A4174:AE2D8A571E03AC9C9EB76FAC45AF8E51:67CE7F7F81173621961A2B70171D3D7A:1 | ||
111 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:67CE7F7F81173621961A2B70171D3D7A:30C81C46A35CE411E5FBC1191A0A52EF:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:1 | ||
112 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:F69F2445DF4F9B17AD2B417BE66C3710:C05F9F9CA9834FA042AE8FBA584B09FF:1 | ||
113 | # CFB128-AES192.Decrypt | ||
114 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:0 | ||
115 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:CDC80D6FDDF18CAB34C25909C99A4174:AE2D8A571E03AC9C9EB76FAC45AF8E51:67CE7F7F81173621961A2B70171D3D7A:0 | ||
116 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:67CE7F7F81173621961A2B70171D3D7A:30C81C46A35CE411E5FBC1191A0A52EF:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:0 | ||
117 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:F69F2445DF4F9B17AD2B417BE66C3710:C05F9F9CA9834FA042AE8FBA584B09FF:0 | ||
118 | # CFB128-AES256.Encrypt | ||
119 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:1 | ||
120 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DC7E84BFDA79164B7ECD8486985D3860:AE2D8A571E03AC9C9EB76FAC45AF8E51:39FFED143B28B1C832113C6331E5407B:1 | ||
121 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39FFED143B28B1C832113C6331E5407B:30C81C46A35CE411E5FBC1191A0A52EF:DF10132415E54B92A13ED0A8267AE2F9:1 | ||
122 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DF10132415E54B92A13ED0A8267AE2F9:F69F2445DF4F9B17AD2B417BE66C3710:75A385741AB9CEF82031623D55B1E471:1 | ||
123 | # CFB128-AES256.Decrypt | ||
124 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:0 | ||
125 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DC7E84BFDA79164B7ECD8486985D3860:AE2D8A571E03AC9C9EB76FAC45AF8E51:39FFED143B28B1C832113C6331E5407B:0 | ||
126 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39FFED143B28B1C832113C6331E5407B:30C81C46A35CE411E5FBC1191A0A52EF:DF10132415E54B92A13ED0A8267AE2F9:0 | ||
127 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DF10132415E54B92A13ED0A8267AE2F9:F69F2445DF4F9B17AD2B417BE66C3710:75A385741AB9CEF82031623D55B1E471:0 | ||
128 | # For all OFB encrypts and decrypts, the transformed sequence is | ||
129 | # AES-bits-CFB:key:IV/output':plaintext:ciphertext:encdec | ||
130 | # OFB-AES128.Encrypt | ||
131 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:1 | ||
132 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:50FE67CC996D32B6DA0937E99BAFEC60:AE2D8A571E03AC9C9EB76FAC45AF8E51:7789508D16918F03F53C52DAC54ED825:1 | ||
133 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:D9A4DADA0892239F6B8B3D7680E15674:30C81C46A35CE411E5FBC1191A0A52EF:9740051E9C5FECF64344F7A82260EDCC:1 | ||
134 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:A78819583F0308E7A6BF36B1386ABF23:F69F2445DF4F9B17AD2B417BE66C3710:304C6528F659C77866A510D9C1D6AE5E:1 | ||
135 | # OFB-AES128.Decrypt | ||
136 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:0 | ||
137 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:50FE67CC996D32B6DA0937E99BAFEC60:AE2D8A571E03AC9C9EB76FAC45AF8E51:7789508D16918F03F53C52DAC54ED825:0 | ||
138 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:D9A4DADA0892239F6B8B3D7680E15674:30C81C46A35CE411E5FBC1191A0A52EF:9740051E9C5FECF64344F7A82260EDCC:0 | ||
139 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:A78819583F0308E7A6BF36B1386ABF23:F69F2445DF4F9B17AD2B417BE66C3710:304C6528F659C77866A510D9C1D6AE5E:0 | ||
140 | # OFB-AES192.Encrypt | ||
141 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:1 | ||
142 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:A609B38DF3B1133DDDFF2718BA09565E:AE2D8A571E03AC9C9EB76FAC45AF8E51:FCC28B8D4C63837C09E81700C1100401:1 | ||
143 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:52EF01DA52602FE0975F78AC84BF8A50:30C81C46A35CE411E5FBC1191A0A52EF:8D9A9AEAC0F6596F559C6D4DAF59A5F2:1 | ||
144 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:BD5286AC63AABD7EB067AC54B553F71D:F69F2445DF4F9B17AD2B417BE66C3710:6D9F200857CA6C3E9CAC524BD9ACC92A:1 | ||
145 | # OFB-AES192.Decrypt | ||
146 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:0 | ||
147 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:A609B38DF3B1133DDDFF2718BA09565E:AE2D8A571E03AC9C9EB76FAC45AF8E51:FCC28B8D4C63837C09E81700C1100401:0 | ||
148 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:52EF01DA52602FE0975F78AC84BF8A50:30C81C46A35CE411E5FBC1191A0A52EF:8D9A9AEAC0F6596F559C6D4DAF59A5F2:0 | ||
149 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:BD5286AC63AABD7EB067AC54B553F71D:F69F2445DF4F9B17AD2B417BE66C3710:6D9F200857CA6C3E9CAC524BD9ACC92A:0 | ||
150 | # OFB-AES256.Encrypt | ||
151 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:1 | ||
152 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:B7BF3A5DF43989DD97F0FA97EBCE2F4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:4FEBDC6740D20B3AC88F6AD82A4FB08D:1 | ||
153 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:1 | ||
154 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:1 | ||
155 | # OFB-AES256.Decrypt | ||
156 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:0 | ||
157 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:B7BF3A5DF43989DD97F0FA97EBCE2F4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:4FEBDC6740D20B3AC88F6AD82A4FB08D:0 | ||
158 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:0 | ||
159 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:0 | ||
59 | 160 | ||
60 | # DES ECB tests (from destest) | 161 | # DES ECB tests (from destest) |
61 | 162 | ||
diff --git a/src/lib/libcrypto/evp/m_md2.c b/src/lib/libcrypto/evp/m_md2.c index 2209416142..50914c83b3 100644 --- a/src/lib/libcrypto/evp/m_md2.c +++ b/src/lib/libcrypto/evp/m_md2.c | |||
@@ -56,27 +56,41 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef OPENSSL_NO_MD2 | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
61 | #include "evp.h" | 62 | #include <openssl/evp.h> |
62 | #include "objects.h" | 63 | #include <openssl/objects.h> |
63 | #include "x509.h" | 64 | #include <openssl/x509.h> |
65 | #include <openssl/md2.h> | ||
64 | 66 | ||
65 | static EVP_MD md2_md= | 67 | static int init(EVP_MD_CTX *ctx) |
68 | { return MD2_Init(ctx->md_data); } | ||
69 | |||
70 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
71 | { return MD2_Update(ctx->md_data,data,count); } | ||
72 | |||
73 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
74 | { return MD2_Final(md,ctx->md_data); } | ||
75 | |||
76 | static const EVP_MD md2_md= | ||
66 | { | 77 | { |
67 | NID_md2, | 78 | NID_md2, |
68 | NID_md2WithRSAEncryption, | 79 | NID_md2WithRSAEncryption, |
69 | MD2_DIGEST_LENGTH, | 80 | MD2_DIGEST_LENGTH, |
70 | MD2_Init, | 81 | 0, |
71 | MD2_Update, | 82 | init, |
72 | MD2_Final, | 83 | update, |
84 | final, | ||
85 | NULL, | ||
86 | NULL, | ||
73 | EVP_PKEY_RSA_method, | 87 | EVP_PKEY_RSA_method, |
74 | MD2_BLOCK, | 88 | MD2_BLOCK, |
75 | sizeof(EVP_MD *)+sizeof(MD2_CTX), | 89 | sizeof(EVP_MD *)+sizeof(MD2_CTX), |
76 | }; | 90 | }; |
77 | 91 | ||
78 | EVP_MD *EVP_md2() | 92 | const EVP_MD *EVP_md2(void) |
79 | { | 93 | { |
80 | return(&md2_md); | 94 | return(&md2_md); |
81 | } | 95 | } |
82 | 96 | #endif | |
diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c index 64a853eb7f..9f6467c931 100644 --- a/src/lib/libcrypto/evp/m_mdc2.c +++ b/src/lib/libcrypto/evp/m_mdc2.c | |||
@@ -56,26 +56,41 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef OPENSSL_NO_MDC2 | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
61 | #include "evp.h" | 62 | #include <openssl/evp.h> |
62 | #include "objects.h" | 63 | #include <openssl/objects.h> |
63 | #include "x509.h" | 64 | #include <openssl/x509.h> |
65 | #include <openssl/mdc2.h> | ||
64 | 66 | ||
65 | static EVP_MD mdc2_md= | 67 | static int init(EVP_MD_CTX *ctx) |
68 | { return MDC2_Init(ctx->md_data); } | ||
69 | |||
70 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
71 | { return MDC2_Update(ctx->md_data,data,count); } | ||
72 | |||
73 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
74 | { return MDC2_Final(md,ctx->md_data); } | ||
75 | |||
76 | static const EVP_MD mdc2_md= | ||
66 | { | 77 | { |
67 | NID_mdc2, | 78 | NID_mdc2, |
68 | NID_mdc2WithRSA, | 79 | NID_mdc2WithRSA, |
69 | MDC2_DIGEST_LENGTH, | 80 | MDC2_DIGEST_LENGTH, |
70 | MDC2_Init, | 81 | 0, |
71 | MDC2_Update, | 82 | init, |
72 | MDC2_Final, | 83 | update, |
84 | final, | ||
85 | NULL, | ||
86 | NULL, | ||
73 | EVP_PKEY_RSA_ASN1_OCTET_STRING_method, | 87 | EVP_PKEY_RSA_ASN1_OCTET_STRING_method, |
74 | MDC2_BLOCK, | 88 | MDC2_BLOCK, |
75 | sizeof(EVP_MD *)+sizeof(MDC2_CTX), | 89 | sizeof(EVP_MD *)+sizeof(MDC2_CTX), |
76 | }; | 90 | }; |
77 | 91 | ||
78 | EVP_MD *EVP_mdc2() | 92 | const EVP_MD *EVP_mdc2(void) |
79 | { | 93 | { |
80 | return(&mdc2_md); | 94 | return(&mdc2_md); |
81 | } | 95 | } |
96 | #endif | ||
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c index af4e434a22..10697c7ed3 100644 --- a/src/lib/libcrypto/evp/m_sha.c +++ b/src/lib/libcrypto/evp/m_sha.c | |||
@@ -56,27 +56,40 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef OPENSSL_NO_SHA | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
61 | #include "evp.h" | 62 | #include <openssl/evp.h> |
62 | #include "objects.h" | 63 | #include <openssl/objects.h> |
63 | #include "x509.h" | 64 | #include <openssl/x509.h> |
64 | 65 | ||
65 | static EVP_MD sha_md= | 66 | static int init(EVP_MD_CTX *ctx) |
67 | { return SHA_Init(ctx->md_data); } | ||
68 | |||
69 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
70 | { return SHA_Update(ctx->md_data,data,count); } | ||
71 | |||
72 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
73 | { return SHA_Final(md,ctx->md_data); } | ||
74 | |||
75 | static const EVP_MD sha_md= | ||
66 | { | 76 | { |
67 | NID_sha, | 77 | NID_sha, |
68 | NID_shaWithRSAEncryption, | 78 | NID_shaWithRSAEncryption, |
69 | SHA_DIGEST_LENGTH, | 79 | SHA_DIGEST_LENGTH, |
70 | SHA_Init, | 80 | 0, |
71 | SHA_Update, | 81 | init, |
72 | SHA_Final, | 82 | update, |
83 | final, | ||
84 | NULL, | ||
85 | NULL, | ||
73 | EVP_PKEY_RSA_method, | 86 | EVP_PKEY_RSA_method, |
74 | SHA_CBLOCK, | 87 | SHA_CBLOCK, |
75 | sizeof(EVP_MD *)+sizeof(SHA_CTX), | 88 | sizeof(EVP_MD *)+sizeof(SHA_CTX), |
76 | }; | 89 | }; |
77 | 90 | ||
78 | EVP_MD *EVP_sha() | 91 | const EVP_MD *EVP_sha(void) |
79 | { | 92 | { |
80 | return(&sha_md); | 93 | return(&sha_md); |
81 | } | 94 | } |
82 | 95 | #endif | |
diff --git a/src/lib/libcrypto/hmac/hmactest.c b/src/lib/libcrypto/hmac/hmactest.c index 5938e375dc..96d3beb8e6 100644 --- a/src/lib/libcrypto/hmac/hmactest.c +++ b/src/lib/libcrypto/hmac/hmactest.c | |||
@@ -59,9 +59,22 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "hmac.h" | ||
63 | 62 | ||
64 | struct test_st | 63 | #ifdef OPENSSL_NO_HMAC |
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No HMAC support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/hmac.h> | ||
71 | #include <openssl/md5.h> | ||
72 | |||
73 | #ifdef CHARSET_EBCDIC | ||
74 | #include <openssl/ebcdic.h> | ||
75 | #endif | ||
76 | |||
77 | static struct test_st | ||
65 | { | 78 | { |
66 | unsigned char key[16]; | 79 | unsigned char key[16]; |
67 | int key_len; | 80 | int key_len; |
@@ -102,19 +115,19 @@ struct test_st | |||
102 | }; | 115 | }; |
103 | 116 | ||
104 | 117 | ||
105 | #ifndef NOPROTO | ||
106 | static char *pt(unsigned char *md); | 118 | static char *pt(unsigned char *md); |
107 | #else | 119 | int main(int argc, char *argv[]) |
108 | static char *pt(); | ||
109 | #endif | ||
110 | |||
111 | int main(argc,argv) | ||
112 | int argc; | ||
113 | char *argv[]; | ||
114 | { | 120 | { |
115 | int i,err=0; | 121 | int i,err=0; |
116 | char *p; | 122 | char *p; |
117 | 123 | ||
124 | #ifdef CHARSET_EBCDIC | ||
125 | ebcdic2ascii(test[0].data, test[0].data, test[0].data_len); | ||
126 | ebcdic2ascii(test[1].data, test[1].data, test[1].data_len); | ||
127 | ebcdic2ascii(test[2].key, test[2].key, test[2].key_len); | ||
128 | ebcdic2ascii(test[2].data, test[2].data, test[2].data_len); | ||
129 | #endif | ||
130 | |||
118 | for (i=0; i<4; i++) | 131 | for (i=0; i<4; i++) |
119 | { | 132 | { |
120 | p=pt(HMAC(EVP_md5(), | 133 | p=pt(HMAC(EVP_md5(), |
@@ -135,8 +148,7 @@ char *argv[]; | |||
135 | return(0); | 148 | return(0); |
136 | } | 149 | } |
137 | 150 | ||
138 | static char *pt(md) | 151 | static char *pt(unsigned char *md) |
139 | unsigned char *md; | ||
140 | { | 152 | { |
141 | int i; | 153 | int i; |
142 | static char buf[80]; | 154 | static char buf[80]; |
@@ -145,3 +157,4 @@ unsigned char *md; | |||
145 | sprintf(&(buf[i*2]),"%02x",md[i]); | 157 | sprintf(&(buf[i*2]),"%02x",md[i]); |
146 | return(buf); | 158 | return(buf); |
147 | } | 159 | } |
160 | #endif | ||
diff --git a/src/lib/libcrypto/install.com b/src/lib/libcrypto/install.com index b75d1b44b2..b3d155e964 100644 --- a/src/lib/libcrypto/install.com +++ b/src/lib/libcrypto/install.com | |||
@@ -32,20 +32,22 @@ $ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN - | |||
32 | $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - | 32 | $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - |
33 | CREATE/DIR/LOG WRK_SSLINCLUDE: | 33 | CREATE/DIR/LOG WRK_SSLINCLUDE: |
34 | $ | 34 | $ |
35 | $ SDIRS := ,MD2,MD5,SHA,MDC2,HMAC,RIPEMD,- | 35 | $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- |
36 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- | 36 | DES,RC2,RC4,RC5,IDEA,BF,CAST,- |
37 | BN,RSA,DSA,DH,- | 37 | BN,EC,RSA,DSA,DH,DSO,ENGINE,AES,- |
38 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- | 38 | BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- |
39 | EVP,ASN1,PEM,X509,X509V3,- | 39 | EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,- |
40 | CONF,TXT_DB,PKCS7,PKCS12,COMP | 40 | UI,KRB5 |
41 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h | 41 | $ EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,- |
42 | symhacks.h,ossl_typ.h | ||
42 | $ EXHEADER_MD2 := md2.h | 43 | $ EXHEADER_MD2 := md2.h |
44 | $ EXHEADER_MD4 := md4.h | ||
43 | $ EXHEADER_MD5 := md5.h | 45 | $ EXHEADER_MD5 := md5.h |
44 | $ EXHEADER_SHA := sha.h | 46 | $ EXHEADER_SHA := sha.h |
45 | $ EXHEADER_MDC2 := mdc2.h | 47 | $ EXHEADER_MDC2 := mdc2.h |
46 | $ EXHEADER_HMAC := hmac.h | 48 | $ EXHEADER_HMAC := hmac.h |
47 | $ EXHEADER_RIPEMD := ripemd.h | 49 | $ EXHEADER_RIPEMD := ripemd.h |
48 | $ EXHEADER_DES := des.h | 50 | $ EXHEADER_DES := des.h,des_old.h |
49 | $ EXHEADER_RC2 := rc2.h | 51 | $ EXHEADER_RC2 := rc2.h |
50 | $ EXHEADER_RC4 := rc4.h | 52 | $ EXHEADER_RC4 := rc4.h |
51 | $ EXHEADER_RC5 := rc5.h | 53 | $ EXHEADER_RC5 := rc5.h |
@@ -53,26 +55,33 @@ $ EXHEADER_IDEA := idea.h | |||
53 | $ EXHEADER_BF := blowfish.h | 55 | $ EXHEADER_BF := blowfish.h |
54 | $ EXHEADER_CAST := cast.h | 56 | $ EXHEADER_CAST := cast.h |
55 | $ EXHEADER_BN := bn.h | 57 | $ EXHEADER_BN := bn.h |
58 | $ EXHEADER_EC := ec.h | ||
56 | $ EXHEADER_RSA := rsa.h | 59 | $ EXHEADER_RSA := rsa.h |
57 | $ EXHEADER_DSA := dsa.h | 60 | $ EXHEADER_DSA := dsa.h |
58 | $ EXHEADER_DH := dh.h | 61 | $ EXHEADER_DH := dh.h |
62 | $ EXHEADER_DSO := dso.h | ||
63 | $ EXHEADER_ENGINE := engine.h | ||
64 | $ EXHEADER_AES := aes.h | ||
59 | $ EXHEADER_BUFFER := buffer.h | 65 | $ EXHEADER_BUFFER := buffer.h |
60 | $ EXHEADER_BIO := bio.h | 66 | $ EXHEADER_BIO := bio.h |
61 | $ EXHEADER_STACK := stack.h,safestack.h | 67 | $ EXHEADER_STACK := stack.h,safestack.h |
62 | $ EXHEADER_LHASH := lhash.h | 68 | $ EXHEADER_LHASH := lhash.h |
63 | $ EXHEADER_RAND := rand.h | 69 | $ EXHEADER_RAND := rand.h |
64 | $ EXHEADER_ERR := err.h | 70 | $ EXHEADER_ERR := err.h |
65 | $ EXHEADER_OBJECTS := objects.h | 71 | $ EXHEADER_OBJECTS := objects.h,obj_mac.h |
66 | $ EXHEADER_EVP := evp.h | 72 | $ EXHEADER_EVP := evp.h |
67 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h | 73 | $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h |
68 | $ EXHEADER_PEM := pem.h,pem2.h | 74 | $ EXHEADER_PEM := pem.h,pem2.h |
69 | $ EXHEADER_X509 := x509.h,x509_vfy.h | 75 | $ EXHEADER_X509 := x509.h,x509_vfy.h |
70 | $ EXHEADER_X509V3 := x509v3.h | 76 | $ EXHEADER_X509V3 := x509v3.h |
71 | $ EXHEADER_CONF := conf.h | 77 | $ EXHEADER_CONF := conf.h,conf_api.h |
72 | $ EXHEADER_TXT_DB := txt_db.h | 78 | $ EXHEADER_TXT_DB := txt_db.h |
73 | $ EXHEADER_PKCS7 := pkcs7.h | 79 | $ EXHEADER_PKCS7 := pkcs7.h |
74 | $ EXHEADER_PKCS12 := pkcs12.h | 80 | $ EXHEADER_PKCS12 := pkcs12.h |
75 | $ EXHEADER_COMP := comp.h | 81 | $ EXHEADER_COMP := comp.h |
82 | $ EXHEADER_OCSP := ocsp.h | ||
83 | $ EXHEADER_UI := ui.h,ui_compat.h | ||
84 | $ EXHEADER_KRB5 := krb5_asn.h | ||
76 | $ LIBS := LIBCRYPTO | 85 | $ LIBS := LIBCRYPTO |
77 | $ | 86 | $ |
78 | $ VEXE_DIR := [-.VAX.EXE.CRYPTO] | 87 | $ VEXE_DIR := [-.VAX.EXE.CRYPTO] |
@@ -90,6 +99,7 @@ $ COPY 'tmp' WRK_SSLINCLUDE: /LOG | |||
90 | $ ELSE | 99 | $ ELSE |
91 | $ COPY [.'D']'tmp' WRK_SSLINCLUDE: /LOG | 100 | $ COPY [.'D']'tmp' WRK_SSLINCLUDE: /LOG |
92 | $ ENDIF | 101 | $ ENDIF |
102 | $ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'tmp' | ||
93 | $ GOTO LOOP_SDIRS | 103 | $ GOTO LOOP_SDIRS |
94 | $ LOOP_SDIRS_END: | 104 | $ LOOP_SDIRS_END: |
95 | $ | 105 | $ |
diff --git a/src/lib/libcrypto/lhash/lh_test.c b/src/lib/libcrypto/lhash/lh_test.c index 294b42bc82..85700c859b 100644 --- a/src/lib/libcrypto/lhash/lh_test.c +++ b/src/lib/libcrypto/lhash/lh_test.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "lhash.h" | 62 | #include <openssl/lhash.h> |
63 | 63 | ||
64 | main() | 64 | main() |
65 | { | 65 | { |
@@ -75,9 +75,8 @@ main() | |||
75 | buf[0]='\0'; | 75 | buf[0]='\0'; |
76 | fgets(buf,256,stdin); | 76 | fgets(buf,256,stdin); |
77 | if (buf[0] == '\0') break; | 77 | if (buf[0] == '\0') break; |
78 | buf[256]='\0'; | ||
79 | i=strlen(buf); | 78 | i=strlen(buf); |
80 | p=Malloc(i+1); | 79 | p=OPENSSL_malloc(i+1); |
81 | memcpy(p,buf,i+1); | 80 | memcpy(p,buf,i+1); |
82 | lh_insert(conf,p); | 81 | lh_insert(conf,p); |
83 | } | 82 | } |
diff --git a/src/lib/libcrypto/lhash/num.pl b/src/lib/libcrypto/lhash/num.pl index 4d937c1f90..30fedf9cd5 100644 --- a/src/lib/libcrypto/lhash/num.pl +++ b/src/lib/libcrypto/lhash/num.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | #node 10 -> 4 | 3 | #node 10 -> 4 |
4 | 4 | ||
diff --git a/src/lib/libcrypto/md2/md2.c b/src/lib/libcrypto/md2/md2.c index 7f3ab64a43..f4d6f62264 100644 --- a/src/lib/libcrypto/md2/md2.c +++ b/src/lib/libcrypto/md2/md2.c | |||
@@ -58,25 +58,15 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "md2.h" | 61 | #include <openssl/md2.h> |
62 | 62 | ||
63 | #define BUFSIZE 1024*16 | 63 | #define BUFSIZE 1024*16 |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | void do_fp(FILE *f); | 65 | void do_fp(FILE *f); |
67 | void pt(unsigned char *md); | 66 | void pt(unsigned char *md); |
68 | int read(int, void *, unsigned int); | 67 | int read(int, void *, unsigned int); |
69 | void exit(int); | 68 | void exit(int); |
70 | #else | 69 | int main(int argc, char *argv[]) |
71 | void do_fp(); | ||
72 | void pt(); | ||
73 | int read(); | ||
74 | void exit(); | ||
75 | #endif | ||
76 | |||
77 | int main(argc, argv) | ||
78 | int argc; | ||
79 | char *argv[]; | ||
80 | { | 70 | { |
81 | int i,err=0; | 71 | int i,err=0; |
82 | FILE *IN; | 72 | FILE *IN; |
@@ -105,8 +95,7 @@ char *argv[]; | |||
105 | return(err); | 95 | return(err); |
106 | } | 96 | } |
107 | 97 | ||
108 | void do_fp(f) | 98 | void do_fp(FILE *f) |
109 | FILE *f; | ||
110 | { | 99 | { |
111 | MD2_CTX c; | 100 | MD2_CTX c; |
112 | unsigned char md[MD2_DIGEST_LENGTH]; | 101 | unsigned char md[MD2_DIGEST_LENGTH]; |
@@ -125,8 +114,7 @@ FILE *f; | |||
125 | pt(md); | 114 | pt(md); |
126 | } | 115 | } |
127 | 116 | ||
128 | void pt(md) | 117 | void pt(unsigned char *md) |
129 | unsigned char *md; | ||
130 | { | 118 | { |
131 | int i; | 119 | int i; |
132 | 120 | ||
diff --git a/src/lib/libcrypto/md2/md2.h b/src/lib/libcrypto/md2/md2.h index 0d3592506c..ad9241455c 100644 --- a/src/lib/libcrypto/md2/md2.h +++ b/src/lib/libcrypto/md2/md2.h | |||
@@ -59,11 +59,7 @@ | |||
59 | #ifndef HEADER_MD2_H | 59 | #ifndef HEADER_MD2_H |
60 | #define HEADER_MD2_H | 60 | #define HEADER_MD2_H |
61 | 61 | ||
62 | #ifdef __cplusplus | 62 | #ifdef OPENSSL_NO_MD2 |
63 | extern "C" { | ||
64 | #endif | ||
65 | |||
66 | #ifdef NO_MD2 | ||
67 | #error MD2 is disabled. | 63 | #error MD2 is disabled. |
68 | #endif | 64 | #endif |
69 | 65 | ||
@@ -71,6 +67,10 @@ extern "C" { | |||
71 | #define MD2_BLOCK 16 | 67 | #define MD2_BLOCK 16 |
72 | #include <openssl/opensslconf.h> /* MD2_INT */ | 68 | #include <openssl/opensslconf.h> /* MD2_INT */ |
73 | 69 | ||
70 | #ifdef __cplusplus | ||
71 | extern "C" { | ||
72 | #endif | ||
73 | |||
74 | typedef struct MD2state_st | 74 | typedef struct MD2state_st |
75 | { | 75 | { |
76 | int num; | 76 | int num; |
@@ -80,10 +80,10 @@ typedef struct MD2state_st | |||
80 | } MD2_CTX; | 80 | } MD2_CTX; |
81 | 81 | ||
82 | const char *MD2_options(void); | 82 | const char *MD2_options(void); |
83 | void MD2_Init(MD2_CTX *c); | 83 | int MD2_Init(MD2_CTX *c); |
84 | void MD2_Update(MD2_CTX *c, register unsigned char *data, unsigned long len); | 84 | int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len); |
85 | void MD2_Final(unsigned char *md, MD2_CTX *c); | 85 | int MD2_Final(unsigned char *md, MD2_CTX *c); |
86 | unsigned char *MD2(unsigned char *d, unsigned long n,unsigned char *md); | 86 | unsigned char *MD2(const unsigned char *d, unsigned long n,unsigned char *md); |
87 | #ifdef __cplusplus | 87 | #ifdef __cplusplus |
88 | } | 88 | } |
89 | #endif | 89 | #endif |
diff --git a/src/lib/libcrypto/md2/md2_dgst.c b/src/lib/libcrypto/md2/md2_dgst.c index 5cbd36f3fe..e25dd00e02 100644 --- a/src/lib/libcrypto/md2/md2_dgst.c +++ b/src/lib/libcrypto/md2/md2_dgst.c | |||
@@ -59,23 +59,19 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "md2.h" | 62 | #include <openssl/md2.h> |
63 | #include <openssl/opensslv.h> | ||
63 | 64 | ||
64 | char *MD2_version="MD2 part of SSLeay 0.9.0b 29-Jun-1998"; | 65 | const char *MD2_version="MD2" OPENSSL_VERSION_PTEXT; |
65 | 66 | ||
66 | /* Implemented from RFC1319 The MD2 Message-Digest Algorithm | 67 | /* Implemented from RFC1319 The MD2 Message-Digest Algorithm |
67 | */ | 68 | */ |
68 | 69 | ||
69 | #define UCHAR unsigned char | 70 | #define UCHAR unsigned char |
70 | 71 | ||
71 | #ifndef NOPROTO | 72 | static void md2_block(MD2_CTX *c, const unsigned char *d); |
72 | static void md2_block(MD2_CTX *c, unsigned char *d); | ||
73 | #else | ||
74 | static void md2_block(); | ||
75 | #endif | ||
76 | |||
77 | /* The magic S table - I have converted it to hex since it is | 73 | /* The magic S table - I have converted it to hex since it is |
78 | * basicaly just a random byte string. */ | 74 | * basically just a random byte string. */ |
79 | static MD2_INT S[256]={ | 75 | static MD2_INT S[256]={ |
80 | 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, | 76 | 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, |
81 | 0x3D, 0x36, 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, | 77 | 0x3D, 0x36, 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, |
@@ -111,7 +107,7 @@ static MD2_INT S[256]={ | |||
111 | 0xDB, 0x99, 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14, | 107 | 0xDB, 0x99, 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14, |
112 | }; | 108 | }; |
113 | 109 | ||
114 | char *MD2_options() | 110 | const char *MD2_options(void) |
115 | { | 111 | { |
116 | if (sizeof(MD2_INT) == 1) | 112 | if (sizeof(MD2_INT) == 1) |
117 | return("md2(char)"); | 113 | return("md2(char)"); |
@@ -119,23 +115,20 @@ char *MD2_options() | |||
119 | return("md2(int)"); | 115 | return("md2(int)"); |
120 | } | 116 | } |
121 | 117 | ||
122 | void MD2_Init(c) | 118 | int MD2_Init(MD2_CTX *c) |
123 | MD2_CTX *c; | ||
124 | { | 119 | { |
125 | c->num=0; | 120 | c->num=0; |
126 | memset(c->state,0,MD2_BLOCK*sizeof(MD2_INT)); | 121 | memset(c->state,0,MD2_BLOCK*sizeof(MD2_INT)); |
127 | memset(c->cksm,0,MD2_BLOCK*sizeof(MD2_INT)); | 122 | memset(c->cksm,0,MD2_BLOCK*sizeof(MD2_INT)); |
128 | memset(c->data,0,MD2_BLOCK); | 123 | memset(c->data,0,MD2_BLOCK); |
124 | return 1; | ||
129 | } | 125 | } |
130 | 126 | ||
131 | void MD2_Update(c, data, len) | 127 | int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len) |
132 | MD2_CTX *c; | ||
133 | register unsigned char *data; | ||
134 | unsigned long len; | ||
135 | { | 128 | { |
136 | register UCHAR *p; | 129 | register UCHAR *p; |
137 | 130 | ||
138 | if (len == 0) return; | 131 | if (len == 0) return 1; |
139 | 132 | ||
140 | p=c->data; | 133 | p=c->data; |
141 | if (c->num != 0) | 134 | if (c->num != 0) |
@@ -154,7 +147,7 @@ unsigned long len; | |||
154 | memcpy(&(p[c->num]),data,(int)len); | 147 | memcpy(&(p[c->num]),data,(int)len); |
155 | /* data+=len; */ | 148 | /* data+=len; */ |
156 | c->num+=(int)len; | 149 | c->num+=(int)len; |
157 | return; | 150 | return 1; |
158 | } | 151 | } |
159 | } | 152 | } |
160 | /* we now can process the input data in blocks of MD2_BLOCK | 153 | /* we now can process the input data in blocks of MD2_BLOCK |
@@ -167,11 +160,10 @@ unsigned long len; | |||
167 | } | 160 | } |
168 | memcpy(p,data,(int)len); | 161 | memcpy(p,data,(int)len); |
169 | c->num=(int)len; | 162 | c->num=(int)len; |
163 | return 1; | ||
170 | } | 164 | } |
171 | 165 | ||
172 | static void md2_block(c, d) | 166 | static void md2_block(MD2_CTX *c, const unsigned char *d) |
173 | MD2_CTX *c; | ||
174 | unsigned char *d; | ||
175 | { | 167 | { |
176 | register MD2_INT t,*sp1,*sp2; | 168 | register MD2_INT t,*sp1,*sp2; |
177 | register int i,j; | 169 | register int i,j; |
@@ -207,9 +199,7 @@ unsigned char *d; | |||
207 | memset(state,0,48*sizeof(MD2_INT)); | 199 | memset(state,0,48*sizeof(MD2_INT)); |
208 | } | 200 | } |
209 | 201 | ||
210 | void MD2_Final(md, c) | 202 | int MD2_Final(unsigned char *md, MD2_CTX *c) |
211 | unsigned char *md; | ||
212 | MD2_CTX *c; | ||
213 | { | 203 | { |
214 | int i,v; | 204 | int i,v; |
215 | register UCHAR *cp; | 205 | register UCHAR *cp; |
@@ -231,5 +221,6 @@ MD2_CTX *c; | |||
231 | for (i=0; i<16; i++) | 221 | for (i=0; i<16; i++) |
232 | md[i]=(UCHAR)(p1[i]&0xff); | 222 | md[i]=(UCHAR)(p1[i]&0xff); |
233 | memset((char *)&c,0,sizeof(c)); | 223 | memset((char *)&c,0,sizeof(c)); |
224 | return 1; | ||
234 | } | 225 | } |
235 | 226 | ||
diff --git a/src/lib/libcrypto/md2/md2_one.c b/src/lib/libcrypto/md2/md2_one.c index 513bf62fdb..b12c37ce4d 100644 --- a/src/lib/libcrypto/md2/md2_one.c +++ b/src/lib/libcrypto/md2/md2_one.c | |||
@@ -58,22 +58,35 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "md2.h" | 61 | #include <openssl/md2.h> |
62 | 62 | ||
63 | /* This is a separate file so that #defines in cryptlib.h can | 63 | /* This is a separate file so that #defines in cryptlib.h can |
64 | * map my MD functions to different names */ | 64 | * map my MD functions to different names */ |
65 | 65 | ||
66 | unsigned char *MD2(d, n, md) | 66 | unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md) |
67 | unsigned char *d; | ||
68 | unsigned long n; | ||
69 | unsigned char *md; | ||
70 | { | 67 | { |
71 | MD2_CTX c; | 68 | MD2_CTX c; |
72 | static unsigned char m[MD2_DIGEST_LENGTH]; | 69 | static unsigned char m[MD2_DIGEST_LENGTH]; |
73 | 70 | ||
74 | if (md == NULL) md=m; | 71 | if (md == NULL) md=m; |
75 | MD2_Init(&c); | 72 | MD2_Init(&c); |
73 | #ifndef CHARSET_EBCDIC | ||
76 | MD2_Update(&c,d,n); | 74 | MD2_Update(&c,d,n); |
75 | #else | ||
76 | { | ||
77 | char temp[1024]; | ||
78 | unsigned long chunk; | ||
79 | |||
80 | while (n > 0) | ||
81 | { | ||
82 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; | ||
83 | ebcdic2ascii(temp, d, chunk); | ||
84 | MD2_Update(&c,temp,chunk); | ||
85 | n -= chunk; | ||
86 | d += chunk; | ||
87 | } | ||
88 | } | ||
89 | #endif | ||
77 | MD2_Final(md,&c); | 90 | MD2_Final(md,&c); |
78 | memset(&c,0,sizeof(c)); /* Security consideration */ | 91 | memset(&c,0,sizeof(c)); /* Security consideration */ |
79 | return(md); | 92 | return(md); |
diff --git a/src/lib/libcrypto/md2/md2test.c b/src/lib/libcrypto/md2/md2test.c index 55924d44cd..7d3664faf5 100644 --- a/src/lib/libcrypto/md2/md2test.c +++ b/src/lib/libcrypto/md2/md2test.c | |||
@@ -59,9 +59,22 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "md2.h" | 62 | #include <openssl/md2.h> |
63 | 63 | ||
64 | char *test[]={ | 64 | #ifdef OPENSSL_NO_MD2 |
65 | int main(int argc, char *argv[]) | ||
66 | { | ||
67 | printf("No MD2 support\n"); | ||
68 | return(0); | ||
69 | } | ||
70 | #else | ||
71 | #include <openssl/evp.h> | ||
72 | |||
73 | #ifdef CHARSET_EBCDIC | ||
74 | #include <openssl/ebcdic.h> | ||
75 | #endif | ||
76 | |||
77 | static char *test[]={ | ||
65 | "", | 78 | "", |
66 | "a", | 79 | "a", |
67 | "abc", | 80 | "abc", |
@@ -72,7 +85,7 @@ char *test[]={ | |||
72 | NULL, | 85 | NULL, |
73 | }; | 86 | }; |
74 | 87 | ||
75 | char *ret[]={ | 88 | static char *ret[]={ |
76 | "8350e5a3e24c153df2275c9f80692773", | 89 | "8350e5a3e24c153df2275c9f80692773", |
77 | "32ec01ec4a6dac72c0ab96fb34c0b5d1", | 90 | "32ec01ec4a6dac72c0ab96fb34c0b5d1", |
78 | "da853b0d3f88d99b30283a69e6ded6bb", | 91 | "da853b0d3f88d99b30283a69e6ded6bb", |
@@ -82,26 +95,21 @@ char *ret[]={ | |||
82 | "d5976f79d83d3a0dc9806c3c66f3efd8", | 95 | "d5976f79d83d3a0dc9806c3c66f3efd8", |
83 | }; | 96 | }; |
84 | 97 | ||
85 | #ifndef NOPROTO | ||
86 | static char *pt(unsigned char *md); | 98 | static char *pt(unsigned char *md); |
87 | #else | 99 | int main(int argc, char *argv[]) |
88 | static char *pt(); | ||
89 | #endif | ||
90 | |||
91 | int main(argc,argv) | ||
92 | int argc; | ||
93 | char *argv[]; | ||
94 | { | 100 | { |
95 | int i,err=0; | 101 | int i,err=0; |
96 | char **P,**R; | 102 | char **P,**R; |
97 | char *p; | 103 | char *p; |
104 | unsigned char md[MD2_DIGEST_LENGTH]; | ||
98 | 105 | ||
99 | P=test; | 106 | P=test; |
100 | R=ret; | 107 | R=ret; |
101 | i=1; | 108 | i=1; |
102 | while (*P != NULL) | 109 | while (*P != NULL) |
103 | { | 110 | { |
104 | p=pt(MD2((unsigned char *)*P,(unsigned long)strlen(*P),NULL)); | 111 | EVP_Digest((unsigned char *)*P,(unsigned long)strlen(*P),md,NULL,EVP_md2(), NULL); |
112 | p=pt(md); | ||
105 | if (strcmp(p,*R) != 0) | 113 | if (strcmp(p,*R) != 0) |
106 | { | 114 | { |
107 | printf("error calculating MD2 on '%s'\n",*P); | 115 | printf("error calculating MD2 on '%s'\n",*P); |
@@ -118,8 +126,7 @@ char *argv[]; | |||
118 | return(0); | 126 | return(0); |
119 | } | 127 | } |
120 | 128 | ||
121 | static char *pt(md) | 129 | static char *pt(unsigned char *md) |
122 | unsigned char *md; | ||
123 | { | 130 | { |
124 | int i; | 131 | int i; |
125 | static char buf[80]; | 132 | static char buf[80]; |
@@ -128,3 +135,4 @@ unsigned char *md; | |||
128 | sprintf(&(buf[i*2]),"%02x",md[i]); | 135 | sprintf(&(buf[i*2]),"%02x",md[i]); |
129 | return(buf); | 136 | return(buf); |
130 | } | 137 | } |
138 | #endif | ||
diff --git a/src/lib/libcrypto/md4/md4test.c b/src/lib/libcrypto/md4/md4test.c index 97e6e21efd..e0fdc42282 100644 --- a/src/lib/libcrypto/md4/md4test.c +++ b/src/lib/libcrypto/md4/md4test.c | |||
@@ -60,13 +60,14 @@ | |||
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | 62 | ||
63 | #ifdef NO_MD4 | 63 | #ifdef OPENSSL_NO_MD4 |
64 | int main(int argc, char *argv[]) | 64 | int main(int argc, char *argv[]) |
65 | { | 65 | { |
66 | printf("No MD4 support\n"); | 66 | printf("No MD4 support\n"); |
67 | return(0); | 67 | return(0); |
68 | } | 68 | } |
69 | #else | 69 | #else |
70 | #include <openssl/evp.h> | ||
70 | #include <openssl/md4.h> | 71 | #include <openssl/md4.h> |
71 | 72 | ||
72 | static char *test[]={ | 73 | static char *test[]={ |
@@ -96,13 +97,15 @@ int main(int argc, char *argv[]) | |||
96 | int i,err=0; | 97 | int i,err=0; |
97 | unsigned char **P,**R; | 98 | unsigned char **P,**R; |
98 | char *p; | 99 | char *p; |
100 | unsigned char md[MD4_DIGEST_LENGTH]; | ||
99 | 101 | ||
100 | P=(unsigned char **)test; | 102 | P=(unsigned char **)test; |
101 | R=(unsigned char **)ret; | 103 | R=(unsigned char **)ret; |
102 | i=1; | 104 | i=1; |
103 | while (*P != NULL) | 105 | while (*P != NULL) |
104 | { | 106 | { |
105 | p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | 107 | EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL); |
108 | p=pt(md); | ||
106 | if (strcmp(p,(char *)*R) != 0) | 109 | if (strcmp(p,(char *)*R) != 0) |
107 | { | 110 | { |
108 | printf("error calculating MD4 on '%s'\n",*P); | 111 | printf("error calculating MD4 on '%s'\n",*P); |
diff --git a/src/lib/libcrypto/md5/asm/md5-sparcv9.S b/src/lib/libcrypto/md5/asm/md5-sparcv9.S index ca4257f134..a599ed5660 100644 --- a/src/lib/libcrypto/md5/asm/md5-sparcv9.S +++ b/src/lib/libcrypto/md5/asm/md5-sparcv9.S | |||
@@ -24,12 +24,12 @@ | |||
24 | * | 24 | * |
25 | * To compile with SC4.x/SC5.x: | 25 | * To compile with SC4.x/SC5.x: |
26 | * | 26 | * |
27 | * cc -xarch=v[9|8plus] -DULTRASPARC -DMD5_BLOCK_DATA_ORDER \ | 27 | * cc -xarch=v[9|8plus] -DOPENSSL_SYSNAME_ULTRASPARC -DMD5_BLOCK_DATA_ORDER \ |
28 | * -c md5-sparcv9.S | 28 | * -c md5-sparcv9.S |
29 | * | 29 | * |
30 | * and with gcc: | 30 | * and with gcc: |
31 | * | 31 | * |
32 | * gcc -mcpu=ultrasparc -DULTRASPARC -DMD5_BLOCK_DATA_ORDER \ | 32 | * gcc -mcpu=ultrasparc -DOPENSSL_SYSNAME_ULTRASPARC -DMD5_BLOCK_DATA_ORDER \ |
33 | * -c md5-sparcv9.S | 33 | * -c md5-sparcv9.S |
34 | * | 34 | * |
35 | * or if above fails (it does if you have gas): | 35 | * or if above fails (it does if you have gas): |
@@ -72,7 +72,7 @@ | |||
72 | #define Dval R8 | 72 | #define Dval R8 |
73 | 73 | ||
74 | #if defined(MD5_BLOCK_DATA_ORDER) | 74 | #if defined(MD5_BLOCK_DATA_ORDER) |
75 | # if defined(ULTRASPARC) | 75 | # if defined(OPENSSL_SYSNAME_ULTRASPARC) |
76 | # define LOAD lda | 76 | # define LOAD lda |
77 | # define X(i) [%i1+i*4]%asi | 77 | # define X(i) [%i1+i*4]%asi |
78 | # define md5_block md5_block_asm_data_order_aligned | 78 | # define md5_block md5_block_asm_data_order_aligned |
@@ -1012,7 +1012,7 @@ md5_block: | |||
1012 | st B,[Bptr] | 1012 | st B,[Bptr] |
1013 | nop != | 1013 | nop != |
1014 | 1014 | ||
1015 | #ifdef ULTRASPARC | 1015 | #ifdef OPENSSL_SYSNAME_ULTRASPARC |
1016 | bg,a,pt %icc,.Lmd5_block_loop | 1016 | bg,a,pt %icc,.Lmd5_block_loop |
1017 | #else | 1017 | #else |
1018 | bg,a .Lmd5_block_loop | 1018 | bg,a .Lmd5_block_loop |
diff --git a/src/lib/libcrypto/md5/md5.c b/src/lib/libcrypto/md5/md5.c index 9d6f5a6003..7ed0024ae1 100644 --- a/src/lib/libcrypto/md5/md5.c +++ b/src/lib/libcrypto/md5/md5.c | |||
@@ -58,23 +58,17 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "md5.h" | 61 | #include <openssl/md5.h> |
62 | 62 | ||
63 | #define BUFSIZE 1024*16 | 63 | #define BUFSIZE 1024*16 |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | void do_fp(FILE *f); | 65 | void do_fp(FILE *f); |
67 | void pt(unsigned char *md); | 66 | void pt(unsigned char *md); |
67 | #ifndef _OSD_POSIX | ||
68 | int read(int, void *, unsigned int); | 68 | int read(int, void *, unsigned int); |
69 | #else | ||
70 | void do_fp(); | ||
71 | void pt(); | ||
72 | int read(); | ||
73 | #endif | 69 | #endif |
74 | 70 | ||
75 | int main(argc, argv) | 71 | int main(int argc, char **argv) |
76 | int argc; | ||
77 | char **argv; | ||
78 | { | 72 | { |
79 | int i,err=0; | 73 | int i,err=0; |
80 | FILE *IN; | 74 | FILE *IN; |
@@ -102,8 +96,7 @@ char **argv; | |||
102 | exit(err); | 96 | exit(err); |
103 | } | 97 | } |
104 | 98 | ||
105 | void do_fp(f) | 99 | void do_fp(FILE *f) |
106 | FILE *f; | ||
107 | { | 100 | { |
108 | MD5_CTX c; | 101 | MD5_CTX c; |
109 | unsigned char md[MD5_DIGEST_LENGTH]; | 102 | unsigned char md[MD5_DIGEST_LENGTH]; |
@@ -123,8 +116,7 @@ FILE *f; | |||
123 | pt(md); | 116 | pt(md); |
124 | } | 117 | } |
125 | 118 | ||
126 | void pt(md) | 119 | void pt(unsigned char *md) |
127 | unsigned char *md; | ||
128 | { | 120 | { |
129 | int i; | 121 | int i; |
130 | 122 | ||
diff --git a/src/lib/libcrypto/md5/md5s.cpp b/src/lib/libcrypto/md5/md5s.cpp index ef8e175df0..dd343fd4e6 100644 --- a/src/lib/libcrypto/md5/md5s.cpp +++ b/src/lib/libcrypto/md5/md5s.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "md5.h" | 35 | #include <openssl/md5.h> |
36 | 36 | ||
37 | extern "C" { | 37 | extern "C" { |
38 | void md5_block_x86(MD5_CTX *ctx, unsigned char *buffer,int num); | 38 | void md5_block_x86(MD5_CTX *ctx, unsigned char *buffer,int num); |
diff --git a/src/lib/libcrypto/md5/md5test.c b/src/lib/libcrypto/md5/md5test.c index 74b84bc67f..862b89658a 100644 --- a/src/lib/libcrypto/md5/md5test.c +++ b/src/lib/libcrypto/md5/md5test.c | |||
@@ -59,9 +59,18 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "md5.h" | ||
63 | 62 | ||
64 | char *test[]={ | 63 | #ifdef OPENSSL_NO_MD5 |
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No MD5 support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/evp.h> | ||
71 | #include <openssl/md5.h> | ||
72 | |||
73 | static char *test[]={ | ||
65 | "", | 74 | "", |
66 | "a", | 75 | "a", |
67 | "abc", | 76 | "abc", |
@@ -72,7 +81,7 @@ char *test[]={ | |||
72 | NULL, | 81 | NULL, |
73 | }; | 82 | }; |
74 | 83 | ||
75 | char *ret[]={ | 84 | static char *ret[]={ |
76 | "d41d8cd98f00b204e9800998ecf8427e", | 85 | "d41d8cd98f00b204e9800998ecf8427e", |
77 | "0cc175b9c0f1b6a831c399e269772661", | 86 | "0cc175b9c0f1b6a831c399e269772661", |
78 | "900150983cd24fb0d6963f7d28e17f72", | 87 | "900150983cd24fb0d6963f7d28e17f72", |
@@ -82,26 +91,21 @@ char *ret[]={ | |||
82 | "57edf4a22be3c955ac49da2e2107b67a", | 91 | "57edf4a22be3c955ac49da2e2107b67a", |
83 | }; | 92 | }; |
84 | 93 | ||
85 | #ifndef NOPROTO | ||
86 | static char *pt(unsigned char *md); | 94 | static char *pt(unsigned char *md); |
87 | #else | 95 | int main(int argc, char *argv[]) |
88 | static char *pt(); | ||
89 | #endif | ||
90 | |||
91 | int main(argc,argv) | ||
92 | int argc; | ||
93 | char *argv[]; | ||
94 | { | 96 | { |
95 | int i,err=0; | 97 | int i,err=0; |
96 | unsigned char **P,**R; | 98 | unsigned char **P,**R; |
97 | char *p; | 99 | char *p; |
100 | unsigned char md[MD5_DIGEST_LENGTH]; | ||
98 | 101 | ||
99 | P=(unsigned char **)test; | 102 | P=(unsigned char **)test; |
100 | R=(unsigned char **)ret; | 103 | R=(unsigned char **)ret; |
101 | i=1; | 104 | i=1; |
102 | while (*P != NULL) | 105 | while (*P != NULL) |
103 | { | 106 | { |
104 | p=pt(MD5(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | 107 | EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md5(), NULL); |
108 | p=pt(md); | ||
105 | if (strcmp(p,(char *)*R) != 0) | 109 | if (strcmp(p,(char *)*R) != 0) |
106 | { | 110 | { |
107 | printf("error calculating MD5 on '%s'\n",*P); | 111 | printf("error calculating MD5 on '%s'\n",*P); |
@@ -118,8 +122,7 @@ char *argv[]; | |||
118 | return(0); | 122 | return(0); |
119 | } | 123 | } |
120 | 124 | ||
121 | static char *pt(md) | 125 | static char *pt(unsigned char *md) |
122 | unsigned char *md; | ||
123 | { | 126 | { |
124 | int i; | 127 | int i; |
125 | static char buf[80]; | 128 | static char buf[80]; |
@@ -128,3 +131,4 @@ unsigned char *md; | |||
128 | sprintf(&(buf[i*2]),"%02x",md[i]); | 131 | sprintf(&(buf[i*2]),"%02x",md[i]); |
129 | return(buf); | 132 | return(buf); |
130 | } | 133 | } |
134 | #endif | ||
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h index 0b104be184..793a8a0f13 100644 --- a/src/lib/libcrypto/mdc2/mdc2.h +++ b/src/lib/libcrypto/mdc2/mdc2.h | |||
@@ -59,11 +59,15 @@ | |||
59 | #ifndef HEADER_MDC2_H | 59 | #ifndef HEADER_MDC2_H |
60 | #define HEADER_MDC2_H | 60 | #define HEADER_MDC2_H |
61 | 61 | ||
62 | #include <openssl/des.h> | ||
63 | |||
62 | #ifdef __cplusplus | 64 | #ifdef __cplusplus |
63 | extern "C" { | 65 | extern "C" { |
64 | #endif | 66 | #endif |
65 | 67 | ||
66 | #include "des.h" | 68 | #ifdef OPENSSL_NO_MDC2 |
69 | #error MDC2 is disabled. | ||
70 | #endif | ||
67 | 71 | ||
68 | #define MDC2_BLOCK 8 | 72 | #define MDC2_BLOCK 8 |
69 | #define MDC2_DIGEST_LENGTH 16 | 73 | #define MDC2_DIGEST_LENGTH 16 |
@@ -72,25 +76,16 @@ typedef struct mdc2_ctx_st | |||
72 | { | 76 | { |
73 | int num; | 77 | int num; |
74 | unsigned char data[MDC2_BLOCK]; | 78 | unsigned char data[MDC2_BLOCK]; |
75 | des_cblock h,hh; | 79 | DES_cblock h,hh; |
76 | int pad_type; /* either 1 or 2, default 1 */ | 80 | int pad_type; /* either 1 or 2, default 1 */ |
77 | } MDC2_CTX; | 81 | } MDC2_CTX; |
78 | 82 | ||
79 | #ifndef NOPROTO | ||
80 | |||
81 | void MDC2_Init(MDC2_CTX *c); | ||
82 | void MDC2_Update(MDC2_CTX *c, unsigned char *data, unsigned long len); | ||
83 | void MDC2_Final(unsigned char *md, MDC2_CTX *c); | ||
84 | unsigned char *MDC2(unsigned char *d, unsigned long n, unsigned char *md); | ||
85 | 83 | ||
86 | #else | 84 | int MDC2_Init(MDC2_CTX *c); |
87 | 85 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, unsigned long len); | |
88 | void MDC2_Init(); | 86 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); |
89 | void MDC2_Update(); | 87 | unsigned char *MDC2(const unsigned char *d, unsigned long n, |
90 | void MDC2_Final(); | 88 | unsigned char *md); |
91 | unsigned char *MDC2(); | ||
92 | |||
93 | #endif | ||
94 | 89 | ||
95 | #ifdef __cplusplus | 90 | #ifdef __cplusplus |
96 | } | 91 | } |
diff --git a/src/lib/libcrypto/mem.c b/src/lib/libcrypto/mem.c index 72e501ad0f..effec714e8 100644 --- a/src/lib/libcrypto/mem.c +++ b/src/lib/libcrypto/mem.c | |||
@@ -58,296 +58,292 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "buffer.h" | 61 | #include <openssl/crypto.h> |
62 | #include "bio.h" | ||
63 | #include "lhash.h" | ||
64 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
65 | 63 | ||
66 | static int mh_mode=CRYPTO_MEM_CHECK_OFF; | ||
67 | static unsigned long order=0; | ||
68 | 64 | ||
69 | static LHASH *mh=NULL; | 65 | static int allow_customize = 1; /* we provide flexible functions for */ |
66 | static int allow_customize_debug = 1;/* exchanging memory-related functions at | ||
67 | * run-time, but this must be done | ||
68 | * before any blocks are actually | ||
69 | * allocated; or we'll run into huge | ||
70 | * problems when malloc/free pairs | ||
71 | * don't match etc. */ | ||
72 | |||
73 | |||
74 | |||
75 | /* the following pointers may be changed as long as 'allow_customize' is set */ | ||
76 | |||
77 | static void *(*malloc_func)(size_t) = malloc; | ||
78 | static void *default_malloc_ex(size_t num, const char *file, int line) | ||
79 | { return malloc_func(num); } | ||
80 | static void *(*malloc_ex_func)(size_t, const char *file, int line) | ||
81 | = default_malloc_ex; | ||
82 | |||
83 | static void *(*realloc_func)(void *, size_t)= realloc; | ||
84 | static void *default_realloc_ex(void *str, size_t num, | ||
85 | const char *file, int line) | ||
86 | { return realloc_func(str,num); } | ||
87 | static void *(*realloc_ex_func)(void *, size_t, const char *file, int line) | ||
88 | = default_realloc_ex; | ||
89 | |||
90 | static void (*free_func)(void *) = free; | ||
91 | |||
92 | static void *(*malloc_locked_func)(size_t) = malloc; | ||
93 | static void *default_malloc_locked_ex(size_t num, const char *file, int line) | ||
94 | { return malloc_locked_func(num); } | ||
95 | static void *(*malloc_locked_ex_func)(size_t, const char *file, int line) | ||
96 | = default_malloc_locked_ex; | ||
97 | |||
98 | static void (*free_locked_func)(void *) = free; | ||
99 | |||
100 | |||
101 | |||
102 | /* may be changed as long as 'allow_customize_debug' is set */ | ||
103 | /* XXX use correct function pointer types */ | ||
104 | #ifdef CRYPTO_MDEBUG | ||
105 | /* use default functions from mem_dbg.c */ | ||
106 | static void (*malloc_debug_func)(void *,int,const char *,int,int) | ||
107 | = CRYPTO_dbg_malloc; | ||
108 | static void (*realloc_debug_func)(void *,void *,int,const char *,int,int) | ||
109 | = CRYPTO_dbg_realloc; | ||
110 | static void (*free_debug_func)(void *,int) = CRYPTO_dbg_free; | ||
111 | static void (*set_debug_options_func)(long) = CRYPTO_dbg_set_options; | ||
112 | static long (*get_debug_options_func)(void) = CRYPTO_dbg_get_options; | ||
113 | #else | ||
114 | /* applications can use CRYPTO_malloc_debug_init() to select above case | ||
115 | * at run-time */ | ||
116 | static void (*malloc_debug_func)(void *,int,const char *,int,int) = NULL; | ||
117 | static void (*realloc_debug_func)(void *,void *,int,const char *,int,int) | ||
118 | = NULL; | ||
119 | static void (*free_debug_func)(void *,int) = NULL; | ||
120 | static void (*set_debug_options_func)(long) = NULL; | ||
121 | static long (*get_debug_options_func)(void) = NULL; | ||
122 | #endif | ||
70 | 123 | ||
71 | typedef struct mem_st | ||
72 | { | ||
73 | char *addr; | ||
74 | int num; | ||
75 | char *file; | ||
76 | int line; | ||
77 | unsigned long order; | ||
78 | } MEM; | ||
79 | |||
80 | int CRYPTO_mem_ctrl(mode) | ||
81 | int mode; | ||
82 | { | ||
83 | int ret=mh_mode; | ||
84 | 124 | ||
85 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | 125 | int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), |
86 | switch (mode) | 126 | void (*f)(void *)) |
87 | { | 127 | { |
88 | case CRYPTO_MEM_CHECK_ON: | 128 | if (!allow_customize) |
89 | mh_mode|=CRYPTO_MEM_CHECK_ON; | 129 | return 0; |
90 | break; | 130 | if ((m == 0) || (r == 0) || (f == 0)) |
91 | case CRYPTO_MEM_CHECK_OFF: | 131 | return 0; |
92 | mh_mode&= ~CRYPTO_MEM_CHECK_ON; | 132 | malloc_func=m; malloc_ex_func=default_malloc_ex; |
93 | break; | 133 | realloc_func=r; realloc_ex_func=default_realloc_ex; |
94 | default: | 134 | free_func=f; |
95 | break; | 135 | malloc_locked_func=m; malloc_locked_ex_func=default_malloc_locked_ex; |
96 | } | 136 | free_locked_func=f; |
97 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | 137 | return 1; |
98 | return(ret); | ||
99 | } | 138 | } |
100 | 139 | ||
101 | static int mem_cmp(a,b) | 140 | int CRYPTO_set_mem_ex_functions( |
102 | MEM *a,*b; | 141 | void *(*m)(size_t,const char *,int), |
142 | void *(*r)(void *, size_t,const char *,int), | ||
143 | void (*f)(void *)) | ||
103 | { | 144 | { |
104 | return(a->addr - b->addr); | 145 | if (!allow_customize) |
146 | return 0; | ||
147 | if ((m == 0) || (r == 0) || (f == 0)) | ||
148 | return 0; | ||
149 | malloc_func=0; malloc_ex_func=m; | ||
150 | realloc_func=0; realloc_ex_func=r; | ||
151 | free_func=f; | ||
152 | malloc_locked_func=0; malloc_locked_ex_func=m; | ||
153 | free_locked_func=f; | ||
154 | return 1; | ||
105 | } | 155 | } |
106 | 156 | ||
107 | static unsigned long mem_hash(a) | 157 | int CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*f)(void *)) |
108 | MEM *a; | ||
109 | { | 158 | { |
110 | unsigned long ret; | 159 | if (!allow_customize) |
160 | return 0; | ||
161 | if ((m == NULL) || (f == NULL)) | ||
162 | return 0; | ||
163 | malloc_locked_func=m; malloc_locked_ex_func=default_malloc_locked_ex; | ||
164 | free_locked_func=f; | ||
165 | return 1; | ||
166 | } | ||
111 | 167 | ||
112 | ret=(unsigned long)a->addr; | 168 | int CRYPTO_set_locked_mem_ex_functions( |
169 | void *(*m)(size_t,const char *,int), | ||
170 | void (*f)(void *)) | ||
171 | { | ||
172 | if (!allow_customize) | ||
173 | return 0; | ||
174 | if ((m == NULL) || (f == NULL)) | ||
175 | return 0; | ||
176 | malloc_locked_func=0; malloc_locked_ex_func=m; | ||
177 | free_func=f; | ||
178 | return 1; | ||
179 | } | ||
113 | 180 | ||
114 | ret=ret*17851+(ret>>14)*7+(ret>>4)*251; | 181 | int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int), |
115 | return(ret); | 182 | void (*r)(void *,void *,int,const char *,int,int), |
183 | void (*f)(void *,int), | ||
184 | void (*so)(long), | ||
185 | long (*go)(void)) | ||
186 | { | ||
187 | if (!allow_customize_debug) | ||
188 | return 0; | ||
189 | malloc_debug_func=m; | ||
190 | realloc_debug_func=r; | ||
191 | free_debug_func=f; | ||
192 | set_debug_options_func=so; | ||
193 | get_debug_options_func=go; | ||
194 | return 1; | ||
116 | } | 195 | } |
117 | 196 | ||
118 | static char *(*malloc_func)()= (char *(*)())malloc; | ||
119 | static char *(*realloc_func)()= (char *(*)())realloc; | ||
120 | static void (*free_func)()= (void (*)())free; | ||
121 | 197 | ||
122 | void CRYPTO_set_mem_functions(m,r,f) | 198 | void CRYPTO_get_mem_functions(void *(**m)(size_t), void *(**r)(void *, size_t), |
123 | char *(*m)(); | 199 | void (**f)(void *)) |
124 | char *(*r)(); | ||
125 | void (*f)(); | ||
126 | { | 200 | { |
127 | if ((m == NULL) || (r == NULL) || (f == NULL)) return; | 201 | if (m != NULL) *m = (malloc_ex_func == default_malloc_ex) ? |
128 | malloc_func=m; | 202 | malloc_func : 0; |
129 | realloc_func=r; | 203 | if (r != NULL) *r = (realloc_ex_func == default_realloc_ex) ? |
130 | free_func=f; | 204 | realloc_func : 0; |
205 | if (f != NULL) *f=free_func; | ||
131 | } | 206 | } |
132 | 207 | ||
133 | void CRYPTO_get_mem_functions(m,r,f) | 208 | void CRYPTO_get_mem_ex_functions( |
134 | char *(**m)(); | 209 | void *(**m)(size_t,const char *,int), |
135 | char *(**r)(); | 210 | void *(**r)(void *, size_t,const char *,int), |
136 | void (**f)(); | 211 | void (**f)(void *)) |
137 | { | 212 | { |
138 | if (m != NULL) *m=malloc_func; | 213 | if (m != NULL) *m = (malloc_ex_func != default_malloc_ex) ? |
139 | if (r != NULL) *r=realloc_func; | 214 | malloc_ex_func : 0; |
215 | if (r != NULL) *r = (realloc_ex_func != default_realloc_ex) ? | ||
216 | realloc_ex_func : 0; | ||
140 | if (f != NULL) *f=free_func; | 217 | if (f != NULL) *f=free_func; |
141 | } | 218 | } |
142 | 219 | ||
143 | char *CRYPTO_malloc(num) | 220 | void CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *)) |
144 | int num; | ||
145 | { | 221 | { |
146 | return(malloc_func(num)); | 222 | if (m != NULL) *m = (malloc_locked_ex_func == default_malloc_locked_ex) ? |
223 | malloc_locked_func : 0; | ||
224 | if (f != NULL) *f=free_locked_func; | ||
147 | } | 225 | } |
148 | 226 | ||
149 | char *CRYPTO_realloc(str,num) | 227 | void CRYPTO_get_locked_mem_ex_functions( |
150 | char *str; | 228 | void *(**m)(size_t,const char *,int), |
151 | int num; | 229 | void (**f)(void *)) |
152 | { | 230 | { |
153 | return(realloc_func(str,num)); | 231 | if (m != NULL) *m = (malloc_locked_ex_func != default_malloc_locked_ex) ? |
232 | malloc_locked_ex_func : 0; | ||
233 | if (f != NULL) *f=free_locked_func; | ||
154 | } | 234 | } |
155 | 235 | ||
156 | void CRYPTO_free(str) | 236 | void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), |
157 | char *str; | 237 | void (**r)(void *,void *,int,const char *,int,int), |
238 | void (**f)(void *,int), | ||
239 | void (**so)(long), | ||
240 | long (**go)(void)) | ||
158 | { | 241 | { |
159 | free_func(str); | 242 | if (m != NULL) *m=malloc_debug_func; |
243 | if (r != NULL) *r=realloc_debug_func; | ||
244 | if (f != NULL) *f=free_debug_func; | ||
245 | if (so != NULL) *so=set_debug_options_func; | ||
246 | if (go != NULL) *go=get_debug_options_func; | ||
160 | } | 247 | } |
161 | 248 | ||
162 | char *CRYPTO_dbg_malloc(num,file,line) | ||
163 | int num; | ||
164 | char *file; | ||
165 | int line; | ||
166 | { | ||
167 | char *ret; | ||
168 | MEM *m,*mm; | ||
169 | 249 | ||
170 | if ((ret=malloc_func(num)) == NULL) | 250 | void *CRYPTO_malloc_locked(int num, const char *file, int line) |
171 | return(NULL); | 251 | { |
252 | void *ret = NULL; | ||
172 | 253 | ||
173 | if (mh_mode & CRYPTO_MEM_CHECK_ON) | 254 | allow_customize = 0; |
255 | if (malloc_debug_func != NULL) | ||
174 | { | 256 | { |
175 | if ((m=(MEM *)malloc(sizeof(MEM))) == NULL) | 257 | allow_customize_debug = 0; |
176 | { | 258 | malloc_debug_func(NULL, num, file, line, 0); |
177 | free(ret); | ||
178 | return(NULL); | ||
179 | } | ||
180 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | ||
181 | if (mh == NULL) | ||
182 | { | ||
183 | if ((mh=lh_new(mem_hash,mem_cmp)) == NULL) | ||
184 | { | ||
185 | free(ret); | ||
186 | free(m); | ||
187 | return(NULL); | ||
188 | } | ||
189 | } | ||
190 | |||
191 | m->addr=ret; | ||
192 | m->file=file; | ||
193 | m->line=line; | ||
194 | m->num=num; | ||
195 | m->order=order++; | ||
196 | if ((mm=(MEM *)lh_insert(mh,(char *)m)) != NULL) | ||
197 | { | ||
198 | /* Not good, but don't sweat it */ | ||
199 | free(mm); | ||
200 | } | ||
201 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | ||
202 | } | 259 | } |
203 | return(ret); | 260 | ret = malloc_locked_ex_func(num,file,line); |
261 | #ifdef LEVITTE_DEBUG_MEM | ||
262 | fprintf(stderr, "LEVITTE_DEBUG_MEM: > 0x%p (%d)\n", ret, num); | ||
263 | #endif | ||
264 | if (malloc_debug_func != NULL) | ||
265 | malloc_debug_func(ret, num, file, line, 1); | ||
266 | |||
267 | return ret; | ||
204 | } | 268 | } |
205 | 269 | ||
206 | void CRYPTO_dbg_free(addr) | 270 | void CRYPTO_free_locked(void *str) |
207 | char *addr; | ||
208 | { | 271 | { |
209 | MEM m,*mp; | 272 | if (free_debug_func != NULL) |
210 | 273 | free_debug_func(str, 0); | |
211 | if ((mh_mode & CRYPTO_MEM_CHECK_ON) && (mh != NULL)) | 274 | #ifdef LEVITTE_DEBUG_MEM |
212 | { | 275 | fprintf(stderr, "LEVITTE_DEBUG_MEM: < 0x%p\n", str); |
213 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | 276 | #endif |
214 | m.addr=addr; | 277 | free_locked_func(str); |
215 | mp=(MEM *)lh_delete(mh,(char *)&m); | 278 | if (free_debug_func != NULL) |
216 | if (mp != NULL) | 279 | free_debug_func(NULL, 1); |
217 | free(mp); | ||
218 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | ||
219 | } | ||
220 | free_func(addr); | ||
221 | } | 280 | } |
222 | 281 | ||
223 | char *CRYPTO_dbg_realloc(addr,num,file,line) | 282 | void *CRYPTO_malloc(int num, const char *file, int line) |
224 | char *addr; | ||
225 | int num; | ||
226 | char *file; | ||
227 | int line; | ||
228 | { | 283 | { |
229 | char *ret; | 284 | void *ret = NULL; |
230 | MEM m,*mp; | ||
231 | |||
232 | ret=realloc_func(addr,num); | ||
233 | if (ret == addr) return(ret); | ||
234 | 285 | ||
235 | if (mh_mode & CRYPTO_MEM_CHECK_ON) | 286 | allow_customize = 0; |
287 | if (malloc_debug_func != NULL) | ||
236 | { | 288 | { |
237 | if (ret == NULL) return(NULL); | 289 | allow_customize_debug = 0; |
238 | m.addr=addr; | 290 | malloc_debug_func(NULL, num, file, line, 0); |
239 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | ||
240 | mp=(MEM *)lh_delete(mh,(char *)&m); | ||
241 | if (mp != NULL) | ||
242 | { | ||
243 | mp->addr=ret; | ||
244 | lh_insert(mh,(char *)mp); | ||
245 | } | ||
246 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | ||
247 | } | 291 | } |
248 | return(ret); | 292 | ret = malloc_ex_func(num,file,line); |
249 | } | 293 | #ifdef LEVITTE_DEBUG_MEM |
294 | fprintf(stderr, "LEVITTE_DEBUG_MEM: > 0x%p (%d)\n", ret, num); | ||
295 | #endif | ||
296 | if (malloc_debug_func != NULL) | ||
297 | malloc_debug_func(ret, num, file, line, 1); | ||
250 | 298 | ||
251 | char *CRYPTO_remalloc(a,n) | 299 | return ret; |
252 | char *a; | ||
253 | int n; | ||
254 | { | ||
255 | if (a != NULL) Free(a); | ||
256 | a=(char *)Malloc(n); | ||
257 | return(a); | ||
258 | } | 300 | } |
259 | 301 | ||
260 | char *CRYPTO_dbg_remalloc(a,n,file,line) | 302 | void *CRYPTO_realloc(void *str, int num, const char *file, int line) |
261 | char *a; | ||
262 | int n; | ||
263 | char *file; | ||
264 | int line; | ||
265 | { | 303 | { |
266 | if (a != NULL) CRYPTO_dbg_free(a); | 304 | void *ret = NULL; |
267 | a=(char *)CRYPTO_dbg_malloc(n,file,line); | ||
268 | return(a); | ||
269 | } | ||
270 | 305 | ||
306 | if (realloc_debug_func != NULL) | ||
307 | realloc_debug_func(str, NULL, num, file, line, 0); | ||
308 | ret = realloc_ex_func(str,num,file,line); | ||
309 | #ifdef LEVITTE_DEBUG_MEM | ||
310 | fprintf(stderr, "LEVITTE_DEBUG_MEM: | 0x%p -> 0x%p (%d)\n", str, ret, num); | ||
311 | #endif | ||
312 | if (realloc_debug_func != NULL) | ||
313 | realloc_debug_func(str, ret, num, file, line, 1); | ||
271 | 314 | ||
272 | typedef struct mem_leak_st | 315 | return ret; |
273 | { | ||
274 | BIO *bio; | ||
275 | int chunks; | ||
276 | long bytes; | ||
277 | } MEM_LEAK; | ||
278 | |||
279 | static void print_leak(m,l) | ||
280 | MEM *m; | ||
281 | MEM_LEAK *l; | ||
282 | { | ||
283 | char buf[128]; | ||
284 | |||
285 | sprintf(buf,"%5ld file=%s, line=%d, number=%d, address=%08lX\n", | ||
286 | m->order,m->file,m->line,m->num,(long)m->addr); | ||
287 | BIO_puts(l->bio,buf); | ||
288 | l->chunks++; | ||
289 | l->bytes+=m->num; | ||
290 | } | 316 | } |
291 | 317 | ||
292 | void CRYPTO_mem_leaks(b) | 318 | void CRYPTO_free(void *str) |
293 | BIO *b; | ||
294 | { | 319 | { |
295 | MEM_LEAK ml; | 320 | if (free_debug_func != NULL) |
296 | char buf[80]; | 321 | free_debug_func(str, 0); |
297 | 322 | #ifdef LEVITTE_DEBUG_MEM | |
298 | if (mh == NULL) return; | 323 | fprintf(stderr, "LEVITTE_DEBUG_MEM: < 0x%p\n", str); |
299 | ml.bio=b; | 324 | #endif |
300 | ml.bytes=0; | 325 | free_func(str); |
301 | ml.chunks=0; | 326 | if (free_debug_func != NULL) |
302 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | 327 | free_debug_func(NULL, 1); |
303 | lh_doall_arg(mh,(void (*)())print_leak,(char *)&ml); | ||
304 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | ||
305 | if (ml.chunks != 0) | ||
306 | { | ||
307 | sprintf(buf,"%ld bytes leaked in %d chunks\n", | ||
308 | ml.bytes,ml.chunks); | ||
309 | BIO_puts(b,buf); | ||
310 | } | ||
311 | /* | ||
312 | lh_stats_bio(mh,b); | ||
313 | lh_node_stats_bio(mh,b); | ||
314 | lh_node_usage_stats_bio(mh,b); | ||
315 | */ | ||
316 | } | 328 | } |
317 | 329 | ||
318 | static void (*mem_cb)()=NULL; | 330 | void *CRYPTO_remalloc(void *a, int num, const char *file, int line) |
319 | |||
320 | static void cb_leak(m,cb) | ||
321 | MEM *m; | ||
322 | char *cb; | ||
323 | { | 331 | { |
324 | void (*mem_callback)()=(void (*)())cb; | 332 | if (a != NULL) OPENSSL_free(a); |
325 | mem_callback(m->order,m->file,m->line,m->num,m->addr); | 333 | a=(char *)OPENSSL_malloc(num); |
334 | return(a); | ||
326 | } | 335 | } |
327 | 336 | ||
328 | void CRYPTO_mem_leaks_cb(cb) | 337 | |
329 | void (*cb)(); | 338 | void CRYPTO_set_mem_debug_options(long bits) |
330 | { | 339 | { |
331 | if (mh == NULL) return; | 340 | if (set_debug_options_func != NULL) |
332 | CRYPTO_w_lock(CRYPTO_LOCK_MALLOC); | 341 | set_debug_options_func(bits); |
333 | mem_cb=cb; | ||
334 | lh_doall_arg(mh,(void (*)())cb_leak,(char *)mem_cb); | ||
335 | mem_cb=NULL; | ||
336 | CRYPTO_w_unlock(CRYPTO_LOCK_MALLOC); | ||
337 | } | 342 | } |
338 | 343 | ||
339 | #ifndef NO_FP_API | 344 | long CRYPTO_get_mem_debug_options(void) |
340 | void CRYPTO_mem_leaks_fp(fp) | ||
341 | FILE *fp; | ||
342 | { | 345 | { |
343 | BIO *b; | 346 | if (get_debug_options_func != NULL) |
344 | 347 | return get_debug_options_func(); | |
345 | if (mh == NULL) return; | 348 | return 0; |
346 | if ((b=BIO_new(BIO_s_file())) == NULL) | ||
347 | return; | ||
348 | BIO_set_fp(b,fp,BIO_NOCLOSE); | ||
349 | CRYPTO_mem_leaks(b); | ||
350 | BIO_free(b); | ||
351 | } | 349 | } |
352 | #endif | ||
353 | |||
diff --git a/src/lib/libcrypto/objects/obj_dat.h b/src/lib/libcrypto/objects/obj_dat.h index 48143ae3c7..39cfcda783 100644 --- a/src/lib/libcrypto/objects/obj_dat.h +++ b/src/lib/libcrypto/objects/obj_dat.h | |||
@@ -1,4 +1,10 @@ | |||
1 | /* lib/obj/obj_dat.h */ | 1 | /* crypto/objects/obj_dat.h */ |
2 | |||
3 | /* THIS FILE IS GENERATED FROM objects.h by obj_dat.pl via the | ||
4 | * following command: | ||
5 | * perl obj_dat.pl obj_mac.h obj_dat.h | ||
6 | */ | ||
7 | |||
2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 8 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 9 | * All rights reserved. |
4 | * | 10 | * |
@@ -56,284 +62,1294 @@ | |||
56 | * [including the GNU Public Licence.] | 62 | * [including the GNU Public Licence.] |
57 | */ | 63 | */ |
58 | 64 | ||
59 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | 65 | #define NUM_NID 510 |
60 | * following command: | 66 | #define NUM_SN 507 |
61 | * perl obj_dat.pl < objects.h > obj_dat.h | 67 | #define NUM_LN 507 |
62 | */ | 68 | #define NUM_OBJ 481 |
63 | 69 | ||
64 | #define NUM_NID 124 | 70 | static unsigned char lvalues[3881]={ |
65 | #define NUM_SN 95 | 71 | 0x00, /* [ 0] OBJ_undef */ |
66 | #define NUM_LN 122 | 72 | 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ |
67 | #define NUM_OBJ 95 | 73 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ |
68 | 74 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 14] OBJ_md2 */ | |
69 | static unsigned char lvalues[600]={ | 75 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 22] OBJ_md5 */ |
70 | 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */ | 76 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 30] OBJ_rc4 */ |
71 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */ | 77 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 38] OBJ_rsaEncryption */ |
72 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */ | 78 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 47] OBJ_md2WithRSAEncryption */ |
73 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 21] OBJ_md5 */ | 79 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 56] OBJ_md5WithRSAEncryption */ |
74 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 29] OBJ_rc4 */ | 80 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 65] OBJ_pbeWithMD2AndDES_CBC */ |
75 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 37] OBJ_rsaEncryption */ | 81 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 74] OBJ_pbeWithMD5AndDES_CBC */ |
76 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 46] OBJ_md2WithRSAEncryption */ | 82 | 0x55, /* [ 83] OBJ_X500 */ |
77 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 55] OBJ_md5WithRSAEncryption */ | 83 | 0x55,0x04, /* [ 84] OBJ_X509 */ |
78 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 64] OBJ_pbeWithMD2AndDES_CBC */ | 84 | 0x55,0x04,0x03, /* [ 86] OBJ_commonName */ |
79 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 73] OBJ_pbeWithMD5AndDES_CBC */ | 85 | 0x55,0x04,0x06, /* [ 89] OBJ_countryName */ |
80 | 0x55, /* [ 82] OBJ_X500 */ | 86 | 0x55,0x04,0x07, /* [ 92] OBJ_localityName */ |
81 | 0x55,0x04, /* [ 83] OBJ_X509 */ | 87 | 0x55,0x04,0x08, /* [ 95] OBJ_stateOrProvinceName */ |
82 | 0x55,0x04,0x03, /* [ 85] OBJ_commonName */ | 88 | 0x55,0x04,0x0A, /* [ 98] OBJ_organizationName */ |
83 | 0x55,0x04,0x06, /* [ 88] OBJ_countryName */ | 89 | 0x55,0x04,0x0B, /* [101] OBJ_organizationalUnitName */ |
84 | 0x55,0x04,0x07, /* [ 91] OBJ_localityName */ | 90 | 0x55,0x08,0x01,0x01, /* [104] OBJ_rsa */ |
85 | 0x55,0x04,0x08, /* [ 94] OBJ_stateOrProvinceName */ | 91 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [108] OBJ_pkcs7 */ |
86 | 0x55,0x04,0x0A, /* [ 97] OBJ_organizationName */ | 92 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [116] OBJ_pkcs7_data */ |
87 | 0x55,0x04,0x0B, /* [100] OBJ_organizationalUnitName */ | 93 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [125] OBJ_pkcs7_signed */ |
88 | 0x55,0x08,0x01,0x01, /* [103] OBJ_rsa */ | 94 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [134] OBJ_pkcs7_enveloped */ |
89 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [107] OBJ_pkcs7 */ | 95 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [143] OBJ_pkcs7_signedAndEnveloped */ |
90 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [115] OBJ_pkcs7_data */ | 96 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [152] OBJ_pkcs7_digest */ |
91 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [124] OBJ_pkcs7_signed */ | 97 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [161] OBJ_pkcs7_encrypted */ |
92 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [133] OBJ_pkcs7_enveloped */ | 98 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [170] OBJ_pkcs3 */ |
93 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [142] OBJ_pkcs7_signedAndEnveloped */ | 99 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [178] OBJ_dhKeyAgreement */ |
94 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [151] OBJ_pkcs7_digest */ | 100 | 0x2B,0x0E,0x03,0x02,0x06, /* [187] OBJ_des_ecb */ |
95 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [160] OBJ_pkcs7_encrypted */ | 101 | 0x2B,0x0E,0x03,0x02,0x09, /* [192] OBJ_des_cfb64 */ |
96 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [169] OBJ_pkcs3 */ | 102 | 0x2B,0x0E,0x03,0x02,0x07, /* [197] OBJ_des_cbc */ |
97 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [177] OBJ_dhKeyAgreement */ | 103 | 0x2B,0x0E,0x03,0x02,0x11, /* [202] OBJ_des_ede_ecb */ |
98 | 0x2B,0x0E,0x03,0x02,0x06, /* [186] OBJ_des_ecb */ | 104 | 0x2B,0x06,0x01,0x04,0x01,0x81,0x3C,0x07,0x01,0x01,0x02,/* [207] OBJ_idea_cbc */ |
99 | 0x2B,0x0E,0x03,0x02,0x09, /* [191] OBJ_des_cfb64 */ | 105 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [218] OBJ_rc2_cbc */ |
100 | 0x2B,0x0E,0x03,0x02,0x07, /* [196] OBJ_des_cbc */ | 106 | 0x2B,0x0E,0x03,0x02,0x12, /* [226] OBJ_sha */ |
101 | 0x2B,0x0E,0x03,0x02,0x11, /* [201] OBJ_des_ede */ | 107 | 0x2B,0x0E,0x03,0x02,0x0F, /* [231] OBJ_shaWithRSAEncryption */ |
102 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [206] OBJ_rc2_cbc */ | 108 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [236] OBJ_des_ede3_cbc */ |
103 | 0x2B,0x0E,0x03,0x02,0x12, /* [214] OBJ_sha */ | 109 | 0x2B,0x0E,0x03,0x02,0x08, /* [244] OBJ_des_ofb64 */ |
104 | 0x2B,0x0E,0x03,0x02,0x0F, /* [219] OBJ_shaWithRSAEncryption */ | 110 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [249] OBJ_pkcs9 */ |
105 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [224] OBJ_des_ede3_cbc */ | 111 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [257] OBJ_pkcs9_emailAddress */ |
106 | 0x2B,0x0E,0x03,0x02,0x08, /* [232] OBJ_des_ofb64 */ | 112 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [266] OBJ_pkcs9_unstructuredName */ |
107 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [237] OBJ_pkcs9 */ | 113 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [275] OBJ_pkcs9_contentType */ |
108 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [245] OBJ_pkcs9_emailAddress */ | 114 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [284] OBJ_pkcs9_messageDigest */ |
109 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [254] OBJ_pkcs9_unstructuredName */ | 115 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [293] OBJ_pkcs9_signingTime */ |
110 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [263] OBJ_pkcs9_contentType */ | 116 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [302] OBJ_pkcs9_countersignature */ |
111 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [272] OBJ_pkcs9_messageDigest */ | 117 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [311] OBJ_pkcs9_challengePassword */ |
112 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [281] OBJ_pkcs9_signingTime */ | 118 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [320] OBJ_pkcs9_unstructuredAddress */ |
113 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [290] OBJ_pkcs9_countersignature */ | 119 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [329] OBJ_pkcs9_extCertAttributes */ |
114 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [299] OBJ_pkcs9_challengePassword */ | 120 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [338] OBJ_netscape */ |
115 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [308] OBJ_pkcs9_unstructuredAddress */ | 121 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [345] OBJ_netscape_cert_extension */ |
116 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [317] OBJ_pkcs9_extCertAttributes */ | 122 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [353] OBJ_netscape_data_type */ |
117 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [326] OBJ_netscape */ | 123 | 0x2B,0x0E,0x03,0x02,0x1A, /* [361] OBJ_sha1 */ |
118 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [333] OBJ_netscape_cert_extension */ | 124 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [366] OBJ_sha1WithRSAEncryption */ |
119 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [341] OBJ_netscape_data_type */ | 125 | 0x2B,0x0E,0x03,0x02,0x0D, /* [375] OBJ_dsaWithSHA */ |
120 | 0x2B,0x0E,0x03,0x02,0x1A, /* [349] OBJ_sha1 */ | 126 | 0x2B,0x0E,0x03,0x02,0x0C, /* [380] OBJ_dsa_2 */ |
121 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [354] OBJ_sha1WithRSAEncryption */ | 127 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [385] OBJ_pbeWithSHA1AndRC2_CBC */ |
122 | 0x2B,0x0E,0x03,0x02,0x0D, /* [363] OBJ_dsaWithSHA */ | 128 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [394] OBJ_id_pbkdf2 */ |
123 | 0x2B,0x0E,0x03,0x02,0x0C, /* [368] OBJ_dsa_2 */ | 129 | 0x2B,0x0E,0x03,0x02,0x1B, /* [403] OBJ_dsaWithSHA1_2 */ |
124 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [373] OBJ_pbeWithSHA1AndRC2_CBC */ | 130 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [408] OBJ_netscape_cert_type */ |
125 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [382] OBJ_pbeWithSHA1AndRC4 */ | 131 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [417] OBJ_netscape_base_url */ |
126 | 0x2B,0x0E,0x03,0x02,0x1B, /* [391] OBJ_dsaWithSHA1_2 */ | 132 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [426] OBJ_netscape_revocation_url */ |
127 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [396] OBJ_netscape_cert_type */ | 133 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [435] OBJ_netscape_ca_revocation_url */ |
128 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [405] OBJ_netscape_base_url */ | 134 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [444] OBJ_netscape_renewal_url */ |
129 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [414] OBJ_netscape_revocation_url */ | 135 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [453] OBJ_netscape_ca_policy_url */ |
130 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [423] OBJ_netscape_ca_revocation_url */ | 136 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [462] OBJ_netscape_ssl_server_name */ |
131 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [432] OBJ_netscape_renewal_url */ | 137 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [471] OBJ_netscape_comment */ |
132 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [441] OBJ_netscape_ca_policy_url */ | 138 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [480] OBJ_netscape_cert_sequence */ |
133 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [450] OBJ_netscape_ssl_server_name */ | 139 | 0x55,0x1D, /* [489] OBJ_id_ce */ |
134 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [459] OBJ_netscape_comment */ | 140 | 0x55,0x1D,0x0E, /* [491] OBJ_subject_key_identifier */ |
135 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [468] OBJ_netscape_cert_sequence */ | 141 | 0x55,0x1D,0x0F, /* [494] OBJ_key_usage */ |
136 | 0x55,0x1D, /* [477] OBJ_ld_ce */ | 142 | 0x55,0x1D,0x10, /* [497] OBJ_private_key_usage_period */ |
137 | 0x55,0x1D,0x0E, /* [479] OBJ_subject_key_identifier */ | 143 | 0x55,0x1D,0x11, /* [500] OBJ_subject_alt_name */ |
138 | 0x55,0x1D,0x0F, /* [482] OBJ_key_usage */ | 144 | 0x55,0x1D,0x12, /* [503] OBJ_issuer_alt_name */ |
139 | 0x55,0x1D,0x10, /* [485] OBJ_private_key_usage_period */ | 145 | 0x55,0x1D,0x13, /* [506] OBJ_basic_constraints */ |
140 | 0x55,0x1D,0x11, /* [488] OBJ_subject_alt_name */ | 146 | 0x55,0x1D,0x14, /* [509] OBJ_crl_number */ |
141 | 0x55,0x1D,0x12, /* [491] OBJ_issuer_alt_name */ | 147 | 0x55,0x1D,0x20, /* [512] OBJ_certificate_policies */ |
142 | 0x55,0x1D,0x13, /* [494] OBJ_basic_constraints */ | 148 | 0x55,0x1D,0x23, /* [515] OBJ_authority_key_identifier */ |
143 | 0x55,0x1D,0x14, /* [497] OBJ_crl_number */ | 149 | 0x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x02,/* [518] OBJ_bf_cbc */ |
144 | 0x55,0x1D,0x20, /* [500] OBJ_certificate_policies */ | 150 | 0x55,0x08,0x03,0x65, /* [527] OBJ_mdc2 */ |
145 | 0x55,0x1D,0x23, /* [503] OBJ_authority_key_identifier */ | 151 | 0x55,0x08,0x03,0x64, /* [531] OBJ_mdc2WithRSA */ |
146 | 0x55,0x08,0x03,0x65, /* [506] OBJ_mdc2 */ | 152 | 0x55,0x04,0x2A, /* [535] OBJ_givenName */ |
147 | 0x55,0x08,0x03,0x64, /* [510] OBJ_mdc2WithRSA */ | 153 | 0x55,0x04,0x04, /* [538] OBJ_surname */ |
148 | 0x55,0x04,0x2A, /* [514] OBJ_givenName */ | 154 | 0x55,0x04,0x2B, /* [541] OBJ_initials */ |
149 | 0x55,0x04,0x04, /* [517] OBJ_surname */ | 155 | 0x55,0x1D,0x1F, /* [544] OBJ_crl_distribution_points */ |
150 | 0x55,0x04,0x2B, /* [520] OBJ_initials */ | 156 | 0x2B,0x0E,0x03,0x02,0x03, /* [547] OBJ_md5WithRSA */ |
151 | 0x55,0x04,0x2D, /* [523] OBJ_uniqueIdentifier */ | 157 | 0x55,0x04,0x05, /* [552] OBJ_serialNumber */ |
152 | 0x55,0x1D,0x1F, /* [526] OBJ_crl_distribution_points */ | 158 | 0x55,0x04,0x0C, /* [555] OBJ_title */ |
153 | 0x2B,0x0E,0x03,0x02,0x03, /* [529] OBJ_md5WithRSA */ | 159 | 0x55,0x04,0x0D, /* [558] OBJ_description */ |
154 | 0x55,0x04,0x05, /* [534] OBJ_serialNumber */ | 160 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [561] OBJ_cast5_cbc */ |
155 | 0x55,0x04,0x0C, /* [537] OBJ_title */ | 161 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [570] OBJ_pbeWithMD5AndCast5_CBC */ |
156 | 0x55,0x04,0x0D, /* [540] OBJ_description */ | 162 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [579] OBJ_dsaWithSHA1 */ |
157 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [543] OBJ_cast5_cbc */ | 163 | 0x2B,0x0E,0x03,0x02,0x1D, /* [586] OBJ_sha1WithRSA */ |
158 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [552] OBJ_pbeWithMD5AndCast5_CBC */ | 164 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [591] OBJ_dsa */ |
159 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [561] OBJ_dsaWithSHA1 */ | 165 | 0x2B,0x24,0x03,0x02,0x01, /* [598] OBJ_ripemd160 */ |
160 | 0x2B,0x0E,0x03,0x02,0x1D, /* [568] OBJ_sha1WithRSA */ | 166 | 0x2B,0x24,0x03,0x03,0x01,0x02, /* [603] OBJ_ripemd160WithRSA */ |
161 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [573] OBJ_dsa */ | 167 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [609] OBJ_rc5_cbc */ |
162 | 0x2B,0x24,0x03,0x02,0x01, /* [580] OBJ_ripemd160 */ | 168 | 0x29,0x01,0x01,0x85,0x1A,0x01, /* [617] OBJ_rle_compression */ |
163 | 0x2B,0x24,0x03,0x03,0x01,0x02, /* [585] OBJ_ripemd160WithRSA */ | 169 | 0x29,0x01,0x01,0x85,0x1A,0x02, /* [623] OBJ_zlib_compression */ |
164 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [591] OBJ_rc5_cbc */ | 170 | 0x55,0x1D,0x25, /* [629] OBJ_ext_key_usage */ |
171 | 0x2B,0x06,0x01,0x05,0x05,0x07, /* [632] OBJ_id_pkix */ | ||
172 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03, /* [638] OBJ_id_kp */ | ||
173 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x01, /* [645] OBJ_server_auth */ | ||
174 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02, /* [653] OBJ_client_auth */ | ||
175 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03, /* [661] OBJ_code_sign */ | ||
176 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x04, /* [669] OBJ_email_protect */ | ||
177 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x08, /* [677] OBJ_time_stamp */ | ||
178 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x15,/* [685] OBJ_ms_code_ind */ | ||
179 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x16,/* [695] OBJ_ms_code_com */ | ||
180 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x01,/* [705] OBJ_ms_ctl_sign */ | ||
181 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x03,/* [715] OBJ_ms_sgc */ | ||
182 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,/* [725] OBJ_ms_efs */ | ||
183 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x04,0x01,/* [735] OBJ_ns_sgc */ | ||
184 | 0x55,0x1D,0x1B, /* [744] OBJ_delta_crl */ | ||
185 | 0x55,0x1D,0x15, /* [747] OBJ_crl_reason */ | ||
186 | 0x55,0x1D,0x18, /* [750] OBJ_invalidity_date */ | ||
187 | 0x2B,0x65,0x01,0x04,0x01, /* [753] OBJ_sxnet */ | ||
188 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [758] OBJ_pbe_WithSHA1And128BitRC4 */ | ||
189 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [768] OBJ_pbe_WithSHA1And40BitRC4 */ | ||
190 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [778] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */ | ||
191 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [788] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */ | ||
192 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [798] OBJ_pbe_WithSHA1And128BitRC2_CBC */ | ||
193 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [808] OBJ_pbe_WithSHA1And40BitRC2_CBC */ | ||
194 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [818] OBJ_keyBag */ | ||
195 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [829] OBJ_pkcs8ShroudedKeyBag */ | ||
196 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [840] OBJ_certBag */ | ||
197 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [851] OBJ_crlBag */ | ||
198 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [862] OBJ_secretBag */ | ||
199 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [873] OBJ_safeContentsBag */ | ||
200 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [884] OBJ_friendlyName */ | ||
201 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [893] OBJ_localKeyID */ | ||
202 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [902] OBJ_x509Certificate */ | ||
203 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [912] OBJ_sdsiCertificate */ | ||
204 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [922] OBJ_x509Crl */ | ||
205 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0D,/* [932] OBJ_pbes2 */ | ||
206 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0E,/* [941] OBJ_pbmac1 */ | ||
207 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x07, /* [950] OBJ_hmacWithSHA1 */ | ||
208 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01, /* [958] OBJ_id_qt_cps */ | ||
209 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02, /* [966] OBJ_id_qt_unotice */ | ||
210 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,/* [974] OBJ_SMIMECapabilities */ | ||
211 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x04,/* [983] OBJ_pbeWithMD2AndRC2_CBC */ | ||
212 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x06,/* [992] OBJ_pbeWithMD5AndRC2_CBC */ | ||
213 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0A,/* [1001] OBJ_pbeWithSHA1AndDES_CBC */ | ||
214 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x0E,/* [1010] OBJ_ms_ext_req */ | ||
215 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0E,/* [1020] OBJ_ext_req */ | ||
216 | 0x55,0x04,0x29, /* [1029] OBJ_name */ | ||
217 | 0x55,0x04,0x2E, /* [1032] OBJ_dnQualifier */ | ||
218 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01, /* [1035] OBJ_id_pe */ | ||
219 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30, /* [1042] OBJ_id_ad */ | ||
220 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01, /* [1049] OBJ_info_access */ | ||
221 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01, /* [1057] OBJ_ad_OCSP */ | ||
222 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02, /* [1065] OBJ_ad_ca_issuers */ | ||
223 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x09, /* [1073] OBJ_OCSP_sign */ | ||
224 | 0x28, /* [1081] OBJ_iso */ | ||
225 | 0x2A, /* [1082] OBJ_member_body */ | ||
226 | 0x2A,0x86,0x48, /* [1083] OBJ_ISO_US */ | ||
227 | 0x2A,0x86,0x48,0xCE,0x38, /* [1086] OBJ_X9_57 */ | ||
228 | 0x2A,0x86,0x48,0xCE,0x38,0x04, /* [1091] OBJ_X9cm */ | ||
229 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, /* [1097] OBJ_pkcs1 */ | ||
230 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05, /* [1105] OBJ_pkcs5 */ | ||
231 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,/* [1113] OBJ_SMIME */ | ||
232 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,/* [1122] OBJ_id_smime_mod */ | ||
233 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,/* [1132] OBJ_id_smime_ct */ | ||
234 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,/* [1142] OBJ_id_smime_aa */ | ||
235 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,/* [1152] OBJ_id_smime_alg */ | ||
236 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,/* [1162] OBJ_id_smime_cd */ | ||
237 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,/* [1172] OBJ_id_smime_spq */ | ||
238 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,/* [1182] OBJ_id_smime_cti */ | ||
239 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x01,/* [1192] OBJ_id_smime_mod_cms */ | ||
240 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x02,/* [1203] OBJ_id_smime_mod_ess */ | ||
241 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x03,/* [1214] OBJ_id_smime_mod_oid */ | ||
242 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x04,/* [1225] OBJ_id_smime_mod_msg_v3 */ | ||
243 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x05,/* [1236] OBJ_id_smime_mod_ets_eSignature_88 */ | ||
244 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x06,/* [1247] OBJ_id_smime_mod_ets_eSignature_97 */ | ||
245 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x07,/* [1258] OBJ_id_smime_mod_ets_eSigPolicy_88 */ | ||
246 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x08,/* [1269] OBJ_id_smime_mod_ets_eSigPolicy_97 */ | ||
247 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x01,/* [1280] OBJ_id_smime_ct_receipt */ | ||
248 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x02,/* [1291] OBJ_id_smime_ct_authData */ | ||
249 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x03,/* [1302] OBJ_id_smime_ct_publishCert */ | ||
250 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x04,/* [1313] OBJ_id_smime_ct_TSTInfo */ | ||
251 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x05,/* [1324] OBJ_id_smime_ct_TDTInfo */ | ||
252 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x06,/* [1335] OBJ_id_smime_ct_contentInfo */ | ||
253 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x07,/* [1346] OBJ_id_smime_ct_DVCSRequestData */ | ||
254 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x08,/* [1357] OBJ_id_smime_ct_DVCSResponseData */ | ||
255 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x01,/* [1368] OBJ_id_smime_aa_receiptRequest */ | ||
256 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x02,/* [1379] OBJ_id_smime_aa_securityLabel */ | ||
257 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x03,/* [1390] OBJ_id_smime_aa_mlExpandHistory */ | ||
258 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x04,/* [1401] OBJ_id_smime_aa_contentHint */ | ||
259 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x05,/* [1412] OBJ_id_smime_aa_msgSigDigest */ | ||
260 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x06,/* [1423] OBJ_id_smime_aa_encapContentType */ | ||
261 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x07,/* [1434] OBJ_id_smime_aa_contentIdentifier */ | ||
262 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x08,/* [1445] OBJ_id_smime_aa_macValue */ | ||
263 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x09,/* [1456] OBJ_id_smime_aa_equivalentLabels */ | ||
264 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0A,/* [1467] OBJ_id_smime_aa_contentReference */ | ||
265 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0B,/* [1478] OBJ_id_smime_aa_encrypKeyPref */ | ||
266 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0C,/* [1489] OBJ_id_smime_aa_signingCertificate */ | ||
267 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0D,/* [1500] OBJ_id_smime_aa_smimeEncryptCerts */ | ||
268 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0E,/* [1511] OBJ_id_smime_aa_timeStampToken */ | ||
269 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0F,/* [1522] OBJ_id_smime_aa_ets_sigPolicyId */ | ||
270 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x10,/* [1533] OBJ_id_smime_aa_ets_commitmentType */ | ||
271 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x11,/* [1544] OBJ_id_smime_aa_ets_signerLocation */ | ||
272 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x12,/* [1555] OBJ_id_smime_aa_ets_signerAttr */ | ||
273 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x13,/* [1566] OBJ_id_smime_aa_ets_otherSigCert */ | ||
274 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x14,/* [1577] OBJ_id_smime_aa_ets_contentTimestamp */ | ||
275 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x15,/* [1588] OBJ_id_smime_aa_ets_CertificateRefs */ | ||
276 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x16,/* [1599] OBJ_id_smime_aa_ets_RevocationRefs */ | ||
277 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x17,/* [1610] OBJ_id_smime_aa_ets_certValues */ | ||
278 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x18,/* [1621] OBJ_id_smime_aa_ets_revocationValues */ | ||
279 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x19,/* [1632] OBJ_id_smime_aa_ets_escTimeStamp */ | ||
280 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1A,/* [1643] OBJ_id_smime_aa_ets_certCRLTimestamp */ | ||
281 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1B,/* [1654] OBJ_id_smime_aa_ets_archiveTimeStamp */ | ||
282 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1C,/* [1665] OBJ_id_smime_aa_signatureType */ | ||
283 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1D,/* [1676] OBJ_id_smime_aa_dvcs_dvc */ | ||
284 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x01,/* [1687] OBJ_id_smime_alg_ESDHwith3DES */ | ||
285 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x02,/* [1698] OBJ_id_smime_alg_ESDHwithRC2 */ | ||
286 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x03,/* [1709] OBJ_id_smime_alg_3DESwrap */ | ||
287 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x04,/* [1720] OBJ_id_smime_alg_RC2wrap */ | ||
288 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x05,/* [1731] OBJ_id_smime_alg_ESDH */ | ||
289 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x06,/* [1742] OBJ_id_smime_alg_CMS3DESwrap */ | ||
290 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x07,/* [1753] OBJ_id_smime_alg_CMSRC2wrap */ | ||
291 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,0x01,/* [1764] OBJ_id_smime_cd_ldap */ | ||
292 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x01,/* [1775] OBJ_id_smime_spq_ets_sqt_uri */ | ||
293 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x02,/* [1786] OBJ_id_smime_spq_ets_sqt_unotice */ | ||
294 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x01,/* [1797] OBJ_id_smime_cti_ets_proofOfOrigin */ | ||
295 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x02,/* [1808] OBJ_id_smime_cti_ets_proofOfReceipt */ | ||
296 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x03,/* [1819] OBJ_id_smime_cti_ets_proofOfDelivery */ | ||
297 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x04,/* [1830] OBJ_id_smime_cti_ets_proofOfSender */ | ||
298 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x05,/* [1841] OBJ_id_smime_cti_ets_proofOfApproval */ | ||
299 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x06,/* [1852] OBJ_id_smime_cti_ets_proofOfCreation */ | ||
300 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x04, /* [1863] OBJ_md4 */ | ||
301 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00, /* [1871] OBJ_id_pkix_mod */ | ||
302 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02, /* [1878] OBJ_id_qt */ | ||
303 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04, /* [1885] OBJ_id_it */ | ||
304 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05, /* [1892] OBJ_id_pkip */ | ||
305 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06, /* [1899] OBJ_id_alg */ | ||
306 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07, /* [1906] OBJ_id_cmc */ | ||
307 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08, /* [1913] OBJ_id_on */ | ||
308 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09, /* [1920] OBJ_id_pda */ | ||
309 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A, /* [1927] OBJ_id_aca */ | ||
310 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B, /* [1934] OBJ_id_qcs */ | ||
311 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C, /* [1941] OBJ_id_cct */ | ||
312 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x01, /* [1948] OBJ_id_pkix1_explicit_88 */ | ||
313 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x02, /* [1956] OBJ_id_pkix1_implicit_88 */ | ||
314 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x03, /* [1964] OBJ_id_pkix1_explicit_93 */ | ||
315 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x04, /* [1972] OBJ_id_pkix1_implicit_93 */ | ||
316 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x05, /* [1980] OBJ_id_mod_crmf */ | ||
317 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x06, /* [1988] OBJ_id_mod_cmc */ | ||
318 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x07, /* [1996] OBJ_id_mod_kea_profile_88 */ | ||
319 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x08, /* [2004] OBJ_id_mod_kea_profile_93 */ | ||
320 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x09, /* [2012] OBJ_id_mod_cmp */ | ||
321 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0A, /* [2020] OBJ_id_mod_qualified_cert_88 */ | ||
322 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0B, /* [2028] OBJ_id_mod_qualified_cert_93 */ | ||
323 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0C, /* [2036] OBJ_id_mod_attribute_cert */ | ||
324 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0D, /* [2044] OBJ_id_mod_timestamp_protocol */ | ||
325 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0E, /* [2052] OBJ_id_mod_ocsp */ | ||
326 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0F, /* [2060] OBJ_id_mod_dvcs */ | ||
327 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x10, /* [2068] OBJ_id_mod_cmp2000 */ | ||
328 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x02, /* [2076] OBJ_biometricInfo */ | ||
329 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x03, /* [2084] OBJ_qcStatements */ | ||
330 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x04, /* [2092] OBJ_ac_auditEntity */ | ||
331 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x05, /* [2100] OBJ_ac_targeting */ | ||
332 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x06, /* [2108] OBJ_aaControls */ | ||
333 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x07, /* [2116] OBJ_sbqp_ipAddrBlock */ | ||
334 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x08, /* [2124] OBJ_sbqp_autonomousSysNum */ | ||
335 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x09, /* [2132] OBJ_sbqp_routerIdentifier */ | ||
336 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x03, /* [2140] OBJ_textNotice */ | ||
337 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x05, /* [2148] OBJ_ipsecEndSystem */ | ||
338 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x06, /* [2156] OBJ_ipsecTunnel */ | ||
339 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x07, /* [2164] OBJ_ipsecUser */ | ||
340 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x0A, /* [2172] OBJ_dvcs */ | ||
341 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x01, /* [2180] OBJ_id_it_caProtEncCert */ | ||
342 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x02, /* [2188] OBJ_id_it_signKeyPairTypes */ | ||
343 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x03, /* [2196] OBJ_id_it_encKeyPairTypes */ | ||
344 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x04, /* [2204] OBJ_id_it_preferredSymmAlg */ | ||
345 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x05, /* [2212] OBJ_id_it_caKeyUpdateInfo */ | ||
346 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x06, /* [2220] OBJ_id_it_currentCRL */ | ||
347 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x07, /* [2228] OBJ_id_it_unsupportedOIDs */ | ||
348 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x08, /* [2236] OBJ_id_it_subscriptionRequest */ | ||
349 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x09, /* [2244] OBJ_id_it_subscriptionResponse */ | ||
350 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0A, /* [2252] OBJ_id_it_keyPairParamReq */ | ||
351 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0B, /* [2260] OBJ_id_it_keyPairParamRep */ | ||
352 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0C, /* [2268] OBJ_id_it_revPassphrase */ | ||
353 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0D, /* [2276] OBJ_id_it_implicitConfirm */ | ||
354 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0E, /* [2284] OBJ_id_it_confirmWaitTime */ | ||
355 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0F, /* [2292] OBJ_id_it_origPKIMessage */ | ||
356 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01, /* [2300] OBJ_id_regCtrl */ | ||
357 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02, /* [2308] OBJ_id_regInfo */ | ||
358 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x01,/* [2316] OBJ_id_regCtrl_regToken */ | ||
359 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x02,/* [2325] OBJ_id_regCtrl_authenticator */ | ||
360 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x03,/* [2334] OBJ_id_regCtrl_pkiPublicationInfo */ | ||
361 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x04,/* [2343] OBJ_id_regCtrl_pkiArchiveOptions */ | ||
362 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x05,/* [2352] OBJ_id_regCtrl_oldCertID */ | ||
363 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x06,/* [2361] OBJ_id_regCtrl_protocolEncrKey */ | ||
364 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x01,/* [2370] OBJ_id_regInfo_utf8Pairs */ | ||
365 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x02,/* [2379] OBJ_id_regInfo_certReq */ | ||
366 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x01, /* [2388] OBJ_id_alg_des40 */ | ||
367 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x02, /* [2396] OBJ_id_alg_noSignature */ | ||
368 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x03, /* [2404] OBJ_id_alg_dh_sig_hmac_sha1 */ | ||
369 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x04, /* [2412] OBJ_id_alg_dh_pop */ | ||
370 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x01, /* [2420] OBJ_id_cmc_statusInfo */ | ||
371 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x02, /* [2428] OBJ_id_cmc_identification */ | ||
372 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x03, /* [2436] OBJ_id_cmc_identityProof */ | ||
373 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x04, /* [2444] OBJ_id_cmc_dataReturn */ | ||
374 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x05, /* [2452] OBJ_id_cmc_transactionId */ | ||
375 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x06, /* [2460] OBJ_id_cmc_senderNonce */ | ||
376 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x07, /* [2468] OBJ_id_cmc_recipientNonce */ | ||
377 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x08, /* [2476] OBJ_id_cmc_addExtensions */ | ||
378 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x09, /* [2484] OBJ_id_cmc_encryptedPOP */ | ||
379 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0A, /* [2492] OBJ_id_cmc_decryptedPOP */ | ||
380 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0B, /* [2500] OBJ_id_cmc_lraPOPWitness */ | ||
381 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0F, /* [2508] OBJ_id_cmc_getCert */ | ||
382 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x10, /* [2516] OBJ_id_cmc_getCRL */ | ||
383 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x11, /* [2524] OBJ_id_cmc_revokeRequest */ | ||
384 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x12, /* [2532] OBJ_id_cmc_regInfo */ | ||
385 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x13, /* [2540] OBJ_id_cmc_responseInfo */ | ||
386 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x15, /* [2548] OBJ_id_cmc_queryPending */ | ||
387 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x16, /* [2556] OBJ_id_cmc_popLinkRandom */ | ||
388 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x17, /* [2564] OBJ_id_cmc_popLinkWitness */ | ||
389 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x18, /* [2572] OBJ_id_cmc_confirmCertAcceptance */ | ||
390 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2580] OBJ_id_on_personalData */ | ||
391 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2588] OBJ_id_pda_dateOfBirth */ | ||
392 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2596] OBJ_id_pda_placeOfBirth */ | ||
393 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2604] OBJ_id_pda_gender */ | ||
394 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2612] OBJ_id_pda_countryOfCitizenship */ | ||
395 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2620] OBJ_id_pda_countryOfResidence */ | ||
396 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2628] OBJ_id_aca_authenticationInfo */ | ||
397 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2636] OBJ_id_aca_accessIdentity */ | ||
398 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2644] OBJ_id_aca_chargingIdentity */ | ||
399 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2652] OBJ_id_aca_group */ | ||
400 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2660] OBJ_id_aca_role */ | ||
401 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2668] OBJ_id_qcs_pkixQCSyntax_v1 */ | ||
402 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2676] OBJ_id_cct_crs */ | ||
403 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2684] OBJ_id_cct_PKIData */ | ||
404 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2692] OBJ_id_cct_PKIResponse */ | ||
405 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2700] OBJ_ad_timeStamping */ | ||
406 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2708] OBJ_ad_dvcs */ | ||
407 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2716] OBJ_id_pkix_OCSP_basic */ | ||
408 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2725] OBJ_id_pkix_OCSP_Nonce */ | ||
409 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2734] OBJ_id_pkix_OCSP_CrlID */ | ||
410 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2743] OBJ_id_pkix_OCSP_acceptableResponses */ | ||
411 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2752] OBJ_id_pkix_OCSP_noCheck */ | ||
412 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2761] OBJ_id_pkix_OCSP_archiveCutoff */ | ||
413 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2770] OBJ_id_pkix_OCSP_serviceLocator */ | ||
414 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2779] OBJ_id_pkix_OCSP_extendedStatus */ | ||
415 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2788] OBJ_id_pkix_OCSP_valid */ | ||
416 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2797] OBJ_id_pkix_OCSP_path */ | ||
417 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2806] OBJ_id_pkix_OCSP_trustRoot */ | ||
418 | 0x2B,0x0E,0x03,0x02, /* [2815] OBJ_algorithm */ | ||
419 | 0x2B,0x0E,0x03,0x02,0x0B, /* [2819] OBJ_rsaSignature */ | ||
420 | 0x55,0x08, /* [2824] OBJ_X500algorithms */ | ||
421 | 0x2B, /* [2826] OBJ_org */ | ||
422 | 0x2B,0x06, /* [2827] OBJ_dod */ | ||
423 | 0x2B,0x06,0x01, /* [2829] OBJ_iana */ | ||
424 | 0x2B,0x06,0x01,0x01, /* [2832] OBJ_Directory */ | ||
425 | 0x2B,0x06,0x01,0x02, /* [2836] OBJ_Management */ | ||
426 | 0x2B,0x06,0x01,0x03, /* [2840] OBJ_Experimental */ | ||
427 | 0x2B,0x06,0x01,0x04, /* [2844] OBJ_Private */ | ||
428 | 0x2B,0x06,0x01,0x05, /* [2848] OBJ_Security */ | ||
429 | 0x2B,0x06,0x01,0x06, /* [2852] OBJ_SNMPv2 */ | ||
430 | 0x2B,0x06,0x01,0x07, /* [2856] OBJ_Mail */ | ||
431 | 0x2B,0x06,0x01,0x04,0x01, /* [2860] OBJ_Enterprises */ | ||
432 | 0x2B,0x06,0x01,0x04,0x01,0x8B,0x3A,0x82,0x58,/* [2865] OBJ_dcObject */ | ||
433 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2874] OBJ_domainComponent */ | ||
434 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2884] OBJ_Domain */ | ||
435 | 0x50, /* [2894] OBJ_joint_iso_ccitt */ | ||
436 | 0x55,0x01,0x05, /* [2895] OBJ_selected_attribute_types */ | ||
437 | 0x55,0x01,0x05,0x37, /* [2898] OBJ_clearance */ | ||
438 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x03,/* [2902] OBJ_md4WithRSAEncryption */ | ||
439 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0A, /* [2911] OBJ_ac_proxying */ | ||
440 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0B, /* [2919] OBJ_sinfo_access */ | ||
441 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x06, /* [2927] OBJ_id_aca_encAttrs */ | ||
442 | 0x55,0x04,0x48, /* [2935] OBJ_role */ | ||
443 | 0x55,0x1D,0x24, /* [2938] OBJ_policy_constraints */ | ||
444 | 0x55,0x1D,0x37, /* [2941] OBJ_target_information */ | ||
445 | 0x55,0x1D,0x38, /* [2944] OBJ_no_rev_avail */ | ||
446 | 0x00, /* [2947] OBJ_ccitt */ | ||
447 | 0x2A,0x86,0x48,0xCE,0x3D, /* [2948] OBJ_ansi_X9_62 */ | ||
448 | 0x2A,0x86,0x48,0xCE,0x3D,0x01,0x01, /* [2953] OBJ_X9_62_prime_field */ | ||
449 | 0x2A,0x86,0x48,0xCE,0x3D,0x01,0x02, /* [2960] OBJ_X9_62_characteristic_two_field */ | ||
450 | 0x2A,0x86,0x48,0xCE,0x3D,0x02,0x01, /* [2967] OBJ_X9_62_id_ecPublicKey */ | ||
451 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x01, /* [2974] OBJ_X9_62_prime192v1 */ | ||
452 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x02, /* [2982] OBJ_X9_62_prime192v2 */ | ||
453 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x03, /* [2990] OBJ_X9_62_prime192v3 */ | ||
454 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x04, /* [2998] OBJ_X9_62_prime239v1 */ | ||
455 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x05, /* [3006] OBJ_X9_62_prime239v2 */ | ||
456 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x06, /* [3014] OBJ_X9_62_prime239v3 */ | ||
457 | 0x2A,0x86,0x48,0xCE,0x3D,0x03,0x01,0x07, /* [3022] OBJ_X9_62_prime256v1 */ | ||
458 | 0x2A,0x86,0x48,0xCE,0x3D,0x04,0x01, /* [3030] OBJ_ecdsa_with_SHA1 */ | ||
459 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x11,0x01,/* [3037] OBJ_ms_csp_name */ | ||
460 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x01,/* [3046] OBJ_aes_128_ecb */ | ||
461 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x02,/* [3055] OBJ_aes_128_cbc */ | ||
462 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x03,/* [3064] OBJ_aes_128_ofb128 */ | ||
463 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x04,/* [3073] OBJ_aes_128_cfb128 */ | ||
464 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x15,/* [3082] OBJ_aes_192_ecb */ | ||
465 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x16,/* [3091] OBJ_aes_192_cbc */ | ||
466 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x17,/* [3100] OBJ_aes_192_ofb128 */ | ||
467 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x18,/* [3109] OBJ_aes_192_cfb128 */ | ||
468 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x29,/* [3118] OBJ_aes_256_ecb */ | ||
469 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2A,/* [3127] OBJ_aes_256_cbc */ | ||
470 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2B,/* [3136] OBJ_aes_256_ofb128 */ | ||
471 | 0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2C,/* [3145] OBJ_aes_256_cfb128 */ | ||
472 | 0x55,0x1D,0x17, /* [3154] OBJ_hold_instruction_code */ | ||
473 | 0x2A,0x86,0x48,0xCE,0x38,0x02,0x01, /* [3157] OBJ_hold_instruction_none */ | ||
474 | 0x2A,0x86,0x48,0xCE,0x38,0x02,0x02, /* [3164] OBJ_hold_instruction_call_issuer */ | ||
475 | 0x2A,0x86,0x48,0xCE,0x38,0x02,0x03, /* [3171] OBJ_hold_instruction_reject */ | ||
476 | 0x09, /* [3178] OBJ_data */ | ||
477 | 0x09,0x92,0x26, /* [3179] OBJ_pss */ | ||
478 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C, /* [3182] OBJ_ucl */ | ||
479 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64, /* [3189] OBJ_pilot */ | ||
480 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,/* [3197] OBJ_pilotAttributeType */ | ||
481 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,/* [3206] OBJ_pilotAttributeSyntax */ | ||
482 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,/* [3215] OBJ_pilotObjectClass */ | ||
483 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x0A,/* [3224] OBJ_pilotGroups */ | ||
484 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,0x04,/* [3233] OBJ_iA5StringSyntax */ | ||
485 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x03,0x05,/* [3243] OBJ_caseIgnoreIA5StringSyntax */ | ||
486 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x03,/* [3253] OBJ_pilotObject */ | ||
487 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x04,/* [3263] OBJ_pilotPerson */ | ||
488 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x05,/* [3273] OBJ_account */ | ||
489 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x06,/* [3283] OBJ_document */ | ||
490 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x07,/* [3293] OBJ_room */ | ||
491 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x09,/* [3303] OBJ_documentSeries */ | ||
492 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0E,/* [3313] OBJ_rFC822localPart */ | ||
493 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0F,/* [3323] OBJ_dNSDomain */ | ||
494 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x11,/* [3333] OBJ_domainRelatedObject */ | ||
495 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x12,/* [3343] OBJ_friendlyCountry */ | ||
496 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x13,/* [3353] OBJ_simpleSecurityObject */ | ||
497 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x14,/* [3363] OBJ_pilotOrganization */ | ||
498 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x15,/* [3373] OBJ_pilotDSA */ | ||
499 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x16,/* [3383] OBJ_qualityLabelledData */ | ||
500 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x01,/* [3393] OBJ_userId */ | ||
501 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x02,/* [3403] OBJ_textEncodedORAddress */ | ||
502 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x03,/* [3413] OBJ_rfc822Mailbox */ | ||
503 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x04,/* [3423] OBJ_info */ | ||
504 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x05,/* [3433] OBJ_favouriteDrink */ | ||
505 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x06,/* [3443] OBJ_roomNumber */ | ||
506 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x07,/* [3453] OBJ_photo */ | ||
507 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x08,/* [3463] OBJ_userClass */ | ||
508 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x09,/* [3473] OBJ_host */ | ||
509 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0A,/* [3483] OBJ_manager */ | ||
510 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0B,/* [3493] OBJ_documentIdentifier */ | ||
511 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0C,/* [3503] OBJ_documentTitle */ | ||
512 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0D,/* [3513] OBJ_documentVersion */ | ||
513 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0E,/* [3523] OBJ_documentAuthor */ | ||
514 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x0F,/* [3533] OBJ_documentLocation */ | ||
515 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x14,/* [3543] OBJ_homeTelephoneNumber */ | ||
516 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x15,/* [3553] OBJ_secretary */ | ||
517 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x16,/* [3563] OBJ_otherMailbox */ | ||
518 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x17,/* [3573] OBJ_lastModifiedTime */ | ||
519 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x18,/* [3583] OBJ_lastModifiedBy */ | ||
520 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1A,/* [3593] OBJ_aRecord */ | ||
521 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1B,/* [3603] OBJ_pilotAttributeType27 */ | ||
522 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1C,/* [3613] OBJ_mXRecord */ | ||
523 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1D,/* [3623] OBJ_nSRecord */ | ||
524 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1E,/* [3633] OBJ_sOARecord */ | ||
525 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x1F,/* [3643] OBJ_cNAMERecord */ | ||
526 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x25,/* [3653] OBJ_associatedDomain */ | ||
527 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x26,/* [3663] OBJ_associatedName */ | ||
528 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x27,/* [3673] OBJ_homePostalAddress */ | ||
529 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x28,/* [3683] OBJ_personalTitle */ | ||
530 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x29,/* [3693] OBJ_mobileTelephoneNumber */ | ||
531 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2A,/* [3703] OBJ_pagerTelephoneNumber */ | ||
532 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2B,/* [3713] OBJ_friendlyCountryName */ | ||
533 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2D,/* [3723] OBJ_organizationalStatus */ | ||
534 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2E,/* [3733] OBJ_janetMailbox */ | ||
535 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x2F,/* [3743] OBJ_mailPreferenceOption */ | ||
536 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x30,/* [3753] OBJ_buildingName */ | ||
537 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x31,/* [3763] OBJ_dSAQuality */ | ||
538 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x32,/* [3773] OBJ_singleLevelQuality */ | ||
539 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x33,/* [3783] OBJ_subtreeMinimumQuality */ | ||
540 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x34,/* [3793] OBJ_subtreeMaximumQuality */ | ||
541 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x35,/* [3803] OBJ_personalSignature */ | ||
542 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x36,/* [3813] OBJ_dITRedirect */ | ||
543 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x37,/* [3823] OBJ_audio */ | ||
544 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x38,/* [3833] OBJ_documentPublisher */ | ||
545 | 0x55,0x04,0x2D, /* [3843] OBJ_x500UniqueIdentifier */ | ||
546 | 0x2B,0x06,0x01,0x07,0x01, /* [3846] OBJ_mime_mhs */ | ||
547 | 0x2B,0x06,0x01,0x07,0x01,0x01, /* [3851] OBJ_mime_mhs_headings */ | ||
548 | 0x2B,0x06,0x01,0x07,0x01,0x02, /* [3857] OBJ_mime_mhs_bodies */ | ||
549 | 0x2B,0x06,0x01,0x07,0x01,0x01,0x01, /* [3863] OBJ_id_hex_partial_message */ | ||
550 | 0x2B,0x06,0x01,0x07,0x01,0x01,0x02, /* [3870] OBJ_id_hex_multipart_message */ | ||
551 | 0x55,0x04,0x2C, /* [3877] OBJ_generationQualifier */ | ||
165 | }; | 552 | }; |
166 | 553 | ||
167 | static ASN1_OBJECT nid_objs[NUM_NID]={ | 554 | static ASN1_OBJECT nid_objs[NUM_NID]={ |
168 | {"UNDEF","undefined",NID_undef,0,NULL}, | 555 | {"UNDEF","undefined",NID_undef,1,&(lvalues[0]),0}, |
169 | {"rsadsi","rsadsi",NID_rsadsi,6,&(lvalues[0]),0}, | 556 | {"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[1]),0}, |
170 | {"pkcs","pkcs",NID_pkcs,7,&(lvalues[6]),0}, | 557 | {"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[7]),0}, |
171 | {"MD2","md2",NID_md2,8,&(lvalues[13]),0}, | 558 | {"MD2","md2",NID_md2,8,&(lvalues[14]),0}, |
172 | {"MD5","md5",NID_md5,8,&(lvalues[21]),0}, | 559 | {"MD5","md5",NID_md5,8,&(lvalues[22]),0}, |
173 | {"RC4","rc4",NID_rc4,8,&(lvalues[29]),0}, | 560 | {"RC4","rc4",NID_rc4,8,&(lvalues[30]),0}, |
174 | {"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[37]),0}, | 561 | {"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[38]),0}, |
175 | {"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9, | 562 | {"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9, |
176 | &(lvalues[46]),0}, | 563 | &(lvalues[47]),0}, |
177 | {"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9, | 564 | {"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9, |
178 | &(lvalues[55]),0}, | 565 | &(lvalues[56]),0}, |
179 | {"pbeWithMD2AndDES-CBC","pbeWithMD2AndDES-CBC", | 566 | {"PBE-MD2-DES","pbeWithMD2AndDES-CBC",NID_pbeWithMD2AndDES_CBC,9, |
180 | NID_pbeWithMD2AndDES_CBC,9,&(lvalues[64]),0}, | 567 | &(lvalues[65]),0}, |
181 | {"pbeWithMD5AndDES-CBC","pbeWithMD5AndDES-CBC", | 568 | {"PBE-MD5-DES","pbeWithMD5AndDES-CBC",NID_pbeWithMD5AndDES_CBC,9, |
182 | NID_pbeWithMD5AndDES_CBC,9,&(lvalues[73]),0}, | 569 | &(lvalues[74]),0}, |
183 | {"X500","X500",NID_X500,1,&(lvalues[82]),0}, | 570 | {"X500","directory services (X.500)",NID_X500,1,&(lvalues[83]),0}, |
184 | {"X509","X509",NID_X509,2,&(lvalues[83]),0}, | 571 | {"X509","X509",NID_X509,2,&(lvalues[84]),0}, |
185 | {"CN","commonName",NID_commonName,3,&(lvalues[85]),0}, | 572 | {"CN","commonName",NID_commonName,3,&(lvalues[86]),0}, |
186 | {"C","countryName",NID_countryName,3,&(lvalues[88]),0}, | 573 | {"C","countryName",NID_countryName,3,&(lvalues[89]),0}, |
187 | {"L","localityName",NID_localityName,3,&(lvalues[91]),0}, | 574 | {"L","localityName",NID_localityName,3,&(lvalues[92]),0}, |
188 | {"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[94]),0}, | 575 | {"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[95]),0}, |
189 | {"O","organizationName",NID_organizationName,3,&(lvalues[97]),0}, | 576 | {"O","organizationName",NID_organizationName,3,&(lvalues[98]),0}, |
190 | {"OU","organizationalUnitName",NID_organizationalUnitName,3, | 577 | {"OU","organizationalUnitName",NID_organizationalUnitName,3, |
191 | &(lvalues[100]),0}, | 578 | &(lvalues[101]),0}, |
192 | {"RSA","rsa",NID_rsa,4,&(lvalues[103]),0}, | 579 | {"RSA","rsa",NID_rsa,4,&(lvalues[104]),0}, |
193 | {"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[107]),0}, | 580 | {"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[108]),0}, |
194 | {"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[115]),0}, | 581 | {"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[116]),0}, |
195 | {"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9, | 582 | {"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9, |
196 | &(lvalues[124]),0}, | 583 | &(lvalues[125]),0}, |
197 | {"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9, | 584 | {"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9, |
198 | &(lvalues[133]),0}, | 585 | &(lvalues[134]),0}, |
199 | {"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData", | 586 | {"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData", |
200 | NID_pkcs7_signedAndEnveloped,9,&(lvalues[142]),0}, | 587 | NID_pkcs7_signedAndEnveloped,9,&(lvalues[143]),0}, |
201 | {"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9, | 588 | {"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9, |
202 | &(lvalues[151]),0}, | 589 | &(lvalues[152]),0}, |
203 | {"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9, | 590 | {"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9, |
204 | &(lvalues[160]),0}, | 591 | &(lvalues[161]),0}, |
205 | {"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[169]),0}, | 592 | {"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[170]),0}, |
206 | {"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9, | 593 | {"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9, |
207 | &(lvalues[177]),0}, | 594 | &(lvalues[178]),0}, |
208 | {"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[186]),0}, | 595 | {"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[187]),0}, |
209 | {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[191]),0}, | 596 | {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0}, |
210 | {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[196]),0}, | 597 | {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0}, |
211 | {"DES-EDE","des-ede",NID_des_ede,5,&(lvalues[201]),0}, | 598 | {"DES-EDE","des-ede",NID_des_ede_ecb,5,&(lvalues[202]),0}, |
212 | {"DES-EDE3","des-ede3",NID_des_ede3,0,NULL}, | 599 | {"DES-EDE3","des-ede3",NID_des_ede3_ecb,0,NULL}, |
213 | {"IDEA-CBC","idea-cbc",NID_idea_cbc,0,NULL}, | 600 | {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0}, |
214 | {"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL}, | 601 | {"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL}, |
215 | {"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL}, | 602 | {"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL}, |
216 | {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[206]),0}, | 603 | {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0}, |
217 | {"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL}, | 604 | {"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL}, |
218 | {"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL}, | 605 | {"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL}, |
219 | {"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL}, | 606 | {"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL}, |
220 | {"SHA","sha",NID_sha,5,&(lvalues[214]),0}, | 607 | {"SHA","sha",NID_sha,5,&(lvalues[226]),0}, |
221 | {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5, | 608 | {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5, |
222 | &(lvalues[219]),0}, | 609 | &(lvalues[231]),0}, |
223 | {"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL}, | 610 | {"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL}, |
224 | {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[224]),0}, | 611 | {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0}, |
225 | {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[232]),0}, | 612 | {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0}, |
226 | {"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL}, | 613 | {"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL}, |
227 | {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[237]),0}, | 614 | {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0}, |
228 | {"Email","emailAddress",NID_pkcs9_emailAddress,9,&(lvalues[245]),0}, | 615 | {"emailAddress","emailAddress",NID_pkcs9_emailAddress,9, |
616 | &(lvalues[257]),0}, | ||
229 | {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, | 617 | {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, |
230 | &(lvalues[254]),0}, | 618 | &(lvalues[266]),0}, |
231 | {"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[263]),0}, | 619 | {"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[275]),0}, |
232 | {"messageDigest","messageDigest",NID_pkcs9_messageDigest,9, | 620 | {"messageDigest","messageDigest",NID_pkcs9_messageDigest,9, |
233 | &(lvalues[272]),0}, | 621 | &(lvalues[284]),0}, |
234 | {"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[281]),0}, | 622 | {"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[293]),0}, |
235 | {"countersignature","countersignature",NID_pkcs9_countersignature,9, | 623 | {"countersignature","countersignature",NID_pkcs9_countersignature,9, |
236 | &(lvalues[290]),0}, | 624 | &(lvalues[302]),0}, |
237 | {"challengePassword","challengePassword",NID_pkcs9_challengePassword, | 625 | {"challengePassword","challengePassword",NID_pkcs9_challengePassword, |
238 | 9,&(lvalues[299]),0}, | 626 | 9,&(lvalues[311]),0}, |
239 | {"unstructuredAddress","unstructuredAddress", | 627 | {"unstructuredAddress","unstructuredAddress", |
240 | NID_pkcs9_unstructuredAddress,9,&(lvalues[308]),0}, | 628 | NID_pkcs9_unstructuredAddress,9,&(lvalues[320]),0}, |
241 | {"extendedCertificateAttributes","extendedCertificateAttributes", | 629 | {"extendedCertificateAttributes","extendedCertificateAttributes", |
242 | NID_pkcs9_extCertAttributes,9,&(lvalues[317]),0}, | 630 | NID_pkcs9_extCertAttributes,9,&(lvalues[329]),0}, |
243 | {"Netscape","Netscape Communications Corp.",NID_netscape,7, | 631 | {"Netscape","Netscape Communications Corp.",NID_netscape,7, |
244 | &(lvalues[326]),0}, | 632 | &(lvalues[338]),0}, |
245 | {"nsCertExt","Netscape Certificate Extension", | 633 | {"nsCertExt","Netscape Certificate Extension", |
246 | NID_netscape_cert_extension,8,&(lvalues[333]),0}, | 634 | NID_netscape_cert_extension,8,&(lvalues[345]),0}, |
247 | {"nsDataType","Netscape Data Type",NID_netscape_data_type,8, | 635 | {"nsDataType","Netscape Data Type",NID_netscape_data_type,8, |
248 | &(lvalues[341]),0}, | 636 | &(lvalues[353]),0}, |
249 | {"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL}, | 637 | {"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL}, |
250 | {"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL}, | 638 | {"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL}, |
251 | {"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL}, | 639 | {"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL}, |
252 | {"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL}, | 640 | {"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL}, |
253 | {"SHA1","sha1",NID_sha1,5,&(lvalues[349]),0}, | 641 | {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0}, |
254 | {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9, | 642 | {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9, |
255 | &(lvalues[354]),0}, | 643 | &(lvalues[366]),0}, |
256 | {"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[363]),0}, | 644 | {"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[375]),0}, |
257 | {"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[368]),0}, | 645 | {"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[380]),0}, |
258 | {"pbeWithSHA1AndRC2-CBC","pbeWithSHA1AndRC2-CBC", | 646 | {"PBE-SHA1-RC2-64","pbeWithSHA1AndRC2-CBC",NID_pbeWithSHA1AndRC2_CBC, |
259 | NID_pbeWithSHA1AndRC2_CBC,9,&(lvalues[373]),0}, | 647 | 9,&(lvalues[385]),0}, |
260 | {"pbeWithSHA1AndRC4","pbeWithSHA1AndRC4",NID_pbeWithSHA1AndRC4,9, | 648 | {"PBKDF2","PBKDF2",NID_id_pbkdf2,9,&(lvalues[394]),0}, |
261 | &(lvalues[382]),0}, | 649 | {"DSA-SHA1-old","dsaWithSHA1-old",NID_dsaWithSHA1_2,5,&(lvalues[403]),0}, |
262 | {"DSA-SHA1-old","dsaWithSHA1",NID_dsaWithSHA1_2,5,&(lvalues[391]),0}, | ||
263 | {"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9, | 650 | {"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9, |
264 | &(lvalues[396]),0}, | 651 | &(lvalues[408]),0}, |
265 | {"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9, | 652 | {"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9, |
266 | &(lvalues[405]),0}, | 653 | &(lvalues[417]),0}, |
267 | {"nsRevocationUrl","Netscape Revocation Url", | 654 | {"nsRevocationUrl","Netscape Revocation Url", |
268 | NID_netscape_revocation_url,9,&(lvalues[414]),0}, | 655 | NID_netscape_revocation_url,9,&(lvalues[426]),0}, |
269 | {"nsCaRevocationUrl","Netscape CA Revocation Url", | 656 | {"nsCaRevocationUrl","Netscape CA Revocation Url", |
270 | NID_netscape_ca_revocation_url,9,&(lvalues[423]),0}, | 657 | NID_netscape_ca_revocation_url,9,&(lvalues[435]),0}, |
271 | {"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9, | 658 | {"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9, |
272 | &(lvalues[432]),0}, | 659 | &(lvalues[444]),0}, |
273 | {"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url, | 660 | {"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url, |
274 | 9,&(lvalues[441]),0}, | 661 | 9,&(lvalues[453]),0}, |
275 | {"nsSslServerName","Netscape SSL Server Name", | 662 | {"nsSslServerName","Netscape SSL Server Name", |
276 | NID_netscape_ssl_server_name,9,&(lvalues[450]),0}, | 663 | NID_netscape_ssl_server_name,9,&(lvalues[462]),0}, |
277 | {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[459]),0}, | 664 | {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0}, |
278 | {"nsCertSequence","Netscape Certificate Sequence", | 665 | {"nsCertSequence","Netscape Certificate Sequence", |
279 | NID_netscape_cert_sequence,9,&(lvalues[468]),0}, | 666 | NID_netscape_cert_sequence,9,&(lvalues[480]),0}, |
280 | {"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL}, | 667 | {"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL}, |
281 | {"ld-ce","ld-ce",NID_ld_ce,2,&(lvalues[477]),0}, | 668 | {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0}, |
282 | {"subjectKeyIdentifier","X509v3 Subject Key Identifier", | 669 | {"subjectKeyIdentifier","X509v3 Subject Key Identifier", |
283 | NID_subject_key_identifier,3,&(lvalues[479]),0}, | 670 | NID_subject_key_identifier,3,&(lvalues[491]),0}, |
284 | {"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[482]),0}, | 671 | {"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[494]),0}, |
285 | {"privateKeyUsagePeriod","X509v3 Private Key Usage Period", | 672 | {"privateKeyUsagePeriod","X509v3 Private Key Usage Period", |
286 | NID_private_key_usage_period,3,&(lvalues[485]),0}, | 673 | NID_private_key_usage_period,3,&(lvalues[497]),0}, |
287 | {"subjectAltName","X509v3 Subject Alternative Name", | 674 | {"subjectAltName","X509v3 Subject Alternative Name", |
288 | NID_subject_alt_name,3,&(lvalues[488]),0}, | 675 | NID_subject_alt_name,3,&(lvalues[500]),0}, |
289 | {"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name, | 676 | {"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name, |
290 | 3,&(lvalues[491]),0}, | 677 | 3,&(lvalues[503]),0}, |
291 | {"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints, | 678 | {"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints, |
292 | 3,&(lvalues[494]),0}, | 679 | 3,&(lvalues[506]),0}, |
293 | {"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[497]),0}, | 680 | {"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[509]),0}, |
294 | {"certificatePolicies","X509v3 Certificate Policies", | 681 | {"certificatePolicies","X509v3 Certificate Policies", |
295 | NID_certificate_policies,3,&(lvalues[500]),0}, | 682 | NID_certificate_policies,3,&(lvalues[512]),0}, |
296 | {"authorityKeyIdentifier","X509v3 Authority Key Identifier", | 683 | {"authorityKeyIdentifier","X509v3 Authority Key Identifier", |
297 | NID_authority_key_identifier,3,&(lvalues[503]),0}, | 684 | NID_authority_key_identifier,3,&(lvalues[515]),0}, |
298 | {"BF-CBC","bf-cbc",NID_bf_cbc,0,NULL}, | 685 | {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0}, |
299 | {"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL}, | 686 | {"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL}, |
300 | {"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL}, | 687 | {"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL}, |
301 | {"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL}, | 688 | {"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL}, |
302 | {"MDC2","mdc2",NID_mdc2,4,&(lvalues[506]),0}, | 689 | {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0}, |
303 | {"RSA-MDC2","mdc2withRSA",NID_mdc2WithRSA,4,&(lvalues[510]),0}, | 690 | {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0}, |
304 | {"RC4-40","rc4-40",NID_rc4_40,0,NULL}, | 691 | {"RC4-40","rc4-40",NID_rc4_40,0,NULL}, |
305 | {"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL}, | 692 | {"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL}, |
306 | {"G","givenName",NID_givenName,3,&(lvalues[514]),0}, | 693 | {"gn","givenName",NID_givenName,3,&(lvalues[535]),0}, |
307 | {"S","surname",NID_surname,3,&(lvalues[517]),0}, | 694 | {"SN","surname",NID_surname,3,&(lvalues[538]),0}, |
308 | {"I","initials",NID_initials,3,&(lvalues[520]),0}, | 695 | {"initials","initials",NID_initials,3,&(lvalues[541]),0}, |
309 | {"UID","uniqueIdentifier",NID_uniqueIdentifier,3,&(lvalues[523]),0}, | 696 | {NULL,NULL,NID_undef,0,NULL}, |
310 | {"crlDistributionPoints","X509v3 CRL Distribution Points", | 697 | {"crlDistributionPoints","X509v3 CRL Distribution Points", |
311 | NID_crl_distribution_points,3,&(lvalues[526]),0}, | 698 | NID_crl_distribution_points,3,&(lvalues[544]),0}, |
312 | {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[529]),0}, | 699 | {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[547]),0}, |
313 | {"SN","serialNumber",NID_serialNumber,3,&(lvalues[534]),0}, | 700 | {"serialNumber","serialNumber",NID_serialNumber,3,&(lvalues[552]),0}, |
314 | {"T","title",NID_title,3,&(lvalues[537]),0}, | 701 | {"title","title",NID_title,3,&(lvalues[555]),0}, |
315 | {"D","description",NID_description,3,&(lvalues[540]),0}, | 702 | {"description","description",NID_description,3,&(lvalues[558]),0}, |
316 | {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[543]),0}, | 703 | {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[561]),0}, |
317 | {"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL}, | 704 | {"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL}, |
318 | {"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL}, | 705 | {"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL}, |
319 | {"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL}, | 706 | {"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL}, |
320 | {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC", | 707 | {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC", |
321 | NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[552]),0}, | 708 | NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[570]),0}, |
322 | {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[561]),0}, | 709 | {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[579]),0}, |
323 | {"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL}, | 710 | {"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL}, |
324 | {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[568]),0}, | 711 | {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[586]),0}, |
325 | {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[573]),0}, | 712 | {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[591]),0}, |
326 | {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[580]),0}, | 713 | {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[598]),0}, |
327 | {NULL,NULL,NID_undef,0,NULL}, | 714 | {NULL,NULL,NID_undef,0,NULL}, |
328 | {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, | 715 | {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, |
329 | &(lvalues[585]),0}, | 716 | &(lvalues[603]),0}, |
330 | {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[591]),0}, | 717 | {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[609]),0}, |
331 | {"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL}, | 718 | {"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL}, |
332 | {"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL}, | 719 | {"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL}, |
333 | {"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL}, | 720 | {"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL}, |
721 | {"RLE","run length compression",NID_rle_compression,6,&(lvalues[617]),0}, | ||
722 | {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[623]),0}, | ||
723 | {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3, | ||
724 | &(lvalues[629]),0}, | ||
725 | {"PKIX","PKIX",NID_id_pkix,6,&(lvalues[632]),0}, | ||
726 | {"id-kp","id-kp",NID_id_kp,7,&(lvalues[638]),0}, | ||
727 | {"serverAuth","TLS Web Server Authentication",NID_server_auth,8, | ||
728 | &(lvalues[645]),0}, | ||
729 | {"clientAuth","TLS Web Client Authentication",NID_client_auth,8, | ||
730 | &(lvalues[653]),0}, | ||
731 | {"codeSigning","Code Signing",NID_code_sign,8,&(lvalues[661]),0}, | ||
732 | {"emailProtection","E-mail Protection",NID_email_protect,8, | ||
733 | &(lvalues[669]),0}, | ||
734 | {"timeStamping","Time Stamping",NID_time_stamp,8,&(lvalues[677]),0}, | ||
735 | {"msCodeInd","Microsoft Individual Code Signing",NID_ms_code_ind,10, | ||
736 | &(lvalues[685]),0}, | ||
737 | {"msCodeCom","Microsoft Commercial Code Signing",NID_ms_code_com,10, | ||
738 | &(lvalues[695]),0}, | ||
739 | {"msCTLSign","Microsoft Trust List Signing",NID_ms_ctl_sign,10, | ||
740 | &(lvalues[705]),0}, | ||
741 | {"msSGC","Microsoft Server Gated Crypto",NID_ms_sgc,10,&(lvalues[715]),0}, | ||
742 | {"msEFS","Microsoft Encrypted File System",NID_ms_efs,10, | ||
743 | &(lvalues[725]),0}, | ||
744 | {"nsSGC","Netscape Server Gated Crypto",NID_ns_sgc,9,&(lvalues[735]),0}, | ||
745 | {"deltaCRL","X509v3 Delta CRL Indicator",NID_delta_crl,3, | ||
746 | &(lvalues[744]),0}, | ||
747 | {"CRLReason","X509v3 CRL Reason Code",NID_crl_reason,3,&(lvalues[747]),0}, | ||
748 | {"invalidityDate","Invalidity Date",NID_invalidity_date,3, | ||
749 | &(lvalues[750]),0}, | ||
750 | {"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[753]),0}, | ||
751 | {"PBE-SHA1-RC4-128","pbeWithSHA1And128BitRC4", | ||
752 | NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[758]),0}, | ||
753 | {"PBE-SHA1-RC4-40","pbeWithSHA1And40BitRC4", | ||
754 | NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[768]),0}, | ||
755 | {"PBE-SHA1-3DES","pbeWithSHA1And3-KeyTripleDES-CBC", | ||
756 | NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[778]),0}, | ||
757 | {"PBE-SHA1-2DES","pbeWithSHA1And2-KeyTripleDES-CBC", | ||
758 | NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[788]),0}, | ||
759 | {"PBE-SHA1-RC2-128","pbeWithSHA1And128BitRC2-CBC", | ||
760 | NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[798]),0}, | ||
761 | {"PBE-SHA1-RC2-40","pbeWithSHA1And40BitRC2-CBC", | ||
762 | NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[808]),0}, | ||
763 | {"keyBag","keyBag",NID_keyBag,11,&(lvalues[818]),0}, | ||
764 | {"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag, | ||
765 | 11,&(lvalues[829]),0}, | ||
766 | {"certBag","certBag",NID_certBag,11,&(lvalues[840]),0}, | ||
767 | {"crlBag","crlBag",NID_crlBag,11,&(lvalues[851]),0}, | ||
768 | {"secretBag","secretBag",NID_secretBag,11,&(lvalues[862]),0}, | ||
769 | {"safeContentsBag","safeContentsBag",NID_safeContentsBag,11, | ||
770 | &(lvalues[873]),0}, | ||
771 | {"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[884]),0}, | ||
772 | {"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[893]),0}, | ||
773 | {"x509Certificate","x509Certificate",NID_x509Certificate,10, | ||
774 | &(lvalues[902]),0}, | ||
775 | {"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10, | ||
776 | &(lvalues[912]),0}, | ||
777 | {"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[922]),0}, | ||
778 | {"PBES2","PBES2",NID_pbes2,9,&(lvalues[932]),0}, | ||
779 | {"PBMAC1","PBMAC1",NID_pbmac1,9,&(lvalues[941]),0}, | ||
780 | {"hmacWithSHA1","hmacWithSHA1",NID_hmacWithSHA1,8,&(lvalues[950]),0}, | ||
781 | {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[958]),0}, | ||
782 | {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8, | ||
783 | &(lvalues[966]),0}, | ||
784 | {"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL}, | ||
785 | {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9, | ||
786 | &(lvalues[974]),0}, | ||
787 | {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9, | ||
788 | &(lvalues[983]),0}, | ||
789 | {"PBE-MD5-RC2-64","pbeWithMD5AndRC2-CBC",NID_pbeWithMD5AndRC2_CBC,9, | ||
790 | &(lvalues[992]),0}, | ||
791 | {"PBE-SHA1-DES","pbeWithSHA1AndDES-CBC",NID_pbeWithSHA1AndDES_CBC,9, | ||
792 | &(lvalues[1001]),0}, | ||
793 | {"msExtReq","Microsoft Extension Request",NID_ms_ext_req,10, | ||
794 | &(lvalues[1010]),0}, | ||
795 | {"extReq","Extension Request",NID_ext_req,9,&(lvalues[1020]),0}, | ||
796 | {"name","name",NID_name,3,&(lvalues[1029]),0}, | ||
797 | {"dnQualifier","dnQualifier",NID_dnQualifier,3,&(lvalues[1032]),0}, | ||
798 | {"id-pe","id-pe",NID_id_pe,7,&(lvalues[1035]),0}, | ||
799 | {"id-ad","id-ad",NID_id_ad,7,&(lvalues[1042]),0}, | ||
800 | {"authorityInfoAccess","Authority Information Access",NID_info_access, | ||
801 | 8,&(lvalues[1049]),0}, | ||
802 | {"OCSP","OCSP",NID_ad_OCSP,8,&(lvalues[1057]),0}, | ||
803 | {"caIssuers","CA Issuers",NID_ad_ca_issuers,8,&(lvalues[1065]),0}, | ||
804 | {"OCSPSigning","OCSP Signing",NID_OCSP_sign,8,&(lvalues[1073]),0}, | ||
805 | {"ISO","iso",NID_iso,1,&(lvalues[1081]),0}, | ||
806 | {"member-body","ISO Member Body",NID_member_body,1,&(lvalues[1082]),0}, | ||
807 | {"ISO-US","ISO US Member Body",NID_ISO_US,3,&(lvalues[1083]),0}, | ||
808 | {"X9-57","X9.57",NID_X9_57,5,&(lvalues[1086]),0}, | ||
809 | {"X9cm","X9.57 CM ?",NID_X9cm,6,&(lvalues[1091]),0}, | ||
810 | {"pkcs1","pkcs1",NID_pkcs1,8,&(lvalues[1097]),0}, | ||
811 | {"pkcs5","pkcs5",NID_pkcs5,8,&(lvalues[1105]),0}, | ||
812 | {"SMIME","S/MIME",NID_SMIME,9,&(lvalues[1113]),0}, | ||
813 | {"id-smime-mod","id-smime-mod",NID_id_smime_mod,10,&(lvalues[1122]),0}, | ||
814 | {"id-smime-ct","id-smime-ct",NID_id_smime_ct,10,&(lvalues[1132]),0}, | ||
815 | {"id-smime-aa","id-smime-aa",NID_id_smime_aa,10,&(lvalues[1142]),0}, | ||
816 | {"id-smime-alg","id-smime-alg",NID_id_smime_alg,10,&(lvalues[1152]),0}, | ||
817 | {"id-smime-cd","id-smime-cd",NID_id_smime_cd,10,&(lvalues[1162]),0}, | ||
818 | {"id-smime-spq","id-smime-spq",NID_id_smime_spq,10,&(lvalues[1172]),0}, | ||
819 | {"id-smime-cti","id-smime-cti",NID_id_smime_cti,10,&(lvalues[1182]),0}, | ||
820 | {"id-smime-mod-cms","id-smime-mod-cms",NID_id_smime_mod_cms,11, | ||
821 | &(lvalues[1192]),0}, | ||
822 | {"id-smime-mod-ess","id-smime-mod-ess",NID_id_smime_mod_ess,11, | ||
823 | &(lvalues[1203]),0}, | ||
824 | {"id-smime-mod-oid","id-smime-mod-oid",NID_id_smime_mod_oid,11, | ||
825 | &(lvalues[1214]),0}, | ||
826 | {"id-smime-mod-msg-v3","id-smime-mod-msg-v3",NID_id_smime_mod_msg_v3, | ||
827 | 11,&(lvalues[1225]),0}, | ||
828 | {"id-smime-mod-ets-eSignature-88","id-smime-mod-ets-eSignature-88", | ||
829 | NID_id_smime_mod_ets_eSignature_88,11,&(lvalues[1236]),0}, | ||
830 | {"id-smime-mod-ets-eSignature-97","id-smime-mod-ets-eSignature-97", | ||
831 | NID_id_smime_mod_ets_eSignature_97,11,&(lvalues[1247]),0}, | ||
832 | {"id-smime-mod-ets-eSigPolicy-88","id-smime-mod-ets-eSigPolicy-88", | ||
833 | NID_id_smime_mod_ets_eSigPolicy_88,11,&(lvalues[1258]),0}, | ||
834 | {"id-smime-mod-ets-eSigPolicy-97","id-smime-mod-ets-eSigPolicy-97", | ||
835 | NID_id_smime_mod_ets_eSigPolicy_97,11,&(lvalues[1269]),0}, | ||
836 | {"id-smime-ct-receipt","id-smime-ct-receipt",NID_id_smime_ct_receipt, | ||
837 | 11,&(lvalues[1280]),0}, | ||
838 | {"id-smime-ct-authData","id-smime-ct-authData", | ||
839 | NID_id_smime_ct_authData,11,&(lvalues[1291]),0}, | ||
840 | {"id-smime-ct-publishCert","id-smime-ct-publishCert", | ||
841 | NID_id_smime_ct_publishCert,11,&(lvalues[1302]),0}, | ||
842 | {"id-smime-ct-TSTInfo","id-smime-ct-TSTInfo",NID_id_smime_ct_TSTInfo, | ||
843 | 11,&(lvalues[1313]),0}, | ||
844 | {"id-smime-ct-TDTInfo","id-smime-ct-TDTInfo",NID_id_smime_ct_TDTInfo, | ||
845 | 11,&(lvalues[1324]),0}, | ||
846 | {"id-smime-ct-contentInfo","id-smime-ct-contentInfo", | ||
847 | NID_id_smime_ct_contentInfo,11,&(lvalues[1335]),0}, | ||
848 | {"id-smime-ct-DVCSRequestData","id-smime-ct-DVCSRequestData", | ||
849 | NID_id_smime_ct_DVCSRequestData,11,&(lvalues[1346]),0}, | ||
850 | {"id-smime-ct-DVCSResponseData","id-smime-ct-DVCSResponseData", | ||
851 | NID_id_smime_ct_DVCSResponseData,11,&(lvalues[1357]),0}, | ||
852 | {"id-smime-aa-receiptRequest","id-smime-aa-receiptRequest", | ||
853 | NID_id_smime_aa_receiptRequest,11,&(lvalues[1368]),0}, | ||
854 | {"id-smime-aa-securityLabel","id-smime-aa-securityLabel", | ||
855 | NID_id_smime_aa_securityLabel,11,&(lvalues[1379]),0}, | ||
856 | {"id-smime-aa-mlExpandHistory","id-smime-aa-mlExpandHistory", | ||
857 | NID_id_smime_aa_mlExpandHistory,11,&(lvalues[1390]),0}, | ||
858 | {"id-smime-aa-contentHint","id-smime-aa-contentHint", | ||
859 | NID_id_smime_aa_contentHint,11,&(lvalues[1401]),0}, | ||
860 | {"id-smime-aa-msgSigDigest","id-smime-aa-msgSigDigest", | ||
861 | NID_id_smime_aa_msgSigDigest,11,&(lvalues[1412]),0}, | ||
862 | {"id-smime-aa-encapContentType","id-smime-aa-encapContentType", | ||
863 | NID_id_smime_aa_encapContentType,11,&(lvalues[1423]),0}, | ||
864 | {"id-smime-aa-contentIdentifier","id-smime-aa-contentIdentifier", | ||
865 | NID_id_smime_aa_contentIdentifier,11,&(lvalues[1434]),0}, | ||
866 | {"id-smime-aa-macValue","id-smime-aa-macValue", | ||
867 | NID_id_smime_aa_macValue,11,&(lvalues[1445]),0}, | ||
868 | {"id-smime-aa-equivalentLabels","id-smime-aa-equivalentLabels", | ||
869 | NID_id_smime_aa_equivalentLabels,11,&(lvalues[1456]),0}, | ||
870 | {"id-smime-aa-contentReference","id-smime-aa-contentReference", | ||
871 | NID_id_smime_aa_contentReference,11,&(lvalues[1467]),0}, | ||
872 | {"id-smime-aa-encrypKeyPref","id-smime-aa-encrypKeyPref", | ||
873 | NID_id_smime_aa_encrypKeyPref,11,&(lvalues[1478]),0}, | ||
874 | {"id-smime-aa-signingCertificate","id-smime-aa-signingCertificate", | ||
875 | NID_id_smime_aa_signingCertificate,11,&(lvalues[1489]),0}, | ||
876 | {"id-smime-aa-smimeEncryptCerts","id-smime-aa-smimeEncryptCerts", | ||
877 | NID_id_smime_aa_smimeEncryptCerts,11,&(lvalues[1500]),0}, | ||
878 | {"id-smime-aa-timeStampToken","id-smime-aa-timeStampToken", | ||
879 | NID_id_smime_aa_timeStampToken,11,&(lvalues[1511]),0}, | ||
880 | {"id-smime-aa-ets-sigPolicyId","id-smime-aa-ets-sigPolicyId", | ||
881 | NID_id_smime_aa_ets_sigPolicyId,11,&(lvalues[1522]),0}, | ||
882 | {"id-smime-aa-ets-commitmentType","id-smime-aa-ets-commitmentType", | ||
883 | NID_id_smime_aa_ets_commitmentType,11,&(lvalues[1533]),0}, | ||
884 | {"id-smime-aa-ets-signerLocation","id-smime-aa-ets-signerLocation", | ||
885 | NID_id_smime_aa_ets_signerLocation,11,&(lvalues[1544]),0}, | ||
886 | {"id-smime-aa-ets-signerAttr","id-smime-aa-ets-signerAttr", | ||
887 | NID_id_smime_aa_ets_signerAttr,11,&(lvalues[1555]),0}, | ||
888 | {"id-smime-aa-ets-otherSigCert","id-smime-aa-ets-otherSigCert", | ||
889 | NID_id_smime_aa_ets_otherSigCert,11,&(lvalues[1566]),0}, | ||
890 | {"id-smime-aa-ets-contentTimestamp", | ||
891 | "id-smime-aa-ets-contentTimestamp", | ||
892 | NID_id_smime_aa_ets_contentTimestamp,11,&(lvalues[1577]),0}, | ||
893 | {"id-smime-aa-ets-CertificateRefs","id-smime-aa-ets-CertificateRefs", | ||
894 | NID_id_smime_aa_ets_CertificateRefs,11,&(lvalues[1588]),0}, | ||
895 | {"id-smime-aa-ets-RevocationRefs","id-smime-aa-ets-RevocationRefs", | ||
896 | NID_id_smime_aa_ets_RevocationRefs,11,&(lvalues[1599]),0}, | ||
897 | {"id-smime-aa-ets-certValues","id-smime-aa-ets-certValues", | ||
898 | NID_id_smime_aa_ets_certValues,11,&(lvalues[1610]),0}, | ||
899 | {"id-smime-aa-ets-revocationValues", | ||
900 | "id-smime-aa-ets-revocationValues", | ||
901 | NID_id_smime_aa_ets_revocationValues,11,&(lvalues[1621]),0}, | ||
902 | {"id-smime-aa-ets-escTimeStamp","id-smime-aa-ets-escTimeStamp", | ||
903 | NID_id_smime_aa_ets_escTimeStamp,11,&(lvalues[1632]),0}, | ||
904 | {"id-smime-aa-ets-certCRLTimestamp", | ||
905 | "id-smime-aa-ets-certCRLTimestamp", | ||
906 | NID_id_smime_aa_ets_certCRLTimestamp,11,&(lvalues[1643]),0}, | ||
907 | {"id-smime-aa-ets-archiveTimeStamp", | ||
908 | "id-smime-aa-ets-archiveTimeStamp", | ||
909 | NID_id_smime_aa_ets_archiveTimeStamp,11,&(lvalues[1654]),0}, | ||
910 | {"id-smime-aa-signatureType","id-smime-aa-signatureType", | ||
911 | NID_id_smime_aa_signatureType,11,&(lvalues[1665]),0}, | ||
912 | {"id-smime-aa-dvcs-dvc","id-smime-aa-dvcs-dvc", | ||
913 | NID_id_smime_aa_dvcs_dvc,11,&(lvalues[1676]),0}, | ||
914 | {"id-smime-alg-ESDHwith3DES","id-smime-alg-ESDHwith3DES", | ||
915 | NID_id_smime_alg_ESDHwith3DES,11,&(lvalues[1687]),0}, | ||
916 | {"id-smime-alg-ESDHwithRC2","id-smime-alg-ESDHwithRC2", | ||
917 | NID_id_smime_alg_ESDHwithRC2,11,&(lvalues[1698]),0}, | ||
918 | {"id-smime-alg-3DESwrap","id-smime-alg-3DESwrap", | ||
919 | NID_id_smime_alg_3DESwrap,11,&(lvalues[1709]),0}, | ||
920 | {"id-smime-alg-RC2wrap","id-smime-alg-RC2wrap", | ||
921 | NID_id_smime_alg_RC2wrap,11,&(lvalues[1720]),0}, | ||
922 | {"id-smime-alg-ESDH","id-smime-alg-ESDH",NID_id_smime_alg_ESDH,11, | ||
923 | &(lvalues[1731]),0}, | ||
924 | {"id-smime-alg-CMS3DESwrap","id-smime-alg-CMS3DESwrap", | ||
925 | NID_id_smime_alg_CMS3DESwrap,11,&(lvalues[1742]),0}, | ||
926 | {"id-smime-alg-CMSRC2wrap","id-smime-alg-CMSRC2wrap", | ||
927 | NID_id_smime_alg_CMSRC2wrap,11,&(lvalues[1753]),0}, | ||
928 | {"id-smime-cd-ldap","id-smime-cd-ldap",NID_id_smime_cd_ldap,11, | ||
929 | &(lvalues[1764]),0}, | ||
930 | {"id-smime-spq-ets-sqt-uri","id-smime-spq-ets-sqt-uri", | ||
931 | NID_id_smime_spq_ets_sqt_uri,11,&(lvalues[1775]),0}, | ||
932 | {"id-smime-spq-ets-sqt-unotice","id-smime-spq-ets-sqt-unotice", | ||
933 | NID_id_smime_spq_ets_sqt_unotice,11,&(lvalues[1786]),0}, | ||
934 | {"id-smime-cti-ets-proofOfOrigin","id-smime-cti-ets-proofOfOrigin", | ||
935 | NID_id_smime_cti_ets_proofOfOrigin,11,&(lvalues[1797]),0}, | ||
936 | {"id-smime-cti-ets-proofOfReceipt","id-smime-cti-ets-proofOfReceipt", | ||
937 | NID_id_smime_cti_ets_proofOfReceipt,11,&(lvalues[1808]),0}, | ||
938 | {"id-smime-cti-ets-proofOfDelivery", | ||
939 | "id-smime-cti-ets-proofOfDelivery", | ||
940 | NID_id_smime_cti_ets_proofOfDelivery,11,&(lvalues[1819]),0}, | ||
941 | {"id-smime-cti-ets-proofOfSender","id-smime-cti-ets-proofOfSender", | ||
942 | NID_id_smime_cti_ets_proofOfSender,11,&(lvalues[1830]),0}, | ||
943 | {"id-smime-cti-ets-proofOfApproval", | ||
944 | "id-smime-cti-ets-proofOfApproval", | ||
945 | NID_id_smime_cti_ets_proofOfApproval,11,&(lvalues[1841]),0}, | ||
946 | {"id-smime-cti-ets-proofOfCreation", | ||
947 | "id-smime-cti-ets-proofOfCreation", | ||
948 | NID_id_smime_cti_ets_proofOfCreation,11,&(lvalues[1852]),0}, | ||
949 | {"MD4","md4",NID_md4,8,&(lvalues[1863]),0}, | ||
950 | {"id-pkix-mod","id-pkix-mod",NID_id_pkix_mod,7,&(lvalues[1871]),0}, | ||
951 | {"id-qt","id-qt",NID_id_qt,7,&(lvalues[1878]),0}, | ||
952 | {"id-it","id-it",NID_id_it,7,&(lvalues[1885]),0}, | ||
953 | {"id-pkip","id-pkip",NID_id_pkip,7,&(lvalues[1892]),0}, | ||
954 | {"id-alg","id-alg",NID_id_alg,7,&(lvalues[1899]),0}, | ||
955 | {"id-cmc","id-cmc",NID_id_cmc,7,&(lvalues[1906]),0}, | ||
956 | {"id-on","id-on",NID_id_on,7,&(lvalues[1913]),0}, | ||
957 | {"id-pda","id-pda",NID_id_pda,7,&(lvalues[1920]),0}, | ||
958 | {"id-aca","id-aca",NID_id_aca,7,&(lvalues[1927]),0}, | ||
959 | {"id-qcs","id-qcs",NID_id_qcs,7,&(lvalues[1934]),0}, | ||
960 | {"id-cct","id-cct",NID_id_cct,7,&(lvalues[1941]),0}, | ||
961 | {"id-pkix1-explicit-88","id-pkix1-explicit-88", | ||
962 | NID_id_pkix1_explicit_88,8,&(lvalues[1948]),0}, | ||
963 | {"id-pkix1-implicit-88","id-pkix1-implicit-88", | ||
964 | NID_id_pkix1_implicit_88,8,&(lvalues[1956]),0}, | ||
965 | {"id-pkix1-explicit-93","id-pkix1-explicit-93", | ||
966 | NID_id_pkix1_explicit_93,8,&(lvalues[1964]),0}, | ||
967 | {"id-pkix1-implicit-93","id-pkix1-implicit-93", | ||
968 | NID_id_pkix1_implicit_93,8,&(lvalues[1972]),0}, | ||
969 | {"id-mod-crmf","id-mod-crmf",NID_id_mod_crmf,8,&(lvalues[1980]),0}, | ||
970 | {"id-mod-cmc","id-mod-cmc",NID_id_mod_cmc,8,&(lvalues[1988]),0}, | ||
971 | {"id-mod-kea-profile-88","id-mod-kea-profile-88", | ||
972 | NID_id_mod_kea_profile_88,8,&(lvalues[1996]),0}, | ||
973 | {"id-mod-kea-profile-93","id-mod-kea-profile-93", | ||
974 | NID_id_mod_kea_profile_93,8,&(lvalues[2004]),0}, | ||
975 | {"id-mod-cmp","id-mod-cmp",NID_id_mod_cmp,8,&(lvalues[2012]),0}, | ||
976 | {"id-mod-qualified-cert-88","id-mod-qualified-cert-88", | ||
977 | NID_id_mod_qualified_cert_88,8,&(lvalues[2020]),0}, | ||
978 | {"id-mod-qualified-cert-93","id-mod-qualified-cert-93", | ||
979 | NID_id_mod_qualified_cert_93,8,&(lvalues[2028]),0}, | ||
980 | {"id-mod-attribute-cert","id-mod-attribute-cert", | ||
981 | NID_id_mod_attribute_cert,8,&(lvalues[2036]),0}, | ||
982 | {"id-mod-timestamp-protocol","id-mod-timestamp-protocol", | ||
983 | NID_id_mod_timestamp_protocol,8,&(lvalues[2044]),0}, | ||
984 | {"id-mod-ocsp","id-mod-ocsp",NID_id_mod_ocsp,8,&(lvalues[2052]),0}, | ||
985 | {"id-mod-dvcs","id-mod-dvcs",NID_id_mod_dvcs,8,&(lvalues[2060]),0}, | ||
986 | {"id-mod-cmp2000","id-mod-cmp2000",NID_id_mod_cmp2000,8, | ||
987 | &(lvalues[2068]),0}, | ||
988 | {"biometricInfo","Biometric Info",NID_biometricInfo,8,&(lvalues[2076]),0}, | ||
989 | {"qcStatements","qcStatements",NID_qcStatements,8,&(lvalues[2084]),0}, | ||
990 | {"ac-auditEntity","ac-auditEntity",NID_ac_auditEntity,8, | ||
991 | &(lvalues[2092]),0}, | ||
992 | {"ac-targeting","ac-targeting",NID_ac_targeting,8,&(lvalues[2100]),0}, | ||
993 | {"aaControls","aaControls",NID_aaControls,8,&(lvalues[2108]),0}, | ||
994 | {"sbqp-ipAddrBlock","sbqp-ipAddrBlock",NID_sbqp_ipAddrBlock,8, | ||
995 | &(lvalues[2116]),0}, | ||
996 | {"sbqp-autonomousSysNum","sbqp-autonomousSysNum", | ||
997 | NID_sbqp_autonomousSysNum,8,&(lvalues[2124]),0}, | ||
998 | {"sbqp-routerIdentifier","sbqp-routerIdentifier", | ||
999 | NID_sbqp_routerIdentifier,8,&(lvalues[2132]),0}, | ||
1000 | {"textNotice","textNotice",NID_textNotice,8,&(lvalues[2140]),0}, | ||
1001 | {"ipsecEndSystem","IPSec End System",NID_ipsecEndSystem,8, | ||
1002 | &(lvalues[2148]),0}, | ||
1003 | {"ipsecTunnel","IPSec Tunnel",NID_ipsecTunnel,8,&(lvalues[2156]),0}, | ||
1004 | {"ipsecUser","IPSec User",NID_ipsecUser,8,&(lvalues[2164]),0}, | ||
1005 | {"DVCS","dvcs",NID_dvcs,8,&(lvalues[2172]),0}, | ||
1006 | {"id-it-caProtEncCert","id-it-caProtEncCert",NID_id_it_caProtEncCert, | ||
1007 | 8,&(lvalues[2180]),0}, | ||
1008 | {"id-it-signKeyPairTypes","id-it-signKeyPairTypes", | ||
1009 | NID_id_it_signKeyPairTypes,8,&(lvalues[2188]),0}, | ||
1010 | {"id-it-encKeyPairTypes","id-it-encKeyPairTypes", | ||
1011 | NID_id_it_encKeyPairTypes,8,&(lvalues[2196]),0}, | ||
1012 | {"id-it-preferredSymmAlg","id-it-preferredSymmAlg", | ||
1013 | NID_id_it_preferredSymmAlg,8,&(lvalues[2204]),0}, | ||
1014 | {"id-it-caKeyUpdateInfo","id-it-caKeyUpdateInfo", | ||
1015 | NID_id_it_caKeyUpdateInfo,8,&(lvalues[2212]),0}, | ||
1016 | {"id-it-currentCRL","id-it-currentCRL",NID_id_it_currentCRL,8, | ||
1017 | &(lvalues[2220]),0}, | ||
1018 | {"id-it-unsupportedOIDs","id-it-unsupportedOIDs", | ||
1019 | NID_id_it_unsupportedOIDs,8,&(lvalues[2228]),0}, | ||
1020 | {"id-it-subscriptionRequest","id-it-subscriptionRequest", | ||
1021 | NID_id_it_subscriptionRequest,8,&(lvalues[2236]),0}, | ||
1022 | {"id-it-subscriptionResponse","id-it-subscriptionResponse", | ||
1023 | NID_id_it_subscriptionResponse,8,&(lvalues[2244]),0}, | ||
1024 | {"id-it-keyPairParamReq","id-it-keyPairParamReq", | ||
1025 | NID_id_it_keyPairParamReq,8,&(lvalues[2252]),0}, | ||
1026 | {"id-it-keyPairParamRep","id-it-keyPairParamRep", | ||
1027 | NID_id_it_keyPairParamRep,8,&(lvalues[2260]),0}, | ||
1028 | {"id-it-revPassphrase","id-it-revPassphrase",NID_id_it_revPassphrase, | ||
1029 | 8,&(lvalues[2268]),0}, | ||
1030 | {"id-it-implicitConfirm","id-it-implicitConfirm", | ||
1031 | NID_id_it_implicitConfirm,8,&(lvalues[2276]),0}, | ||
1032 | {"id-it-confirmWaitTime","id-it-confirmWaitTime", | ||
1033 | NID_id_it_confirmWaitTime,8,&(lvalues[2284]),0}, | ||
1034 | {"id-it-origPKIMessage","id-it-origPKIMessage", | ||
1035 | NID_id_it_origPKIMessage,8,&(lvalues[2292]),0}, | ||
1036 | {"id-regCtrl","id-regCtrl",NID_id_regCtrl,8,&(lvalues[2300]),0}, | ||
1037 | {"id-regInfo","id-regInfo",NID_id_regInfo,8,&(lvalues[2308]),0}, | ||
1038 | {"id-regCtrl-regToken","id-regCtrl-regToken",NID_id_regCtrl_regToken, | ||
1039 | 9,&(lvalues[2316]),0}, | ||
1040 | {"id-regCtrl-authenticator","id-regCtrl-authenticator", | ||
1041 | NID_id_regCtrl_authenticator,9,&(lvalues[2325]),0}, | ||
1042 | {"id-regCtrl-pkiPublicationInfo","id-regCtrl-pkiPublicationInfo", | ||
1043 | NID_id_regCtrl_pkiPublicationInfo,9,&(lvalues[2334]),0}, | ||
1044 | {"id-regCtrl-pkiArchiveOptions","id-regCtrl-pkiArchiveOptions", | ||
1045 | NID_id_regCtrl_pkiArchiveOptions,9,&(lvalues[2343]),0}, | ||
1046 | {"id-regCtrl-oldCertID","id-regCtrl-oldCertID", | ||
1047 | NID_id_regCtrl_oldCertID,9,&(lvalues[2352]),0}, | ||
1048 | {"id-regCtrl-protocolEncrKey","id-regCtrl-protocolEncrKey", | ||
1049 | NID_id_regCtrl_protocolEncrKey,9,&(lvalues[2361]),0}, | ||
1050 | {"id-regInfo-utf8Pairs","id-regInfo-utf8Pairs", | ||
1051 | NID_id_regInfo_utf8Pairs,9,&(lvalues[2370]),0}, | ||
1052 | {"id-regInfo-certReq","id-regInfo-certReq",NID_id_regInfo_certReq,9, | ||
1053 | &(lvalues[2379]),0}, | ||
1054 | {"id-alg-des40","id-alg-des40",NID_id_alg_des40,8,&(lvalues[2388]),0}, | ||
1055 | {"id-alg-noSignature","id-alg-noSignature",NID_id_alg_noSignature,8, | ||
1056 | &(lvalues[2396]),0}, | ||
1057 | {"id-alg-dh-sig-hmac-sha1","id-alg-dh-sig-hmac-sha1", | ||
1058 | NID_id_alg_dh_sig_hmac_sha1,8,&(lvalues[2404]),0}, | ||
1059 | {"id-alg-dh-pop","id-alg-dh-pop",NID_id_alg_dh_pop,8,&(lvalues[2412]),0}, | ||
1060 | {"id-cmc-statusInfo","id-cmc-statusInfo",NID_id_cmc_statusInfo,8, | ||
1061 | &(lvalues[2420]),0}, | ||
1062 | {"id-cmc-identification","id-cmc-identification", | ||
1063 | NID_id_cmc_identification,8,&(lvalues[2428]),0}, | ||
1064 | {"id-cmc-identityProof","id-cmc-identityProof", | ||
1065 | NID_id_cmc_identityProof,8,&(lvalues[2436]),0}, | ||
1066 | {"id-cmc-dataReturn","id-cmc-dataReturn",NID_id_cmc_dataReturn,8, | ||
1067 | &(lvalues[2444]),0}, | ||
1068 | {"id-cmc-transactionId","id-cmc-transactionId", | ||
1069 | NID_id_cmc_transactionId,8,&(lvalues[2452]),0}, | ||
1070 | {"id-cmc-senderNonce","id-cmc-senderNonce",NID_id_cmc_senderNonce,8, | ||
1071 | &(lvalues[2460]),0}, | ||
1072 | {"id-cmc-recipientNonce","id-cmc-recipientNonce", | ||
1073 | NID_id_cmc_recipientNonce,8,&(lvalues[2468]),0}, | ||
1074 | {"id-cmc-addExtensions","id-cmc-addExtensions", | ||
1075 | NID_id_cmc_addExtensions,8,&(lvalues[2476]),0}, | ||
1076 | {"id-cmc-encryptedPOP","id-cmc-encryptedPOP",NID_id_cmc_encryptedPOP, | ||
1077 | 8,&(lvalues[2484]),0}, | ||
1078 | {"id-cmc-decryptedPOP","id-cmc-decryptedPOP",NID_id_cmc_decryptedPOP, | ||
1079 | 8,&(lvalues[2492]),0}, | ||
1080 | {"id-cmc-lraPOPWitness","id-cmc-lraPOPWitness", | ||
1081 | NID_id_cmc_lraPOPWitness,8,&(lvalues[2500]),0}, | ||
1082 | {"id-cmc-getCert","id-cmc-getCert",NID_id_cmc_getCert,8, | ||
1083 | &(lvalues[2508]),0}, | ||
1084 | {"id-cmc-getCRL","id-cmc-getCRL",NID_id_cmc_getCRL,8,&(lvalues[2516]),0}, | ||
1085 | {"id-cmc-revokeRequest","id-cmc-revokeRequest", | ||
1086 | NID_id_cmc_revokeRequest,8,&(lvalues[2524]),0}, | ||
1087 | {"id-cmc-regInfo","id-cmc-regInfo",NID_id_cmc_regInfo,8, | ||
1088 | &(lvalues[2532]),0}, | ||
1089 | {"id-cmc-responseInfo","id-cmc-responseInfo",NID_id_cmc_responseInfo, | ||
1090 | 8,&(lvalues[2540]),0}, | ||
1091 | {"id-cmc-queryPending","id-cmc-queryPending",NID_id_cmc_queryPending, | ||
1092 | 8,&(lvalues[2548]),0}, | ||
1093 | {"id-cmc-popLinkRandom","id-cmc-popLinkRandom", | ||
1094 | NID_id_cmc_popLinkRandom,8,&(lvalues[2556]),0}, | ||
1095 | {"id-cmc-popLinkWitness","id-cmc-popLinkWitness", | ||
1096 | NID_id_cmc_popLinkWitness,8,&(lvalues[2564]),0}, | ||
1097 | {"id-cmc-confirmCertAcceptance","id-cmc-confirmCertAcceptance", | ||
1098 | NID_id_cmc_confirmCertAcceptance,8,&(lvalues[2572]),0}, | ||
1099 | {"id-on-personalData","id-on-personalData",NID_id_on_personalData,8, | ||
1100 | &(lvalues[2580]),0}, | ||
1101 | {"id-pda-dateOfBirth","id-pda-dateOfBirth",NID_id_pda_dateOfBirth,8, | ||
1102 | &(lvalues[2588]),0}, | ||
1103 | {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth, | ||
1104 | 8,&(lvalues[2596]),0}, | ||
1105 | {NULL,NULL,NID_undef,0,NULL}, | ||
1106 | {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2604]),0}, | ||
1107 | {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship", | ||
1108 | NID_id_pda_countryOfCitizenship,8,&(lvalues[2612]),0}, | ||
1109 | {"id-pda-countryOfResidence","id-pda-countryOfResidence", | ||
1110 | NID_id_pda_countryOfResidence,8,&(lvalues[2620]),0}, | ||
1111 | {"id-aca-authenticationInfo","id-aca-authenticationInfo", | ||
1112 | NID_id_aca_authenticationInfo,8,&(lvalues[2628]),0}, | ||
1113 | {"id-aca-accessIdentity","id-aca-accessIdentity", | ||
1114 | NID_id_aca_accessIdentity,8,&(lvalues[2636]),0}, | ||
1115 | {"id-aca-chargingIdentity","id-aca-chargingIdentity", | ||
1116 | NID_id_aca_chargingIdentity,8,&(lvalues[2644]),0}, | ||
1117 | {"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2652]),0}, | ||
1118 | {"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2660]),0}, | ||
1119 | {"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1", | ||
1120 | NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2668]),0}, | ||
1121 | {"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2676]),0}, | ||
1122 | {"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8, | ||
1123 | &(lvalues[2684]),0}, | ||
1124 | {"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8, | ||
1125 | &(lvalues[2692]),0}, | ||
1126 | {"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8, | ||
1127 | &(lvalues[2700]),0}, | ||
1128 | {"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2708]),0}, | ||
1129 | {"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9, | ||
1130 | &(lvalues[2716]),0}, | ||
1131 | {"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2725]),0}, | ||
1132 | {"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2734]),0}, | ||
1133 | {"acceptableResponses","Acceptable OCSP Responses", | ||
1134 | NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2743]),0}, | ||
1135 | {"noCheck","OCSP No Check",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2752]),0}, | ||
1136 | {"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff, | ||
1137 | 9,&(lvalues[2761]),0}, | ||
1138 | {"serviceLocator","OCSP Service Locator", | ||
1139 | NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2770]),0}, | ||
1140 | {"extendedStatus","Extended OCSP Status", | ||
1141 | NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2779]),0}, | ||
1142 | {"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2788]),0}, | ||
1143 | {"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2797]),0}, | ||
1144 | {"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9, | ||
1145 | &(lvalues[2806]),0}, | ||
1146 | {"algorithm","algorithm",NID_algorithm,4,&(lvalues[2815]),0}, | ||
1147 | {"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2819]),0}, | ||
1148 | {"X500algorithms","directory services - algorithms", | ||
1149 | NID_X500algorithms,2,&(lvalues[2824]),0}, | ||
1150 | {"ORG","org",NID_org,1,&(lvalues[2826]),0}, | ||
1151 | {"DOD","dod",NID_dod,2,&(lvalues[2827]),0}, | ||
1152 | {"IANA","iana",NID_iana,3,&(lvalues[2829]),0}, | ||
1153 | {"directory","Directory",NID_Directory,4,&(lvalues[2832]),0}, | ||
1154 | {"mgmt","Management",NID_Management,4,&(lvalues[2836]),0}, | ||
1155 | {"experimental","Experimental",NID_Experimental,4,&(lvalues[2840]),0}, | ||
1156 | {"private","Private",NID_Private,4,&(lvalues[2844]),0}, | ||
1157 | {"security","Security",NID_Security,4,&(lvalues[2848]),0}, | ||
1158 | {"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2852]),0}, | ||
1159 | {"Mail","Mail",NID_Mail,4,&(lvalues[2856]),0}, | ||
1160 | {"enterprises","Enterprises",NID_Enterprises,5,&(lvalues[2860]),0}, | ||
1161 | {"dcobject","dcObject",NID_dcObject,9,&(lvalues[2865]),0}, | ||
1162 | {"DC","domainComponent",NID_domainComponent,10,&(lvalues[2874]),0}, | ||
1163 | {"domain","Domain",NID_Domain,10,&(lvalues[2884]),0}, | ||
1164 | {"JOINT-ISO-CCITT","joint-iso-ccitt",NID_joint_iso_ccitt,1, | ||
1165 | &(lvalues[2894]),0}, | ||
1166 | {"selected-attribute-types","Selected Attribute Types", | ||
1167 | NID_selected_attribute_types,3,&(lvalues[2895]),0}, | ||
1168 | {"clearance","clearance",NID_clearance,4,&(lvalues[2898]),0}, | ||
1169 | {"RSA-MD4","md4WithRSAEncryption",NID_md4WithRSAEncryption,9, | ||
1170 | &(lvalues[2902]),0}, | ||
1171 | {"ac-proxying","ac-proxying",NID_ac_proxying,8,&(lvalues[2911]),0}, | ||
1172 | {"subjectInfoAccess","Subject Information Access",NID_sinfo_access,8, | ||
1173 | &(lvalues[2919]),0}, | ||
1174 | {"id-aca-encAttrs","id-aca-encAttrs",NID_id_aca_encAttrs,8, | ||
1175 | &(lvalues[2927]),0}, | ||
1176 | {"role","role",NID_role,3,&(lvalues[2935]),0}, | ||
1177 | {"policyConstraints","X509v3 Policy Constraints", | ||
1178 | NID_policy_constraints,3,&(lvalues[2938]),0}, | ||
1179 | {"targetInformation","X509v3 AC Targeting",NID_target_information,3, | ||
1180 | &(lvalues[2941]),0}, | ||
1181 | {"noRevAvail","X509v3 No Revocation Available",NID_no_rev_avail,3, | ||
1182 | &(lvalues[2944]),0}, | ||
1183 | {"CCITT","ccitt",NID_ccitt,1,&(lvalues[2947]),0}, | ||
1184 | {"ansi-X9-62","ANSI X9.62",NID_ansi_X9_62,5,&(lvalues[2948]),0}, | ||
1185 | {"prime-field","prime-field",NID_X9_62_prime_field,7,&(lvalues[2953]),0}, | ||
1186 | {"characteristic-two-field","characteristic-two-field", | ||
1187 | NID_X9_62_characteristic_two_field,7,&(lvalues[2960]),0}, | ||
1188 | {"id-ecPublicKey","id-ecPublicKey",NID_X9_62_id_ecPublicKey,7, | ||
1189 | &(lvalues[2967]),0}, | ||
1190 | {"prime192v1","prime192v1",NID_X9_62_prime192v1,8,&(lvalues[2974]),0}, | ||
1191 | {"prime192v2","prime192v2",NID_X9_62_prime192v2,8,&(lvalues[2982]),0}, | ||
1192 | {"prime192v3","prime192v3",NID_X9_62_prime192v3,8,&(lvalues[2990]),0}, | ||
1193 | {"prime239v1","prime239v1",NID_X9_62_prime239v1,8,&(lvalues[2998]),0}, | ||
1194 | {"prime239v2","prime239v2",NID_X9_62_prime239v2,8,&(lvalues[3006]),0}, | ||
1195 | {"prime239v3","prime239v3",NID_X9_62_prime239v3,8,&(lvalues[3014]),0}, | ||
1196 | {"prime256v1","prime256v1",NID_X9_62_prime256v1,8,&(lvalues[3022]),0}, | ||
1197 | {"ecdsa-with-SHA1","ecdsa-with-SHA1",NID_ecdsa_with_SHA1,7, | ||
1198 | &(lvalues[3030]),0}, | ||
1199 | {"CSPName","Microsoft CSP Name",NID_ms_csp_name,9,&(lvalues[3037]),0}, | ||
1200 | {"AES-128-ECB","aes-128-ecb",NID_aes_128_ecb,9,&(lvalues[3046]),0}, | ||
1201 | {"AES-128-CBC","aes-128-cbc",NID_aes_128_cbc,9,&(lvalues[3055]),0}, | ||
1202 | {"AES-128-OFB","aes-128-ofb",NID_aes_128_ofb128,9,&(lvalues[3064]),0}, | ||
1203 | {"AES-128-CFB","aes-128-cfb",NID_aes_128_cfb128,9,&(lvalues[3073]),0}, | ||
1204 | {"AES-192-ECB","aes-192-ecb",NID_aes_192_ecb,9,&(lvalues[3082]),0}, | ||
1205 | {"AES-192-CBC","aes-192-cbc",NID_aes_192_cbc,9,&(lvalues[3091]),0}, | ||
1206 | {"AES-192-OFB","aes-192-ofb",NID_aes_192_ofb128,9,&(lvalues[3100]),0}, | ||
1207 | {"AES-192-CFB","aes-192-cfb",NID_aes_192_cfb128,9,&(lvalues[3109]),0}, | ||
1208 | {"AES-256-ECB","aes-256-ecb",NID_aes_256_ecb,9,&(lvalues[3118]),0}, | ||
1209 | {"AES-256-CBC","aes-256-cbc",NID_aes_256_cbc,9,&(lvalues[3127]),0}, | ||
1210 | {"AES-256-OFB","aes-256-ofb",NID_aes_256_ofb128,9,&(lvalues[3136]),0}, | ||
1211 | {"AES-256-CFB","aes-256-cfb",NID_aes_256_cfb128,9,&(lvalues[3145]),0}, | ||
1212 | {"holdInstructionCode","Hold Instruction Code", | ||
1213 | NID_hold_instruction_code,3,&(lvalues[3154]),0}, | ||
1214 | {"holdInstructionNone","Hold Instruction None", | ||
1215 | NID_hold_instruction_none,7,&(lvalues[3157]),0}, | ||
1216 | {"holdInstructionCallIssuer","Hold Instruction Call Issuer", | ||
1217 | NID_hold_instruction_call_issuer,7,&(lvalues[3164]),0}, | ||
1218 | {"holdInstructionReject","Hold Instruction Reject", | ||
1219 | NID_hold_instruction_reject,7,&(lvalues[3171]),0}, | ||
1220 | {"data","data",NID_data,1,&(lvalues[3178]),0}, | ||
1221 | {"pss","pss",NID_pss,3,&(lvalues[3179]),0}, | ||
1222 | {"ucl","ucl",NID_ucl,7,&(lvalues[3182]),0}, | ||
1223 | {"pilot","pilot",NID_pilot,8,&(lvalues[3189]),0}, | ||
1224 | {"pilotAttributeType","pilotAttributeType",NID_pilotAttributeType,9, | ||
1225 | &(lvalues[3197]),0}, | ||
1226 | {"pilotAttributeSyntax","pilotAttributeSyntax", | ||
1227 | NID_pilotAttributeSyntax,9,&(lvalues[3206]),0}, | ||
1228 | {"pilotObjectClass","pilotObjectClass",NID_pilotObjectClass,9, | ||
1229 | &(lvalues[3215]),0}, | ||
1230 | {"pilotGroups","pilotGroups",NID_pilotGroups,9,&(lvalues[3224]),0}, | ||
1231 | {"iA5StringSyntax","iA5StringSyntax",NID_iA5StringSyntax,10, | ||
1232 | &(lvalues[3233]),0}, | ||
1233 | {"caseIgnoreIA5StringSyntax","caseIgnoreIA5StringSyntax", | ||
1234 | NID_caseIgnoreIA5StringSyntax,10,&(lvalues[3243]),0}, | ||
1235 | {"pilotObject","pilotObject",NID_pilotObject,10,&(lvalues[3253]),0}, | ||
1236 | {"pilotPerson","pilotPerson",NID_pilotPerson,10,&(lvalues[3263]),0}, | ||
1237 | {"account","account",NID_account,10,&(lvalues[3273]),0}, | ||
1238 | {"document","document",NID_document,10,&(lvalues[3283]),0}, | ||
1239 | {"room","room",NID_room,10,&(lvalues[3293]),0}, | ||
1240 | {"documentSeries","documentSeries",NID_documentSeries,10, | ||
1241 | &(lvalues[3303]),0}, | ||
1242 | {"rFC822localPart","rFC822localPart",NID_rFC822localPart,10, | ||
1243 | &(lvalues[3313]),0}, | ||
1244 | {"dNSDomain","dNSDomain",NID_dNSDomain,10,&(lvalues[3323]),0}, | ||
1245 | {"domainRelatedObject","domainRelatedObject",NID_domainRelatedObject, | ||
1246 | 10,&(lvalues[3333]),0}, | ||
1247 | {"friendlyCountry","friendlyCountry",NID_friendlyCountry,10, | ||
1248 | &(lvalues[3343]),0}, | ||
1249 | {"simpleSecurityObject","simpleSecurityObject", | ||
1250 | NID_simpleSecurityObject,10,&(lvalues[3353]),0}, | ||
1251 | {"pilotOrganization","pilotOrganization",NID_pilotOrganization,10, | ||
1252 | &(lvalues[3363]),0}, | ||
1253 | {"pilotDSA","pilotDSA",NID_pilotDSA,10,&(lvalues[3373]),0}, | ||
1254 | {"qualityLabelledData","qualityLabelledData",NID_qualityLabelledData, | ||
1255 | 10,&(lvalues[3383]),0}, | ||
1256 | {"UID","userId",NID_userId,10,&(lvalues[3393]),0}, | ||
1257 | {"textEncodedORAddress","textEncodedORAddress", | ||
1258 | NID_textEncodedORAddress,10,&(lvalues[3403]),0}, | ||
1259 | {"mail","rfc822Mailbox",NID_rfc822Mailbox,10,&(lvalues[3413]),0}, | ||
1260 | {"info","info",NID_info,10,&(lvalues[3423]),0}, | ||
1261 | {"favouriteDrink","favouriteDrink",NID_favouriteDrink,10, | ||
1262 | &(lvalues[3433]),0}, | ||
1263 | {"roomNumber","roomNumber",NID_roomNumber,10,&(lvalues[3443]),0}, | ||
1264 | {"photo","photo",NID_photo,10,&(lvalues[3453]),0}, | ||
1265 | {"userClass","userClass",NID_userClass,10,&(lvalues[3463]),0}, | ||
1266 | {"host","host",NID_host,10,&(lvalues[3473]),0}, | ||
1267 | {"manager","manager",NID_manager,10,&(lvalues[3483]),0}, | ||
1268 | {"documentIdentifier","documentIdentifier",NID_documentIdentifier,10, | ||
1269 | &(lvalues[3493]),0}, | ||
1270 | {"documentTitle","documentTitle",NID_documentTitle,10,&(lvalues[3503]),0}, | ||
1271 | {"documentVersion","documentVersion",NID_documentVersion,10, | ||
1272 | &(lvalues[3513]),0}, | ||
1273 | {"documentAuthor","documentAuthor",NID_documentAuthor,10, | ||
1274 | &(lvalues[3523]),0}, | ||
1275 | {"documentLocation","documentLocation",NID_documentLocation,10, | ||
1276 | &(lvalues[3533]),0}, | ||
1277 | {"homeTelephoneNumber","homeTelephoneNumber",NID_homeTelephoneNumber, | ||
1278 | 10,&(lvalues[3543]),0}, | ||
1279 | {"secretary","secretary",NID_secretary,10,&(lvalues[3553]),0}, | ||
1280 | {"otherMailbox","otherMailbox",NID_otherMailbox,10,&(lvalues[3563]),0}, | ||
1281 | {"lastModifiedTime","lastModifiedTime",NID_lastModifiedTime,10, | ||
1282 | &(lvalues[3573]),0}, | ||
1283 | {"lastModifiedBy","lastModifiedBy",NID_lastModifiedBy,10, | ||
1284 | &(lvalues[3583]),0}, | ||
1285 | {"aRecord","aRecord",NID_aRecord,10,&(lvalues[3593]),0}, | ||
1286 | {"pilotAttributeType27","pilotAttributeType27", | ||
1287 | NID_pilotAttributeType27,10,&(lvalues[3603]),0}, | ||
1288 | {"mXRecord","mXRecord",NID_mXRecord,10,&(lvalues[3613]),0}, | ||
1289 | {"nSRecord","nSRecord",NID_nSRecord,10,&(lvalues[3623]),0}, | ||
1290 | {"sOARecord","sOARecord",NID_sOARecord,10,&(lvalues[3633]),0}, | ||
1291 | {"cNAMERecord","cNAMERecord",NID_cNAMERecord,10,&(lvalues[3643]),0}, | ||
1292 | {"associatedDomain","associatedDomain",NID_associatedDomain,10, | ||
1293 | &(lvalues[3653]),0}, | ||
1294 | {"associatedName","associatedName",NID_associatedName,10, | ||
1295 | &(lvalues[3663]),0}, | ||
1296 | {"homePostalAddress","homePostalAddress",NID_homePostalAddress,10, | ||
1297 | &(lvalues[3673]),0}, | ||
1298 | {"personalTitle","personalTitle",NID_personalTitle,10,&(lvalues[3683]),0}, | ||
1299 | {"mobileTelephoneNumber","mobileTelephoneNumber", | ||
1300 | NID_mobileTelephoneNumber,10,&(lvalues[3693]),0}, | ||
1301 | {"pagerTelephoneNumber","pagerTelephoneNumber", | ||
1302 | NID_pagerTelephoneNumber,10,&(lvalues[3703]),0}, | ||
1303 | {"friendlyCountryName","friendlyCountryName",NID_friendlyCountryName, | ||
1304 | 10,&(lvalues[3713]),0}, | ||
1305 | {"organizationalStatus","organizationalStatus", | ||
1306 | NID_organizationalStatus,10,&(lvalues[3723]),0}, | ||
1307 | {"janetMailbox","janetMailbox",NID_janetMailbox,10,&(lvalues[3733]),0}, | ||
1308 | {"mailPreferenceOption","mailPreferenceOption", | ||
1309 | NID_mailPreferenceOption,10,&(lvalues[3743]),0}, | ||
1310 | {"buildingName","buildingName",NID_buildingName,10,&(lvalues[3753]),0}, | ||
1311 | {"dSAQuality","dSAQuality",NID_dSAQuality,10,&(lvalues[3763]),0}, | ||
1312 | {"singleLevelQuality","singleLevelQuality",NID_singleLevelQuality,10, | ||
1313 | &(lvalues[3773]),0}, | ||
1314 | {"subtreeMinimumQuality","subtreeMinimumQuality", | ||
1315 | NID_subtreeMinimumQuality,10,&(lvalues[3783]),0}, | ||
1316 | {"subtreeMaximumQuality","subtreeMaximumQuality", | ||
1317 | NID_subtreeMaximumQuality,10,&(lvalues[3793]),0}, | ||
1318 | {"personalSignature","personalSignature",NID_personalSignature,10, | ||
1319 | &(lvalues[3803]),0}, | ||
1320 | {"dITRedirect","dITRedirect",NID_dITRedirect,10,&(lvalues[3813]),0}, | ||
1321 | {"audio","audio",NID_audio,10,&(lvalues[3823]),0}, | ||
1322 | {"documentPublisher","documentPublisher",NID_documentPublisher,10, | ||
1323 | &(lvalues[3833]),0}, | ||
1324 | {"x500UniqueIdentifier","x500UniqueIdentifier", | ||
1325 | NID_x500UniqueIdentifier,3,&(lvalues[3843]),0}, | ||
1326 | {"mime-mhs","MIME MHS",NID_mime_mhs,5,&(lvalues[3846]),0}, | ||
1327 | {"mime-mhs-headings","mime-mhs-headings",NID_mime_mhs_headings,6, | ||
1328 | &(lvalues[3851]),0}, | ||
1329 | {"mime-mhs-bodies","mime-mhs-bodies",NID_mime_mhs_bodies,6, | ||
1330 | &(lvalues[3857]),0}, | ||
1331 | {"id-hex-partial-message","id-hex-partial-message", | ||
1332 | NID_id_hex_partial_message,7,&(lvalues[3863]),0}, | ||
1333 | {"id-hex-multipart-message","id-hex-multipart-message", | ||
1334 | NID_id_hex_multipart_message,7,&(lvalues[3870]),0}, | ||
1335 | {"generationQualifier","generationQualifier",NID_generationQualifier, | ||
1336 | 3,&(lvalues[3877]),0}, | ||
334 | }; | 1337 | }; |
335 | 1338 | ||
336 | static ASN1_OBJECT *sn_objs[NUM_SN]={ | 1339 | static ASN1_OBJECT *sn_objs[NUM_SN]={ |
1340 | &(nid_objs[364]),/* "AD_DVCS" */ | ||
1341 | &(nid_objs[419]),/* "AES-128-CBC" */ | ||
1342 | &(nid_objs[421]),/* "AES-128-CFB" */ | ||
1343 | &(nid_objs[418]),/* "AES-128-ECB" */ | ||
1344 | &(nid_objs[420]),/* "AES-128-OFB" */ | ||
1345 | &(nid_objs[423]),/* "AES-192-CBC" */ | ||
1346 | &(nid_objs[425]),/* "AES-192-CFB" */ | ||
1347 | &(nid_objs[422]),/* "AES-192-ECB" */ | ||
1348 | &(nid_objs[424]),/* "AES-192-OFB" */ | ||
1349 | &(nid_objs[427]),/* "AES-256-CBC" */ | ||
1350 | &(nid_objs[429]),/* "AES-256-CFB" */ | ||
1351 | &(nid_objs[426]),/* "AES-256-ECB" */ | ||
1352 | &(nid_objs[428]),/* "AES-256-OFB" */ | ||
337 | &(nid_objs[91]),/* "BF-CBC" */ | 1353 | &(nid_objs[91]),/* "BF-CBC" */ |
338 | &(nid_objs[93]),/* "BF-CFB" */ | 1354 | &(nid_objs[93]),/* "BF-CFB" */ |
339 | &(nid_objs[92]),/* "BF-ECB" */ | 1355 | &(nid_objs[92]),/* "BF-ECB" */ |
@@ -343,8 +1359,12 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ | |||
343 | &(nid_objs[110]),/* "CAST5-CFB" */ | 1359 | &(nid_objs[110]),/* "CAST5-CFB" */ |
344 | &(nid_objs[109]),/* "CAST5-ECB" */ | 1360 | &(nid_objs[109]),/* "CAST5-ECB" */ |
345 | &(nid_objs[111]),/* "CAST5-OFB" */ | 1361 | &(nid_objs[111]),/* "CAST5-OFB" */ |
1362 | &(nid_objs[404]),/* "CCITT" */ | ||
346 | &(nid_objs[13]),/* "CN" */ | 1363 | &(nid_objs[13]),/* "CN" */ |
347 | &(nid_objs[107]),/* "D" */ | 1364 | &(nid_objs[141]),/* "CRLReason" */ |
1365 | &(nid_objs[417]),/* "CSPName" */ | ||
1366 | &(nid_objs[367]),/* "CrlID" */ | ||
1367 | &(nid_objs[391]),/* "DC" */ | ||
348 | &(nid_objs[31]),/* "DES-CBC" */ | 1368 | &(nid_objs[31]),/* "DES-CBC" */ |
349 | &(nid_objs[30]),/* "DES-CFB" */ | 1369 | &(nid_objs[30]),/* "DES-CFB" */ |
350 | &(nid_objs[29]),/* "DES-ECB" */ | 1370 | &(nid_objs[29]),/* "DES-ECB" */ |
@@ -358,27 +1378,53 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ | |||
358 | &(nid_objs[63]),/* "DES-EDE3-OFB" */ | 1378 | &(nid_objs[63]),/* "DES-EDE3-OFB" */ |
359 | &(nid_objs[45]),/* "DES-OFB" */ | 1379 | &(nid_objs[45]),/* "DES-OFB" */ |
360 | &(nid_objs[80]),/* "DESX-CBC" */ | 1380 | &(nid_objs[80]),/* "DESX-CBC" */ |
1381 | &(nid_objs[380]),/* "DOD" */ | ||
361 | &(nid_objs[116]),/* "DSA" */ | 1382 | &(nid_objs[116]),/* "DSA" */ |
362 | &(nid_objs[66]),/* "DSA-SHA" */ | 1383 | &(nid_objs[66]),/* "DSA-SHA" */ |
363 | &(nid_objs[113]),/* "DSA-SHA1" */ | 1384 | &(nid_objs[113]),/* "DSA-SHA1" */ |
364 | &(nid_objs[70]),/* "DSA-SHA1-old" */ | 1385 | &(nid_objs[70]),/* "DSA-SHA1-old" */ |
365 | &(nid_objs[67]),/* "DSA-old" */ | 1386 | &(nid_objs[67]),/* "DSA-old" */ |
366 | &(nid_objs[48]),/* "Email" */ | 1387 | &(nid_objs[297]),/* "DVCS" */ |
367 | &(nid_objs[99]),/* "G" */ | 1388 | &(nid_objs[381]),/* "IANA" */ |
368 | &(nid_objs[101]),/* "I" */ | ||
369 | &(nid_objs[34]),/* "IDEA-CBC" */ | 1389 | &(nid_objs[34]),/* "IDEA-CBC" */ |
370 | &(nid_objs[35]),/* "IDEA-CFB" */ | 1390 | &(nid_objs[35]),/* "IDEA-CFB" */ |
371 | &(nid_objs[36]),/* "IDEA-ECB" */ | 1391 | &(nid_objs[36]),/* "IDEA-ECB" */ |
372 | &(nid_objs[46]),/* "IDEA-OFB" */ | 1392 | &(nid_objs[46]),/* "IDEA-OFB" */ |
1393 | &(nid_objs[181]),/* "ISO" */ | ||
1394 | &(nid_objs[183]),/* "ISO-US" */ | ||
1395 | &(nid_objs[393]),/* "JOINT-ISO-CCITT" */ | ||
373 | &(nid_objs[15]),/* "L" */ | 1396 | &(nid_objs[15]),/* "L" */ |
374 | &(nid_objs[ 3]),/* "MD2" */ | 1397 | &(nid_objs[ 3]),/* "MD2" */ |
1398 | &(nid_objs[257]),/* "MD4" */ | ||
375 | &(nid_objs[ 4]),/* "MD5" */ | 1399 | &(nid_objs[ 4]),/* "MD5" */ |
376 | &(nid_objs[114]),/* "MD5-SHA1" */ | 1400 | &(nid_objs[114]),/* "MD5-SHA1" */ |
377 | &(nid_objs[95]),/* "MDC2" */ | 1401 | &(nid_objs[95]),/* "MDC2" */ |
1402 | &(nid_objs[388]),/* "Mail" */ | ||
378 | &(nid_objs[57]),/* "Netscape" */ | 1403 | &(nid_objs[57]),/* "Netscape" */ |
1404 | &(nid_objs[366]),/* "Nonce" */ | ||
379 | &(nid_objs[17]),/* "O" */ | 1405 | &(nid_objs[17]),/* "O" */ |
1406 | &(nid_objs[178]),/* "OCSP" */ | ||
1407 | &(nid_objs[180]),/* "OCSPSigning" */ | ||
1408 | &(nid_objs[379]),/* "ORG" */ | ||
380 | &(nid_objs[18]),/* "OU" */ | 1409 | &(nid_objs[18]),/* "OU" */ |
1410 | &(nid_objs[ 9]),/* "PBE-MD2-DES" */ | ||
1411 | &(nid_objs[168]),/* "PBE-MD2-RC2-64" */ | ||
1412 | &(nid_objs[10]),/* "PBE-MD5-DES" */ | ||
1413 | &(nid_objs[169]),/* "PBE-MD5-RC2-64" */ | ||
1414 | &(nid_objs[147]),/* "PBE-SHA1-2DES" */ | ||
1415 | &(nid_objs[146]),/* "PBE-SHA1-3DES" */ | ||
1416 | &(nid_objs[170]),/* "PBE-SHA1-DES" */ | ||
1417 | &(nid_objs[148]),/* "PBE-SHA1-RC2-128" */ | ||
1418 | &(nid_objs[149]),/* "PBE-SHA1-RC2-40" */ | ||
1419 | &(nid_objs[68]),/* "PBE-SHA1-RC2-64" */ | ||
1420 | &(nid_objs[144]),/* "PBE-SHA1-RC4-128" */ | ||
1421 | &(nid_objs[145]),/* "PBE-SHA1-RC4-40" */ | ||
1422 | &(nid_objs[161]),/* "PBES2" */ | ||
1423 | &(nid_objs[69]),/* "PBKDF2" */ | ||
1424 | &(nid_objs[162]),/* "PBMAC1" */ | ||
1425 | &(nid_objs[127]),/* "PKIX" */ | ||
381 | &(nid_objs[98]),/* "RC2-40-CBC" */ | 1426 | &(nid_objs[98]),/* "RC2-40-CBC" */ |
1427 | &(nid_objs[166]),/* "RC2-64-CBC" */ | ||
382 | &(nid_objs[37]),/* "RC2-CBC" */ | 1428 | &(nid_objs[37]),/* "RC2-CBC" */ |
383 | &(nid_objs[39]),/* "RC2-CFB" */ | 1429 | &(nid_objs[39]),/* "RC2-CFB" */ |
384 | &(nid_objs[38]),/* "RC2-ECB" */ | 1430 | &(nid_objs[38]),/* "RC2-ECB" */ |
@@ -390,8 +1436,10 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ | |||
390 | &(nid_objs[121]),/* "RC5-ECB" */ | 1436 | &(nid_objs[121]),/* "RC5-ECB" */ |
391 | &(nid_objs[123]),/* "RC5-OFB" */ | 1437 | &(nid_objs[123]),/* "RC5-OFB" */ |
392 | &(nid_objs[117]),/* "RIPEMD160" */ | 1438 | &(nid_objs[117]),/* "RIPEMD160" */ |
1439 | &(nid_objs[124]),/* "RLE" */ | ||
393 | &(nid_objs[19]),/* "RSA" */ | 1440 | &(nid_objs[19]),/* "RSA" */ |
394 | &(nid_objs[ 7]),/* "RSA-MD2" */ | 1441 | &(nid_objs[ 7]),/* "RSA-MD2" */ |
1442 | &(nid_objs[396]),/* "RSA-MD4" */ | ||
395 | &(nid_objs[ 8]),/* "RSA-MD5" */ | 1443 | &(nid_objs[ 8]),/* "RSA-MD5" */ |
396 | &(nid_objs[96]),/* "RSA-MDC2" */ | 1444 | &(nid_objs[96]),/* "RSA-MDC2" */ |
397 | &(nid_objs[104]),/* "RSA-NP-MD5" */ | 1445 | &(nid_objs[104]),/* "RSA-NP-MD5" */ |
@@ -399,22 +1447,303 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ | |||
399 | &(nid_objs[42]),/* "RSA-SHA" */ | 1447 | &(nid_objs[42]),/* "RSA-SHA" */ |
400 | &(nid_objs[65]),/* "RSA-SHA1" */ | 1448 | &(nid_objs[65]),/* "RSA-SHA1" */ |
401 | &(nid_objs[115]),/* "RSA-SHA1-2" */ | 1449 | &(nid_objs[115]),/* "RSA-SHA1-2" */ |
402 | &(nid_objs[100]),/* "S" */ | ||
403 | &(nid_objs[41]),/* "SHA" */ | 1450 | &(nid_objs[41]),/* "SHA" */ |
404 | &(nid_objs[64]),/* "SHA1" */ | 1451 | &(nid_objs[64]),/* "SHA1" */ |
405 | &(nid_objs[105]),/* "SN" */ | 1452 | &(nid_objs[188]),/* "SMIME" */ |
1453 | &(nid_objs[167]),/* "SMIME-CAPS" */ | ||
1454 | &(nid_objs[100]),/* "SN" */ | ||
406 | &(nid_objs[16]),/* "ST" */ | 1455 | &(nid_objs[16]),/* "ST" */ |
407 | &(nid_objs[106]),/* "T" */ | 1456 | &(nid_objs[143]),/* "SXNetID" */ |
408 | &(nid_objs[102]),/* "UID" */ | 1457 | &(nid_objs[458]),/* "UID" */ |
409 | &(nid_objs[ 0]),/* "UNDEF" */ | 1458 | &(nid_objs[ 0]),/* "UNDEF" */ |
1459 | &(nid_objs[11]),/* "X500" */ | ||
1460 | &(nid_objs[378]),/* "X500algorithms" */ | ||
1461 | &(nid_objs[12]),/* "X509" */ | ||
1462 | &(nid_objs[184]),/* "X9-57" */ | ||
1463 | &(nid_objs[185]),/* "X9cm" */ | ||
1464 | &(nid_objs[125]),/* "ZLIB" */ | ||
1465 | &(nid_objs[478]),/* "aRecord" */ | ||
1466 | &(nid_objs[289]),/* "aaControls" */ | ||
1467 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
1468 | &(nid_objs[397]),/* "ac-proxying" */ | ||
1469 | &(nid_objs[288]),/* "ac-targeting" */ | ||
1470 | &(nid_objs[368]),/* "acceptableResponses" */ | ||
1471 | &(nid_objs[446]),/* "account" */ | ||
1472 | &(nid_objs[363]),/* "ad_timestamping" */ | ||
1473 | &(nid_objs[376]),/* "algorithm" */ | ||
1474 | &(nid_objs[405]),/* "ansi-X9-62" */ | ||
1475 | &(nid_objs[370]),/* "archiveCutoff" */ | ||
1476 | &(nid_objs[484]),/* "associatedDomain" */ | ||
1477 | &(nid_objs[485]),/* "associatedName" */ | ||
1478 | &(nid_objs[501]),/* "audio" */ | ||
1479 | &(nid_objs[177]),/* "authorityInfoAccess" */ | ||
410 | &(nid_objs[90]),/* "authorityKeyIdentifier" */ | 1480 | &(nid_objs[90]),/* "authorityKeyIdentifier" */ |
411 | &(nid_objs[87]),/* "basicConstraints" */ | 1481 | &(nid_objs[87]),/* "basicConstraints" */ |
1482 | &(nid_objs[365]),/* "basicOCSPResponse" */ | ||
1483 | &(nid_objs[285]),/* "biometricInfo" */ | ||
1484 | &(nid_objs[494]),/* "buildingName" */ | ||
1485 | &(nid_objs[483]),/* "cNAMERecord" */ | ||
1486 | &(nid_objs[179]),/* "caIssuers" */ | ||
1487 | &(nid_objs[443]),/* "caseIgnoreIA5StringSyntax" */ | ||
1488 | &(nid_objs[152]),/* "certBag" */ | ||
412 | &(nid_objs[89]),/* "certificatePolicies" */ | 1489 | &(nid_objs[89]),/* "certificatePolicies" */ |
1490 | &(nid_objs[54]),/* "challengePassword" */ | ||
1491 | &(nid_objs[407]),/* "characteristic-two-field" */ | ||
1492 | &(nid_objs[395]),/* "clearance" */ | ||
1493 | &(nid_objs[130]),/* "clientAuth" */ | ||
1494 | &(nid_objs[131]),/* "codeSigning" */ | ||
1495 | &(nid_objs[50]),/* "contentType" */ | ||
1496 | &(nid_objs[53]),/* "countersignature" */ | ||
1497 | &(nid_objs[153]),/* "crlBag" */ | ||
413 | &(nid_objs[103]),/* "crlDistributionPoints" */ | 1498 | &(nid_objs[103]),/* "crlDistributionPoints" */ |
414 | &(nid_objs[88]),/* "crlNumber" */ | 1499 | &(nid_objs[88]),/* "crlNumber" */ |
1500 | &(nid_objs[500]),/* "dITRedirect" */ | ||
1501 | &(nid_objs[451]),/* "dNSDomain" */ | ||
1502 | &(nid_objs[495]),/* "dSAQuality" */ | ||
1503 | &(nid_objs[434]),/* "data" */ | ||
1504 | &(nid_objs[390]),/* "dcobject" */ | ||
1505 | &(nid_objs[140]),/* "deltaCRL" */ | ||
1506 | &(nid_objs[107]),/* "description" */ | ||
1507 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
1508 | &(nid_objs[382]),/* "directory" */ | ||
1509 | &(nid_objs[174]),/* "dnQualifier" */ | ||
1510 | &(nid_objs[447]),/* "document" */ | ||
1511 | &(nid_objs[471]),/* "documentAuthor" */ | ||
1512 | &(nid_objs[468]),/* "documentIdentifier" */ | ||
1513 | &(nid_objs[472]),/* "documentLocation" */ | ||
1514 | &(nid_objs[502]),/* "documentPublisher" */ | ||
1515 | &(nid_objs[449]),/* "documentSeries" */ | ||
1516 | &(nid_objs[469]),/* "documentTitle" */ | ||
1517 | &(nid_objs[470]),/* "documentVersion" */ | ||
1518 | &(nid_objs[392]),/* "domain" */ | ||
1519 | &(nid_objs[452]),/* "domainRelatedObject" */ | ||
1520 | &(nid_objs[416]),/* "ecdsa-with-SHA1" */ | ||
1521 | &(nid_objs[48]),/* "emailAddress" */ | ||
1522 | &(nid_objs[132]),/* "emailProtection" */ | ||
1523 | &(nid_objs[389]),/* "enterprises" */ | ||
1524 | &(nid_objs[384]),/* "experimental" */ | ||
1525 | &(nid_objs[172]),/* "extReq" */ | ||
1526 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
1527 | &(nid_objs[126]),/* "extendedKeyUsage" */ | ||
1528 | &(nid_objs[372]),/* "extendedStatus" */ | ||
1529 | &(nid_objs[462]),/* "favouriteDrink" */ | ||
1530 | &(nid_objs[453]),/* "friendlyCountry" */ | ||
1531 | &(nid_objs[490]),/* "friendlyCountryName" */ | ||
1532 | &(nid_objs[156]),/* "friendlyName" */ | ||
1533 | &(nid_objs[509]),/* "generationQualifier" */ | ||
1534 | &(nid_objs[99]),/* "gn" */ | ||
1535 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
1536 | &(nid_objs[432]),/* "holdInstructionCallIssuer" */ | ||
1537 | &(nid_objs[430]),/* "holdInstructionCode" */ | ||
1538 | &(nid_objs[431]),/* "holdInstructionNone" */ | ||
1539 | &(nid_objs[433]),/* "holdInstructionReject" */ | ||
1540 | &(nid_objs[486]),/* "homePostalAddress" */ | ||
1541 | &(nid_objs[473]),/* "homeTelephoneNumber" */ | ||
1542 | &(nid_objs[466]),/* "host" */ | ||
1543 | &(nid_objs[442]),/* "iA5StringSyntax" */ | ||
1544 | &(nid_objs[266]),/* "id-aca" */ | ||
1545 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
1546 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
1547 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
1548 | &(nid_objs[399]),/* "id-aca-encAttrs" */ | ||
1549 | &(nid_objs[357]),/* "id-aca-group" */ | ||
1550 | &(nid_objs[358]),/* "id-aca-role" */ | ||
1551 | &(nid_objs[176]),/* "id-ad" */ | ||
1552 | &(nid_objs[262]),/* "id-alg" */ | ||
1553 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
1554 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
1555 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
1556 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
1557 | &(nid_objs[268]),/* "id-cct" */ | ||
1558 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
1559 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
1560 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
1561 | &(nid_objs[81]),/* "id-ce" */ | ||
1562 | &(nid_objs[263]),/* "id-cmc" */ | ||
1563 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
1564 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
1565 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
1566 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
1567 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
1568 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
1569 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
1570 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
1571 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
1572 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
1573 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
1574 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
1575 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
1576 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
1577 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
1578 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
1579 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
1580 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
1581 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
1582 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
1583 | &(nid_objs[408]),/* "id-ecPublicKey" */ | ||
1584 | &(nid_objs[508]),/* "id-hex-multipart-message" */ | ||
1585 | &(nid_objs[507]),/* "id-hex-partial-message" */ | ||
1586 | &(nid_objs[260]),/* "id-it" */ | ||
1587 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
1588 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
1589 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
1590 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
1591 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
1592 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
1593 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
1594 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
1595 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
1596 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
1597 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
1598 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
1599 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
1600 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
1601 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
1602 | &(nid_objs[128]),/* "id-kp" */ | ||
1603 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
1604 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
1605 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
1606 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
1607 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
1608 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
1609 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
1610 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
1611 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
1612 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
1613 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
1614 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
1615 | &(nid_objs[264]),/* "id-on" */ | ||
1616 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
1617 | &(nid_objs[265]),/* "id-pda" */ | ||
1618 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
1619 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
1620 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
1621 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
1622 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
1623 | &(nid_objs[175]),/* "id-pe" */ | ||
1624 | &(nid_objs[261]),/* "id-pkip" */ | ||
1625 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
1626 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
1627 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
1628 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
1629 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
1630 | &(nid_objs[267]),/* "id-qcs" */ | ||
1631 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
1632 | &(nid_objs[259]),/* "id-qt" */ | ||
1633 | &(nid_objs[164]),/* "id-qt-cps" */ | ||
1634 | &(nid_objs[165]),/* "id-qt-unotice" */ | ||
1635 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
1636 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
1637 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
1638 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
1639 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
1640 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
1641 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
1642 | &(nid_objs[314]),/* "id-regInfo" */ | ||
1643 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
1644 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
1645 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
1646 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
1647 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
1648 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
1649 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
1650 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
1651 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
1652 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
1653 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
1654 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
1655 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
1656 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
1657 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
1658 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
1659 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
1660 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
1661 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
1662 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
1663 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
1664 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
1665 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
1666 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
1667 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
1668 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
1669 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
1670 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
1671 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
1672 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
1673 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
1674 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
1675 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
1676 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
1677 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
1678 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
1679 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
1680 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
1681 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
1682 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
1683 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
1684 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
1685 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
1686 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
1687 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
1688 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
1689 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
1690 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
1691 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
1692 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
1693 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
1694 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
1695 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
1696 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
1697 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
1698 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
1699 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
1700 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
1701 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
1702 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
1703 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
1704 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
1705 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
1706 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
1707 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
1708 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
1709 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
1710 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
1711 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
1712 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
1713 | &(nid_objs[461]),/* "info" */ | ||
1714 | &(nid_objs[101]),/* "initials" */ | ||
1715 | &(nid_objs[142]),/* "invalidityDate" */ | ||
1716 | &(nid_objs[294]),/* "ipsecEndSystem" */ | ||
1717 | &(nid_objs[295]),/* "ipsecTunnel" */ | ||
1718 | &(nid_objs[296]),/* "ipsecUser" */ | ||
415 | &(nid_objs[86]),/* "issuerAltName" */ | 1719 | &(nid_objs[86]),/* "issuerAltName" */ |
1720 | &(nid_objs[492]),/* "janetMailbox" */ | ||
1721 | &(nid_objs[150]),/* "keyBag" */ | ||
416 | &(nid_objs[83]),/* "keyUsage" */ | 1722 | &(nid_objs[83]),/* "keyUsage" */ |
417 | &(nid_objs[81]),/* "ld-ce" */ | 1723 | &(nid_objs[477]),/* "lastModifiedBy" */ |
1724 | &(nid_objs[476]),/* "lastModifiedTime" */ | ||
1725 | &(nid_objs[157]),/* "localKeyID" */ | ||
1726 | &(nid_objs[480]),/* "mXRecord" */ | ||
1727 | &(nid_objs[460]),/* "mail" */ | ||
1728 | &(nid_objs[493]),/* "mailPreferenceOption" */ | ||
1729 | &(nid_objs[467]),/* "manager" */ | ||
1730 | &(nid_objs[182]),/* "member-body" */ | ||
1731 | &(nid_objs[51]),/* "messageDigest" */ | ||
1732 | &(nid_objs[383]),/* "mgmt" */ | ||
1733 | &(nid_objs[504]),/* "mime-mhs" */ | ||
1734 | &(nid_objs[506]),/* "mime-mhs-bodies" */ | ||
1735 | &(nid_objs[505]),/* "mime-mhs-headings" */ | ||
1736 | &(nid_objs[488]),/* "mobileTelephoneNumber" */ | ||
1737 | &(nid_objs[136]),/* "msCTLSign" */ | ||
1738 | &(nid_objs[135]),/* "msCodeCom" */ | ||
1739 | &(nid_objs[134]),/* "msCodeInd" */ | ||
1740 | &(nid_objs[138]),/* "msEFS" */ | ||
1741 | &(nid_objs[171]),/* "msExtReq" */ | ||
1742 | &(nid_objs[137]),/* "msSGC" */ | ||
1743 | &(nid_objs[481]),/* "nSRecord" */ | ||
1744 | &(nid_objs[173]),/* "name" */ | ||
1745 | &(nid_objs[369]),/* "noCheck" */ | ||
1746 | &(nid_objs[403]),/* "noRevAvail" */ | ||
418 | &(nid_objs[72]),/* "nsBaseUrl" */ | 1747 | &(nid_objs[72]),/* "nsBaseUrl" */ |
419 | &(nid_objs[76]),/* "nsCaPolicyUrl" */ | 1748 | &(nid_objs[76]),/* "nsCaPolicyUrl" */ |
420 | &(nid_objs[74]),/* "nsCaRevocationUrl" */ | 1749 | &(nid_objs[74]),/* "nsCaRevocationUrl" */ |
@@ -425,13 +1754,134 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ | |||
425 | &(nid_objs[59]),/* "nsDataType" */ | 1754 | &(nid_objs[59]),/* "nsDataType" */ |
426 | &(nid_objs[75]),/* "nsRenewalUrl" */ | 1755 | &(nid_objs[75]),/* "nsRenewalUrl" */ |
427 | &(nid_objs[73]),/* "nsRevocationUrl" */ | 1756 | &(nid_objs[73]),/* "nsRevocationUrl" */ |
1757 | &(nid_objs[139]),/* "nsSGC" */ | ||
428 | &(nid_objs[77]),/* "nsSslServerName" */ | 1758 | &(nid_objs[77]),/* "nsSslServerName" */ |
1759 | &(nid_objs[491]),/* "organizationalStatus" */ | ||
1760 | &(nid_objs[475]),/* "otherMailbox" */ | ||
1761 | &(nid_objs[489]),/* "pagerTelephoneNumber" */ | ||
1762 | &(nid_objs[374]),/* "path" */ | ||
1763 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
1764 | &(nid_objs[499]),/* "personalSignature" */ | ||
1765 | &(nid_objs[487]),/* "personalTitle" */ | ||
1766 | &(nid_objs[464]),/* "photo" */ | ||
1767 | &(nid_objs[437]),/* "pilot" */ | ||
1768 | &(nid_objs[439]),/* "pilotAttributeSyntax" */ | ||
1769 | &(nid_objs[438]),/* "pilotAttributeType" */ | ||
1770 | &(nid_objs[479]),/* "pilotAttributeType27" */ | ||
1771 | &(nid_objs[456]),/* "pilotDSA" */ | ||
1772 | &(nid_objs[441]),/* "pilotGroups" */ | ||
1773 | &(nid_objs[444]),/* "pilotObject" */ | ||
1774 | &(nid_objs[440]),/* "pilotObjectClass" */ | ||
1775 | &(nid_objs[455]),/* "pilotOrganization" */ | ||
1776 | &(nid_objs[445]),/* "pilotPerson" */ | ||
1777 | &(nid_objs[ 2]),/* "pkcs" */ | ||
1778 | &(nid_objs[186]),/* "pkcs1" */ | ||
1779 | &(nid_objs[27]),/* "pkcs3" */ | ||
1780 | &(nid_objs[187]),/* "pkcs5" */ | ||
1781 | &(nid_objs[20]),/* "pkcs7" */ | ||
1782 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
1783 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
1784 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
1785 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
1786 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
1787 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
1788 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
1789 | &(nid_objs[47]),/* "pkcs9" */ | ||
1790 | &(nid_objs[401]),/* "policyConstraints" */ | ||
1791 | &(nid_objs[406]),/* "prime-field" */ | ||
1792 | &(nid_objs[409]),/* "prime192v1" */ | ||
1793 | &(nid_objs[410]),/* "prime192v2" */ | ||
1794 | &(nid_objs[411]),/* "prime192v3" */ | ||
1795 | &(nid_objs[412]),/* "prime239v1" */ | ||
1796 | &(nid_objs[413]),/* "prime239v2" */ | ||
1797 | &(nid_objs[414]),/* "prime239v3" */ | ||
1798 | &(nid_objs[415]),/* "prime256v1" */ | ||
1799 | &(nid_objs[385]),/* "private" */ | ||
429 | &(nid_objs[84]),/* "privateKeyUsagePeriod" */ | 1800 | &(nid_objs[84]),/* "privateKeyUsagePeriod" */ |
1801 | &(nid_objs[435]),/* "pss" */ | ||
1802 | &(nid_objs[286]),/* "qcStatements" */ | ||
1803 | &(nid_objs[457]),/* "qualityLabelledData" */ | ||
1804 | &(nid_objs[450]),/* "rFC822localPart" */ | ||
1805 | &(nid_objs[400]),/* "role" */ | ||
1806 | &(nid_objs[448]),/* "room" */ | ||
1807 | &(nid_objs[463]),/* "roomNumber" */ | ||
1808 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
1809 | &(nid_objs[377]),/* "rsaSignature" */ | ||
1810 | &(nid_objs[ 1]),/* "rsadsi" */ | ||
1811 | &(nid_objs[482]),/* "sOARecord" */ | ||
1812 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
1813 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
1814 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
1815 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
1816 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
1817 | &(nid_objs[154]),/* "secretBag" */ | ||
1818 | &(nid_objs[474]),/* "secretary" */ | ||
1819 | &(nid_objs[386]),/* "security" */ | ||
1820 | &(nid_objs[394]),/* "selected-attribute-types" */ | ||
1821 | &(nid_objs[105]),/* "serialNumber" */ | ||
1822 | &(nid_objs[129]),/* "serverAuth" */ | ||
1823 | &(nid_objs[371]),/* "serviceLocator" */ | ||
1824 | &(nid_objs[52]),/* "signingTime" */ | ||
1825 | &(nid_objs[454]),/* "simpleSecurityObject" */ | ||
1826 | &(nid_objs[496]),/* "singleLevelQuality" */ | ||
1827 | &(nid_objs[387]),/* "snmpv2" */ | ||
430 | &(nid_objs[85]),/* "subjectAltName" */ | 1828 | &(nid_objs[85]),/* "subjectAltName" */ |
1829 | &(nid_objs[398]),/* "subjectInfoAccess" */ | ||
431 | &(nid_objs[82]),/* "subjectKeyIdentifier" */ | 1830 | &(nid_objs[82]),/* "subjectKeyIdentifier" */ |
1831 | &(nid_objs[498]),/* "subtreeMaximumQuality" */ | ||
1832 | &(nid_objs[497]),/* "subtreeMinimumQuality" */ | ||
1833 | &(nid_objs[402]),/* "targetInformation" */ | ||
1834 | &(nid_objs[459]),/* "textEncodedORAddress" */ | ||
1835 | &(nid_objs[293]),/* "textNotice" */ | ||
1836 | &(nid_objs[133]),/* "timeStamping" */ | ||
1837 | &(nid_objs[106]),/* "title" */ | ||
1838 | &(nid_objs[375]),/* "trustRoot" */ | ||
1839 | &(nid_objs[436]),/* "ucl" */ | ||
1840 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
1841 | &(nid_objs[49]),/* "unstructuredName" */ | ||
1842 | &(nid_objs[465]),/* "userClass" */ | ||
1843 | &(nid_objs[373]),/* "valid" */ | ||
1844 | &(nid_objs[503]),/* "x500UniqueIdentifier" */ | ||
1845 | &(nid_objs[158]),/* "x509Certificate" */ | ||
1846 | &(nid_objs[160]),/* "x509Crl" */ | ||
432 | }; | 1847 | }; |
433 | 1848 | ||
434 | static ASN1_OBJECT *ln_objs[NUM_LN]={ | 1849 | static ASN1_OBJECT *ln_objs[NUM_LN]={ |
1850 | &(nid_objs[363]),/* "AD Time Stamping" */ | ||
1851 | &(nid_objs[405]),/* "ANSI X9.62" */ | ||
1852 | &(nid_objs[368]),/* "Acceptable OCSP Responses" */ | ||
1853 | &(nid_objs[177]),/* "Authority Information Access" */ | ||
1854 | &(nid_objs[365]),/* "Basic OCSP Response" */ | ||
1855 | &(nid_objs[285]),/* "Biometric Info" */ | ||
1856 | &(nid_objs[179]),/* "CA Issuers" */ | ||
1857 | &(nid_objs[131]),/* "Code Signing" */ | ||
1858 | &(nid_objs[382]),/* "Directory" */ | ||
1859 | &(nid_objs[392]),/* "Domain" */ | ||
1860 | &(nid_objs[132]),/* "E-mail Protection" */ | ||
1861 | &(nid_objs[389]),/* "Enterprises" */ | ||
1862 | &(nid_objs[384]),/* "Experimental" */ | ||
1863 | &(nid_objs[372]),/* "Extended OCSP Status" */ | ||
1864 | &(nid_objs[172]),/* "Extension Request" */ | ||
1865 | &(nid_objs[432]),/* "Hold Instruction Call Issuer" */ | ||
1866 | &(nid_objs[430]),/* "Hold Instruction Code" */ | ||
1867 | &(nid_objs[431]),/* "Hold Instruction None" */ | ||
1868 | &(nid_objs[433]),/* "Hold Instruction Reject" */ | ||
1869 | &(nid_objs[294]),/* "IPSec End System" */ | ||
1870 | &(nid_objs[295]),/* "IPSec Tunnel" */ | ||
1871 | &(nid_objs[296]),/* "IPSec User" */ | ||
1872 | &(nid_objs[182]),/* "ISO Member Body" */ | ||
1873 | &(nid_objs[183]),/* "ISO US Member Body" */ | ||
1874 | &(nid_objs[142]),/* "Invalidity Date" */ | ||
1875 | &(nid_objs[504]),/* "MIME MHS" */ | ||
1876 | &(nid_objs[388]),/* "Mail" */ | ||
1877 | &(nid_objs[383]),/* "Management" */ | ||
1878 | &(nid_objs[417]),/* "Microsoft CSP Name" */ | ||
1879 | &(nid_objs[135]),/* "Microsoft Commercial Code Signing" */ | ||
1880 | &(nid_objs[138]),/* "Microsoft Encrypted File System" */ | ||
1881 | &(nid_objs[171]),/* "Microsoft Extension Request" */ | ||
1882 | &(nid_objs[134]),/* "Microsoft Individual Code Signing" */ | ||
1883 | &(nid_objs[137]),/* "Microsoft Server Gated Crypto" */ | ||
1884 | &(nid_objs[136]),/* "Microsoft Trust List Signing" */ | ||
435 | &(nid_objs[72]),/* "Netscape Base Url" */ | 1885 | &(nid_objs[72]),/* "Netscape Base Url" */ |
436 | &(nid_objs[76]),/* "Netscape CA Policy Url" */ | 1886 | &(nid_objs[76]),/* "Netscape CA Policy Url" */ |
437 | &(nid_objs[74]),/* "Netscape CA Revocation Url" */ | 1887 | &(nid_objs[74]),/* "Netscape CA Revocation Url" */ |
@@ -444,31 +1894,102 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ | |||
444 | &(nid_objs[75]),/* "Netscape Renewal Url" */ | 1894 | &(nid_objs[75]),/* "Netscape Renewal Url" */ |
445 | &(nid_objs[73]),/* "Netscape Revocation Url" */ | 1895 | &(nid_objs[73]),/* "Netscape Revocation Url" */ |
446 | &(nid_objs[77]),/* "Netscape SSL Server Name" */ | 1896 | &(nid_objs[77]),/* "Netscape SSL Server Name" */ |
447 | &(nid_objs[11]),/* "X500" */ | 1897 | &(nid_objs[139]),/* "Netscape Server Gated Crypto" */ |
1898 | &(nid_objs[178]),/* "OCSP" */ | ||
1899 | &(nid_objs[370]),/* "OCSP Archive Cutoff" */ | ||
1900 | &(nid_objs[367]),/* "OCSP CRL ID" */ | ||
1901 | &(nid_objs[369]),/* "OCSP No Check" */ | ||
1902 | &(nid_objs[366]),/* "OCSP Nonce" */ | ||
1903 | &(nid_objs[371]),/* "OCSP Service Locator" */ | ||
1904 | &(nid_objs[180]),/* "OCSP Signing" */ | ||
1905 | &(nid_objs[161]),/* "PBES2" */ | ||
1906 | &(nid_objs[69]),/* "PBKDF2" */ | ||
1907 | &(nid_objs[162]),/* "PBMAC1" */ | ||
1908 | &(nid_objs[127]),/* "PKIX" */ | ||
1909 | &(nid_objs[164]),/* "Policy Qualifier CPS" */ | ||
1910 | &(nid_objs[165]),/* "Policy Qualifier User Notice" */ | ||
1911 | &(nid_objs[385]),/* "Private" */ | ||
1912 | &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ | ||
1913 | &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ | ||
1914 | &(nid_objs[188]),/* "S/MIME" */ | ||
1915 | &(nid_objs[167]),/* "S/MIME Capabilities" */ | ||
1916 | &(nid_objs[387]),/* "SNMPv2" */ | ||
1917 | &(nid_objs[386]),/* "Security" */ | ||
1918 | &(nid_objs[394]),/* "Selected Attribute Types" */ | ||
1919 | &(nid_objs[143]),/* "Strong Extranet ID" */ | ||
1920 | &(nid_objs[398]),/* "Subject Information Access" */ | ||
1921 | &(nid_objs[130]),/* "TLS Web Client Authentication" */ | ||
1922 | &(nid_objs[129]),/* "TLS Web Server Authentication" */ | ||
1923 | &(nid_objs[133]),/* "Time Stamping" */ | ||
1924 | &(nid_objs[375]),/* "Trust Root" */ | ||
448 | &(nid_objs[12]),/* "X509" */ | 1925 | &(nid_objs[12]),/* "X509" */ |
1926 | &(nid_objs[402]),/* "X509v3 AC Targeting" */ | ||
449 | &(nid_objs[90]),/* "X509v3 Authority Key Identifier" */ | 1927 | &(nid_objs[90]),/* "X509v3 Authority Key Identifier" */ |
450 | &(nid_objs[87]),/* "X509v3 Basic Constraints" */ | 1928 | &(nid_objs[87]),/* "X509v3 Basic Constraints" */ |
451 | &(nid_objs[103]),/* "X509v3 CRL Distribution Points" */ | 1929 | &(nid_objs[103]),/* "X509v3 CRL Distribution Points" */ |
452 | &(nid_objs[88]),/* "X509v3 CRL Number" */ | 1930 | &(nid_objs[88]),/* "X509v3 CRL Number" */ |
1931 | &(nid_objs[141]),/* "X509v3 CRL Reason Code" */ | ||
453 | &(nid_objs[89]),/* "X509v3 Certificate Policies" */ | 1932 | &(nid_objs[89]),/* "X509v3 Certificate Policies" */ |
1933 | &(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */ | ||
1934 | &(nid_objs[126]),/* "X509v3 Extended Key Usage" */ | ||
454 | &(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */ | 1935 | &(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */ |
455 | &(nid_objs[83]),/* "X509v3 Key Usage" */ | 1936 | &(nid_objs[83]),/* "X509v3 Key Usage" */ |
1937 | &(nid_objs[403]),/* "X509v3 No Revocation Available" */ | ||
1938 | &(nid_objs[401]),/* "X509v3 Policy Constraints" */ | ||
456 | &(nid_objs[84]),/* "X509v3 Private Key Usage Period" */ | 1939 | &(nid_objs[84]),/* "X509v3 Private Key Usage Period" */ |
457 | &(nid_objs[85]),/* "X509v3 Subject Alternative Name" */ | 1940 | &(nid_objs[85]),/* "X509v3 Subject Alternative Name" */ |
458 | &(nid_objs[82]),/* "X509v3 Subject Key Identifier" */ | 1941 | &(nid_objs[82]),/* "X509v3 Subject Key Identifier" */ |
1942 | &(nid_objs[184]),/* "X9.57" */ | ||
1943 | &(nid_objs[185]),/* "X9.57 CM ?" */ | ||
1944 | &(nid_objs[478]),/* "aRecord" */ | ||
1945 | &(nid_objs[289]),/* "aaControls" */ | ||
1946 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
1947 | &(nid_objs[397]),/* "ac-proxying" */ | ||
1948 | &(nid_objs[288]),/* "ac-targeting" */ | ||
1949 | &(nid_objs[446]),/* "account" */ | ||
1950 | &(nid_objs[364]),/* "ad dvcs" */ | ||
1951 | &(nid_objs[419]),/* "aes-128-cbc" */ | ||
1952 | &(nid_objs[421]),/* "aes-128-cfb" */ | ||
1953 | &(nid_objs[418]),/* "aes-128-ecb" */ | ||
1954 | &(nid_objs[420]),/* "aes-128-ofb" */ | ||
1955 | &(nid_objs[423]),/* "aes-192-cbc" */ | ||
1956 | &(nid_objs[425]),/* "aes-192-cfb" */ | ||
1957 | &(nid_objs[422]),/* "aes-192-ecb" */ | ||
1958 | &(nid_objs[424]),/* "aes-192-ofb" */ | ||
1959 | &(nid_objs[427]),/* "aes-256-cbc" */ | ||
1960 | &(nid_objs[429]),/* "aes-256-cfb" */ | ||
1961 | &(nid_objs[426]),/* "aes-256-ecb" */ | ||
1962 | &(nid_objs[428]),/* "aes-256-ofb" */ | ||
1963 | &(nid_objs[376]),/* "algorithm" */ | ||
1964 | &(nid_objs[484]),/* "associatedDomain" */ | ||
1965 | &(nid_objs[485]),/* "associatedName" */ | ||
1966 | &(nid_objs[501]),/* "audio" */ | ||
459 | &(nid_objs[91]),/* "bf-cbc" */ | 1967 | &(nid_objs[91]),/* "bf-cbc" */ |
460 | &(nid_objs[93]),/* "bf-cfb" */ | 1968 | &(nid_objs[93]),/* "bf-cfb" */ |
461 | &(nid_objs[92]),/* "bf-ecb" */ | 1969 | &(nid_objs[92]),/* "bf-ecb" */ |
462 | &(nid_objs[94]),/* "bf-ofb" */ | 1970 | &(nid_objs[94]),/* "bf-ofb" */ |
1971 | &(nid_objs[494]),/* "buildingName" */ | ||
1972 | &(nid_objs[483]),/* "cNAMERecord" */ | ||
1973 | &(nid_objs[443]),/* "caseIgnoreIA5StringSyntax" */ | ||
463 | &(nid_objs[108]),/* "cast5-cbc" */ | 1974 | &(nid_objs[108]),/* "cast5-cbc" */ |
464 | &(nid_objs[110]),/* "cast5-cfb" */ | 1975 | &(nid_objs[110]),/* "cast5-cfb" */ |
465 | &(nid_objs[109]),/* "cast5-ecb" */ | 1976 | &(nid_objs[109]),/* "cast5-ecb" */ |
466 | &(nid_objs[111]),/* "cast5-ofb" */ | 1977 | &(nid_objs[111]),/* "cast5-ofb" */ |
1978 | &(nid_objs[404]),/* "ccitt" */ | ||
1979 | &(nid_objs[152]),/* "certBag" */ | ||
467 | &(nid_objs[54]),/* "challengePassword" */ | 1980 | &(nid_objs[54]),/* "challengePassword" */ |
1981 | &(nid_objs[407]),/* "characteristic-two-field" */ | ||
1982 | &(nid_objs[395]),/* "clearance" */ | ||
468 | &(nid_objs[13]),/* "commonName" */ | 1983 | &(nid_objs[13]),/* "commonName" */ |
469 | &(nid_objs[50]),/* "contentType" */ | 1984 | &(nid_objs[50]),/* "contentType" */ |
470 | &(nid_objs[53]),/* "countersignature" */ | 1985 | &(nid_objs[53]),/* "countersignature" */ |
471 | &(nid_objs[14]),/* "countryName" */ | 1986 | &(nid_objs[14]),/* "countryName" */ |
1987 | &(nid_objs[153]),/* "crlBag" */ | ||
1988 | &(nid_objs[500]),/* "dITRedirect" */ | ||
1989 | &(nid_objs[451]),/* "dNSDomain" */ | ||
1990 | &(nid_objs[495]),/* "dSAQuality" */ | ||
1991 | &(nid_objs[434]),/* "data" */ | ||
1992 | &(nid_objs[390]),/* "dcObject" */ | ||
472 | &(nid_objs[31]),/* "des-cbc" */ | 1993 | &(nid_objs[31]),/* "des-cbc" */ |
473 | &(nid_objs[30]),/* "des-cfb" */ | 1994 | &(nid_objs[30]),/* "des-cfb" */ |
474 | &(nid_objs[29]),/* "des-ecb" */ | 1995 | &(nid_objs[29]),/* "des-ecb" */ |
@@ -484,38 +2005,277 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ | |||
484 | &(nid_objs[107]),/* "description" */ | 2005 | &(nid_objs[107]),/* "description" */ |
485 | &(nid_objs[80]),/* "desx-cbc" */ | 2006 | &(nid_objs[80]),/* "desx-cbc" */ |
486 | &(nid_objs[28]),/* "dhKeyAgreement" */ | 2007 | &(nid_objs[28]),/* "dhKeyAgreement" */ |
2008 | &(nid_objs[11]),/* "directory services (X.500)" */ | ||
2009 | &(nid_objs[378]),/* "directory services - algorithms" */ | ||
2010 | &(nid_objs[174]),/* "dnQualifier" */ | ||
2011 | &(nid_objs[447]),/* "document" */ | ||
2012 | &(nid_objs[471]),/* "documentAuthor" */ | ||
2013 | &(nid_objs[468]),/* "documentIdentifier" */ | ||
2014 | &(nid_objs[472]),/* "documentLocation" */ | ||
2015 | &(nid_objs[502]),/* "documentPublisher" */ | ||
2016 | &(nid_objs[449]),/* "documentSeries" */ | ||
2017 | &(nid_objs[469]),/* "documentTitle" */ | ||
2018 | &(nid_objs[470]),/* "documentVersion" */ | ||
2019 | &(nid_objs[380]),/* "dod" */ | ||
2020 | &(nid_objs[391]),/* "domainComponent" */ | ||
2021 | &(nid_objs[452]),/* "domainRelatedObject" */ | ||
487 | &(nid_objs[116]),/* "dsaEncryption" */ | 2022 | &(nid_objs[116]),/* "dsaEncryption" */ |
488 | &(nid_objs[67]),/* "dsaEncryption-old" */ | 2023 | &(nid_objs[67]),/* "dsaEncryption-old" */ |
489 | &(nid_objs[66]),/* "dsaWithSHA" */ | 2024 | &(nid_objs[66]),/* "dsaWithSHA" */ |
490 | &(nid_objs[113]),/* "dsaWithSHA1" */ | 2025 | &(nid_objs[113]),/* "dsaWithSHA1" */ |
491 | &(nid_objs[70]),/* "dsaWithSHA1" */ | 2026 | &(nid_objs[70]),/* "dsaWithSHA1-old" */ |
2027 | &(nid_objs[297]),/* "dvcs" */ | ||
2028 | &(nid_objs[416]),/* "ecdsa-with-SHA1" */ | ||
492 | &(nid_objs[48]),/* "emailAddress" */ | 2029 | &(nid_objs[48]),/* "emailAddress" */ |
493 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | 2030 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ |
2031 | &(nid_objs[462]),/* "favouriteDrink" */ | ||
2032 | &(nid_objs[453]),/* "friendlyCountry" */ | ||
2033 | &(nid_objs[490]),/* "friendlyCountryName" */ | ||
2034 | &(nid_objs[156]),/* "friendlyName" */ | ||
2035 | &(nid_objs[509]),/* "generationQualifier" */ | ||
494 | &(nid_objs[99]),/* "givenName" */ | 2036 | &(nid_objs[99]),/* "givenName" */ |
2037 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
2038 | &(nid_objs[486]),/* "homePostalAddress" */ | ||
2039 | &(nid_objs[473]),/* "homeTelephoneNumber" */ | ||
2040 | &(nid_objs[466]),/* "host" */ | ||
2041 | &(nid_objs[442]),/* "iA5StringSyntax" */ | ||
2042 | &(nid_objs[381]),/* "iana" */ | ||
2043 | &(nid_objs[266]),/* "id-aca" */ | ||
2044 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
2045 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
2046 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
2047 | &(nid_objs[399]),/* "id-aca-encAttrs" */ | ||
2048 | &(nid_objs[357]),/* "id-aca-group" */ | ||
2049 | &(nid_objs[358]),/* "id-aca-role" */ | ||
2050 | &(nid_objs[176]),/* "id-ad" */ | ||
2051 | &(nid_objs[262]),/* "id-alg" */ | ||
2052 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
2053 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
2054 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
2055 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
2056 | &(nid_objs[268]),/* "id-cct" */ | ||
2057 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
2058 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
2059 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
2060 | &(nid_objs[81]),/* "id-ce" */ | ||
2061 | &(nid_objs[263]),/* "id-cmc" */ | ||
2062 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
2063 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
2064 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
2065 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
2066 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
2067 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
2068 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
2069 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
2070 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
2071 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
2072 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
2073 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
2074 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
2075 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
2076 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
2077 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
2078 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
2079 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
2080 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
2081 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
2082 | &(nid_objs[408]),/* "id-ecPublicKey" */ | ||
2083 | &(nid_objs[508]),/* "id-hex-multipart-message" */ | ||
2084 | &(nid_objs[507]),/* "id-hex-partial-message" */ | ||
2085 | &(nid_objs[260]),/* "id-it" */ | ||
2086 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
2087 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
2088 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
2089 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
2090 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
2091 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
2092 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
2093 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
2094 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
2095 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
2096 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
2097 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
2098 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
2099 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
2100 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
2101 | &(nid_objs[128]),/* "id-kp" */ | ||
2102 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
2103 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
2104 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
2105 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
2106 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
2107 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
2108 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
2109 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
2110 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
2111 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
2112 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
2113 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
2114 | &(nid_objs[264]),/* "id-on" */ | ||
2115 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
2116 | &(nid_objs[265]),/* "id-pda" */ | ||
2117 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
2118 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
2119 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
2120 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
2121 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
2122 | &(nid_objs[175]),/* "id-pe" */ | ||
2123 | &(nid_objs[261]),/* "id-pkip" */ | ||
2124 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
2125 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
2126 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
2127 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
2128 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
2129 | &(nid_objs[267]),/* "id-qcs" */ | ||
2130 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
2131 | &(nid_objs[259]),/* "id-qt" */ | ||
2132 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
2133 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
2134 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
2135 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
2136 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
2137 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
2138 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
2139 | &(nid_objs[314]),/* "id-regInfo" */ | ||
2140 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
2141 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
2142 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
2143 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
2144 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
2145 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
2146 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
2147 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
2148 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
2149 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
2150 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
2151 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
2152 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
2153 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
2154 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
2155 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
2156 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
2157 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
2158 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
2159 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
2160 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
2161 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
2162 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
2163 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
2164 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
2165 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
2166 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
2167 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
2168 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
2169 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
2170 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
2171 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
2172 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
2173 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
2174 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
2175 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
2176 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
2177 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
2178 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
2179 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
2180 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
2181 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
2182 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
2183 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
2184 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
2185 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
2186 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
2187 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
2188 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
2189 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
2190 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
2191 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
2192 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
2193 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
2194 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
2195 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
2196 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
2197 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
2198 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
2199 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
2200 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
2201 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
2202 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
2203 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
2204 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
2205 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
2206 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
2207 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
2208 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
2209 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
495 | &(nid_objs[34]),/* "idea-cbc" */ | 2210 | &(nid_objs[34]),/* "idea-cbc" */ |
496 | &(nid_objs[35]),/* "idea-cfb" */ | 2211 | &(nid_objs[35]),/* "idea-cfb" */ |
497 | &(nid_objs[36]),/* "idea-ecb" */ | 2212 | &(nid_objs[36]),/* "idea-ecb" */ |
498 | &(nid_objs[46]),/* "idea-ofb" */ | 2213 | &(nid_objs[46]),/* "idea-ofb" */ |
2214 | &(nid_objs[461]),/* "info" */ | ||
499 | &(nid_objs[101]),/* "initials" */ | 2215 | &(nid_objs[101]),/* "initials" */ |
2216 | &(nid_objs[181]),/* "iso" */ | ||
2217 | &(nid_objs[492]),/* "janetMailbox" */ | ||
2218 | &(nid_objs[393]),/* "joint-iso-ccitt" */ | ||
2219 | &(nid_objs[150]),/* "keyBag" */ | ||
2220 | &(nid_objs[477]),/* "lastModifiedBy" */ | ||
2221 | &(nid_objs[476]),/* "lastModifiedTime" */ | ||
2222 | &(nid_objs[157]),/* "localKeyID" */ | ||
500 | &(nid_objs[15]),/* "localityName" */ | 2223 | &(nid_objs[15]),/* "localityName" */ |
2224 | &(nid_objs[480]),/* "mXRecord" */ | ||
2225 | &(nid_objs[493]),/* "mailPreferenceOption" */ | ||
2226 | &(nid_objs[467]),/* "manager" */ | ||
501 | &(nid_objs[ 3]),/* "md2" */ | 2227 | &(nid_objs[ 3]),/* "md2" */ |
502 | &(nid_objs[ 7]),/* "md2WithRSAEncryption" */ | 2228 | &(nid_objs[ 7]),/* "md2WithRSAEncryption" */ |
2229 | &(nid_objs[257]),/* "md4" */ | ||
2230 | &(nid_objs[396]),/* "md4WithRSAEncryption" */ | ||
503 | &(nid_objs[ 4]),/* "md5" */ | 2231 | &(nid_objs[ 4]),/* "md5" */ |
504 | &(nid_objs[114]),/* "md5-sha1" */ | 2232 | &(nid_objs[114]),/* "md5-sha1" */ |
505 | &(nid_objs[104]),/* "md5WithRSA" */ | 2233 | &(nid_objs[104]),/* "md5WithRSA" */ |
506 | &(nid_objs[ 8]),/* "md5WithRSAEncryption" */ | 2234 | &(nid_objs[ 8]),/* "md5WithRSAEncryption" */ |
507 | &(nid_objs[95]),/* "mdc2" */ | 2235 | &(nid_objs[95]),/* "mdc2" */ |
508 | &(nid_objs[96]),/* "mdc2withRSA" */ | 2236 | &(nid_objs[96]),/* "mdc2WithRSA" */ |
509 | &(nid_objs[51]),/* "messageDigest" */ | 2237 | &(nid_objs[51]),/* "messageDigest" */ |
2238 | &(nid_objs[506]),/* "mime-mhs-bodies" */ | ||
2239 | &(nid_objs[505]),/* "mime-mhs-headings" */ | ||
2240 | &(nid_objs[488]),/* "mobileTelephoneNumber" */ | ||
2241 | &(nid_objs[481]),/* "nSRecord" */ | ||
2242 | &(nid_objs[173]),/* "name" */ | ||
2243 | &(nid_objs[379]),/* "org" */ | ||
510 | &(nid_objs[17]),/* "organizationName" */ | 2244 | &(nid_objs[17]),/* "organizationName" */ |
2245 | &(nid_objs[491]),/* "organizationalStatus" */ | ||
511 | &(nid_objs[18]),/* "organizationalUnitName" */ | 2246 | &(nid_objs[18]),/* "organizationalUnitName" */ |
2247 | &(nid_objs[475]),/* "otherMailbox" */ | ||
2248 | &(nid_objs[489]),/* "pagerTelephoneNumber" */ | ||
2249 | &(nid_objs[374]),/* "path" */ | ||
512 | &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */ | 2250 | &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */ |
2251 | &(nid_objs[168]),/* "pbeWithMD2AndRC2-CBC" */ | ||
513 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | 2252 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ |
514 | &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */ | 2253 | &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */ |
2254 | &(nid_objs[169]),/* "pbeWithMD5AndRC2-CBC" */ | ||
2255 | &(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */ | ||
2256 | &(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */ | ||
2257 | &(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */ | ||
2258 | &(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */ | ||
2259 | &(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */ | ||
2260 | &(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */ | ||
2261 | &(nid_objs[170]),/* "pbeWithSHA1AndDES-CBC" */ | ||
515 | &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */ | 2262 | &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */ |
516 | &(nid_objs[69]),/* "pbeWithSHA1AndRC4" */ | 2263 | &(nid_objs[499]),/* "personalSignature" */ |
517 | &(nid_objs[ 2]),/* "pkcs" */ | 2264 | &(nid_objs[487]),/* "personalTitle" */ |
2265 | &(nid_objs[464]),/* "photo" */ | ||
2266 | &(nid_objs[437]),/* "pilot" */ | ||
2267 | &(nid_objs[439]),/* "pilotAttributeSyntax" */ | ||
2268 | &(nid_objs[438]),/* "pilotAttributeType" */ | ||
2269 | &(nid_objs[479]),/* "pilotAttributeType27" */ | ||
2270 | &(nid_objs[456]),/* "pilotDSA" */ | ||
2271 | &(nid_objs[441]),/* "pilotGroups" */ | ||
2272 | &(nid_objs[444]),/* "pilotObject" */ | ||
2273 | &(nid_objs[440]),/* "pilotObjectClass" */ | ||
2274 | &(nid_objs[455]),/* "pilotOrganization" */ | ||
2275 | &(nid_objs[445]),/* "pilotPerson" */ | ||
2276 | &(nid_objs[186]),/* "pkcs1" */ | ||
518 | &(nid_objs[27]),/* "pkcs3" */ | 2277 | &(nid_objs[27]),/* "pkcs3" */ |
2278 | &(nid_objs[187]),/* "pkcs5" */ | ||
519 | &(nid_objs[20]),/* "pkcs7" */ | 2279 | &(nid_objs[20]),/* "pkcs7" */ |
520 | &(nid_objs[21]),/* "pkcs7-data" */ | 2280 | &(nid_objs[21]),/* "pkcs7-data" */ |
521 | &(nid_objs[25]),/* "pkcs7-digestData" */ | 2281 | &(nid_objs[25]),/* "pkcs7-digestData" */ |
@@ -523,8 +2283,22 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ | |||
523 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | 2283 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ |
524 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | 2284 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ |
525 | &(nid_objs[22]),/* "pkcs7-signedData" */ | 2285 | &(nid_objs[22]),/* "pkcs7-signedData" */ |
2286 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
526 | &(nid_objs[47]),/* "pkcs9" */ | 2287 | &(nid_objs[47]),/* "pkcs9" */ |
2288 | &(nid_objs[406]),/* "prime-field" */ | ||
2289 | &(nid_objs[409]),/* "prime192v1" */ | ||
2290 | &(nid_objs[410]),/* "prime192v2" */ | ||
2291 | &(nid_objs[411]),/* "prime192v3" */ | ||
2292 | &(nid_objs[412]),/* "prime239v1" */ | ||
2293 | &(nid_objs[413]),/* "prime239v2" */ | ||
2294 | &(nid_objs[414]),/* "prime239v3" */ | ||
2295 | &(nid_objs[415]),/* "prime256v1" */ | ||
2296 | &(nid_objs[435]),/* "pss" */ | ||
2297 | &(nid_objs[286]),/* "qcStatements" */ | ||
2298 | &(nid_objs[457]),/* "qualityLabelledData" */ | ||
2299 | &(nid_objs[450]),/* "rFC822localPart" */ | ||
527 | &(nid_objs[98]),/* "rc2-40-cbc" */ | 2300 | &(nid_objs[98]),/* "rc2-40-cbc" */ |
2301 | &(nid_objs[166]),/* "rc2-64-cbc" */ | ||
528 | &(nid_objs[37]),/* "rc2-cbc" */ | 2302 | &(nid_objs[37]),/* "rc2-cbc" */ |
529 | &(nid_objs[39]),/* "rc2-cfb" */ | 2303 | &(nid_objs[39]),/* "rc2-cfb" */ |
530 | &(nid_objs[38]),/* "rc2-ecb" */ | 2304 | &(nid_objs[38]),/* "rc2-ecb" */ |
@@ -535,11 +2309,24 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ | |||
535 | &(nid_objs[122]),/* "rc5-cfb" */ | 2309 | &(nid_objs[122]),/* "rc5-cfb" */ |
536 | &(nid_objs[121]),/* "rc5-ecb" */ | 2310 | &(nid_objs[121]),/* "rc5-ecb" */ |
537 | &(nid_objs[123]),/* "rc5-ofb" */ | 2311 | &(nid_objs[123]),/* "rc5-ofb" */ |
2312 | &(nid_objs[460]),/* "rfc822Mailbox" */ | ||
538 | &(nid_objs[117]),/* "ripemd160" */ | 2313 | &(nid_objs[117]),/* "ripemd160" */ |
539 | &(nid_objs[119]),/* "ripemd160WithRSA" */ | 2314 | &(nid_objs[119]),/* "ripemd160WithRSA" */ |
2315 | &(nid_objs[400]),/* "role" */ | ||
2316 | &(nid_objs[448]),/* "room" */ | ||
2317 | &(nid_objs[463]),/* "roomNumber" */ | ||
540 | &(nid_objs[19]),/* "rsa" */ | 2318 | &(nid_objs[19]),/* "rsa" */ |
541 | &(nid_objs[ 6]),/* "rsaEncryption" */ | 2319 | &(nid_objs[ 6]),/* "rsaEncryption" */ |
542 | &(nid_objs[ 1]),/* "rsadsi" */ | 2320 | &(nid_objs[377]),/* "rsaSignature" */ |
2321 | &(nid_objs[124]),/* "run length compression" */ | ||
2322 | &(nid_objs[482]),/* "sOARecord" */ | ||
2323 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
2324 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
2325 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
2326 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
2327 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
2328 | &(nid_objs[154]),/* "secretBag" */ | ||
2329 | &(nid_objs[474]),/* "secretary" */ | ||
543 | &(nid_objs[105]),/* "serialNumber" */ | 2330 | &(nid_objs[105]),/* "serialNumber" */ |
544 | &(nid_objs[41]),/* "sha" */ | 2331 | &(nid_objs[41]),/* "sha" */ |
545 | &(nid_objs[64]),/* "sha1" */ | 2332 | &(nid_objs[64]),/* "sha1" */ |
@@ -547,19 +2334,45 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ | |||
547 | &(nid_objs[65]),/* "sha1WithRSAEncryption" */ | 2334 | &(nid_objs[65]),/* "sha1WithRSAEncryption" */ |
548 | &(nid_objs[42]),/* "shaWithRSAEncryption" */ | 2335 | &(nid_objs[42]),/* "shaWithRSAEncryption" */ |
549 | &(nid_objs[52]),/* "signingTime" */ | 2336 | &(nid_objs[52]),/* "signingTime" */ |
2337 | &(nid_objs[454]),/* "simpleSecurityObject" */ | ||
2338 | &(nid_objs[496]),/* "singleLevelQuality" */ | ||
550 | &(nid_objs[16]),/* "stateOrProvinceName" */ | 2339 | &(nid_objs[16]),/* "stateOrProvinceName" */ |
2340 | &(nid_objs[498]),/* "subtreeMaximumQuality" */ | ||
2341 | &(nid_objs[497]),/* "subtreeMinimumQuality" */ | ||
551 | &(nid_objs[100]),/* "surname" */ | 2342 | &(nid_objs[100]),/* "surname" */ |
2343 | &(nid_objs[459]),/* "textEncodedORAddress" */ | ||
2344 | &(nid_objs[293]),/* "textNotice" */ | ||
552 | &(nid_objs[106]),/* "title" */ | 2345 | &(nid_objs[106]),/* "title" */ |
2346 | &(nid_objs[436]),/* "ucl" */ | ||
553 | &(nid_objs[ 0]),/* "undefined" */ | 2347 | &(nid_objs[ 0]),/* "undefined" */ |
554 | &(nid_objs[102]),/* "uniqueIdentifier" */ | ||
555 | &(nid_objs[55]),/* "unstructuredAddress" */ | 2348 | &(nid_objs[55]),/* "unstructuredAddress" */ |
556 | &(nid_objs[49]),/* "unstructuredName" */ | 2349 | &(nid_objs[49]),/* "unstructuredName" */ |
2350 | &(nid_objs[465]),/* "userClass" */ | ||
2351 | &(nid_objs[458]),/* "userId" */ | ||
2352 | &(nid_objs[373]),/* "valid" */ | ||
2353 | &(nid_objs[503]),/* "x500UniqueIdentifier" */ | ||
2354 | &(nid_objs[158]),/* "x509Certificate" */ | ||
2355 | &(nid_objs[160]),/* "x509Crl" */ | ||
2356 | &(nid_objs[125]),/* "zlib compression" */ | ||
557 | }; | 2357 | }; |
558 | 2358 | ||
559 | static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | 2359 | static ASN1_OBJECT *obj_objs[NUM_OBJ]={ |
2360 | &(nid_objs[ 0]),/* OBJ_undef 0 */ | ||
2361 | &(nid_objs[404]),/* OBJ_ccitt 0 */ | ||
2362 | &(nid_objs[434]),/* OBJ_data 0 9 */ | ||
2363 | &(nid_objs[181]),/* OBJ_iso 1 */ | ||
2364 | &(nid_objs[182]),/* OBJ_member_body 1 2 */ | ||
2365 | &(nid_objs[379]),/* OBJ_org 1 3 */ | ||
2366 | &(nid_objs[393]),/* OBJ_joint_iso_ccitt 2 */ | ||
560 | &(nid_objs[11]),/* OBJ_X500 2 5 */ | 2367 | &(nid_objs[11]),/* OBJ_X500 2 5 */ |
2368 | &(nid_objs[380]),/* OBJ_dod 1 3 6 */ | ||
561 | &(nid_objs[12]),/* OBJ_X509 2 5 4 */ | 2369 | &(nid_objs[12]),/* OBJ_X509 2 5 4 */ |
562 | &(nid_objs[81]),/* OBJ_ld_ce 2 5 29 */ | 2370 | &(nid_objs[378]),/* OBJ_X500algorithms 2 5 8 */ |
2371 | &(nid_objs[81]),/* OBJ_id_ce 2 5 29 */ | ||
2372 | &(nid_objs[435]),/* OBJ_pss 0 9 2342 */ | ||
2373 | &(nid_objs[183]),/* OBJ_ISO_US 1 2 840 */ | ||
2374 | &(nid_objs[381]),/* OBJ_iana 1 3 6 1 */ | ||
2375 | &(nid_objs[394]),/* OBJ_selected_attribute_types 2 5 1 5 */ | ||
563 | &(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */ | 2376 | &(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */ |
564 | &(nid_objs[100]),/* OBJ_surname 2 5 4 4 */ | 2377 | &(nid_objs[100]),/* OBJ_surname 2 5 4 4 */ |
565 | &(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */ | 2378 | &(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */ |
@@ -570,9 +2383,13 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | |||
570 | &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ | 2383 | &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ |
571 | &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ | 2384 | &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ |
572 | &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ | 2385 | &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ |
2386 | &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ | ||
573 | &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ | 2387 | &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ |
574 | &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ | 2388 | &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ |
575 | &(nid_objs[102]),/* OBJ_uniqueIdentifier 2 5 4 45 */ | 2389 | &(nid_objs[509]),/* OBJ_generationQualifier 2 5 4 44 */ |
2390 | &(nid_objs[503]),/* OBJ_x500UniqueIdentifier 2 5 4 45 */ | ||
2391 | &(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */ | ||
2392 | &(nid_objs[400]),/* OBJ_role 2 5 4 72 */ | ||
576 | &(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */ | 2393 | &(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */ |
577 | &(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */ | 2394 | &(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */ |
578 | &(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */ | 2395 | &(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */ |
@@ -580,54 +2397,230 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | |||
580 | &(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */ | 2397 | &(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */ |
581 | &(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */ | 2398 | &(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */ |
582 | &(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */ | 2399 | &(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */ |
2400 | &(nid_objs[141]),/* OBJ_crl_reason 2 5 29 21 */ | ||
2401 | &(nid_objs[430]),/* OBJ_hold_instruction_code 2 5 29 23 */ | ||
2402 | &(nid_objs[142]),/* OBJ_invalidity_date 2 5 29 24 */ | ||
2403 | &(nid_objs[140]),/* OBJ_delta_crl 2 5 29 27 */ | ||
583 | &(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */ | 2404 | &(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */ |
584 | &(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */ | 2405 | &(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */ |
585 | &(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */ | 2406 | &(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */ |
2407 | &(nid_objs[401]),/* OBJ_policy_constraints 2 5 29 36 */ | ||
2408 | &(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */ | ||
2409 | &(nid_objs[402]),/* OBJ_target_information 2 5 29 55 */ | ||
2410 | &(nid_objs[403]),/* OBJ_no_rev_avail 2 5 29 56 */ | ||
2411 | &(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */ | ||
2412 | &(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */ | ||
2413 | &(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */ | ||
2414 | &(nid_objs[385]),/* OBJ_Private 1 3 6 1 4 */ | ||
2415 | &(nid_objs[386]),/* OBJ_Security 1 3 6 1 5 */ | ||
2416 | &(nid_objs[387]),/* OBJ_SNMPv2 1 3 6 1 6 */ | ||
2417 | &(nid_objs[388]),/* OBJ_Mail 1 3 6 1 7 */ | ||
2418 | &(nid_objs[376]),/* OBJ_algorithm 1 3 14 3 2 */ | ||
2419 | &(nid_objs[395]),/* OBJ_clearance 2 5 1 5 55 */ | ||
586 | &(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */ | 2420 | &(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */ |
587 | &(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */ | 2421 | &(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */ |
588 | &(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */ | 2422 | &(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */ |
2423 | &(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */ | ||
2424 | &(nid_objs[405]),/* OBJ_ansi_X9_62 1 2 840 10045 */ | ||
2425 | &(nid_objs[389]),/* OBJ_Enterprises 1 3 6 1 4 1 */ | ||
2426 | &(nid_objs[504]),/* OBJ_mime_mhs 1 3 6 1 7 1 */ | ||
589 | &(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */ | 2427 | &(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */ |
590 | &(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */ | 2428 | &(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */ |
591 | &(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */ | 2429 | &(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */ |
592 | &(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */ | 2430 | &(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */ |
593 | &(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */ | 2431 | &(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */ |
2432 | &(nid_objs[377]),/* OBJ_rsaSignature 1 3 14 3 2 11 */ | ||
594 | &(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */ | 2433 | &(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */ |
595 | &(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */ | 2434 | &(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */ |
596 | &(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */ | 2435 | &(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */ |
597 | &(nid_objs[32]),/* OBJ_des_ede 1 3 14 3 2 17 */ | 2436 | &(nid_objs[32]),/* OBJ_des_ede_ecb 1 3 14 3 2 17 */ |
598 | &(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */ | 2437 | &(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */ |
599 | &(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */ | 2438 | &(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */ |
600 | &(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */ | 2439 | &(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */ |
601 | &(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */ | 2440 | &(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */ |
602 | &(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */ | 2441 | &(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */ |
2442 | &(nid_objs[143]),/* OBJ_sxnet 1 3 101 1 4 1 */ | ||
2443 | &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ | ||
2444 | &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ | ||
603 | &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ | 2445 | &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ |
2446 | &(nid_objs[185]),/* OBJ_X9cm 1 2 840 10040 4 */ | ||
2447 | &(nid_objs[127]),/* OBJ_id_pkix 1 3 6 1 5 5 7 */ | ||
2448 | &(nid_objs[505]),/* OBJ_mime_mhs_headings 1 3 6 1 7 1 1 */ | ||
2449 | &(nid_objs[506]),/* OBJ_mime_mhs_bodies 1 3 6 1 7 1 2 */ | ||
604 | &(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */ | 2450 | &(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */ |
2451 | &(nid_objs[436]),/* OBJ_ucl 0 9 2342 19200300 */ | ||
605 | &(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */ | 2452 | &(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */ |
2453 | &(nid_objs[431]),/* OBJ_hold_instruction_none 1 2 840 10040 2 1 */ | ||
2454 | &(nid_objs[432]),/* OBJ_hold_instruction_call_issuer 1 2 840 10040 2 2 */ | ||
2455 | &(nid_objs[433]),/* OBJ_hold_instruction_reject 1 2 840 10040 2 3 */ | ||
606 | &(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */ | 2456 | &(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */ |
607 | &(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */ | 2457 | &(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */ |
2458 | &(nid_objs[406]),/* OBJ_X9_62_prime_field 1 2 840 10045 1 1 */ | ||
2459 | &(nid_objs[407]),/* OBJ_X9_62_characteristic_two_field 1 2 840 10045 1 2 */ | ||
2460 | &(nid_objs[408]),/* OBJ_X9_62_id_ecPublicKey 1 2 840 10045 2 1 */ | ||
2461 | &(nid_objs[416]),/* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */ | ||
2462 | &(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */ | ||
2463 | &(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */ | ||
2464 | &(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */ | ||
2465 | &(nid_objs[128]),/* OBJ_id_kp 1 3 6 1 5 5 7 3 */ | ||
2466 | &(nid_objs[260]),/* OBJ_id_it 1 3 6 1 5 5 7 4 */ | ||
2467 | &(nid_objs[261]),/* OBJ_id_pkip 1 3 6 1 5 5 7 5 */ | ||
2468 | &(nid_objs[262]),/* OBJ_id_alg 1 3 6 1 5 5 7 6 */ | ||
2469 | &(nid_objs[263]),/* OBJ_id_cmc 1 3 6 1 5 5 7 7 */ | ||
2470 | &(nid_objs[264]),/* OBJ_id_on 1 3 6 1 5 5 7 8 */ | ||
2471 | &(nid_objs[265]),/* OBJ_id_pda 1 3 6 1 5 5 7 9 */ | ||
2472 | &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ | ||
2473 | &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ | ||
2474 | &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ | ||
2475 | &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ | ||
2476 | &(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */ | ||
2477 | &(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */ | ||
608 | &(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */ | 2478 | &(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */ |
2479 | &(nid_objs[437]),/* OBJ_pilot 0 9 2342 19200300 100 */ | ||
2480 | &(nid_objs[186]),/* OBJ_pkcs1 1 2 840 113549 1 1 */ | ||
609 | &(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */ | 2481 | &(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */ |
2482 | &(nid_objs[187]),/* OBJ_pkcs5 1 2 840 113549 1 5 */ | ||
610 | &(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */ | 2483 | &(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */ |
611 | &(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */ | 2484 | &(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */ |
612 | &(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */ | 2485 | &(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */ |
2486 | &(nid_objs[257]),/* OBJ_md4 1 2 840 113549 2 4 */ | ||
613 | &(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */ | 2487 | &(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */ |
2488 | &(nid_objs[163]),/* OBJ_hmacWithSHA1 1 2 840 113549 2 7 */ | ||
614 | &(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */ | 2489 | &(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */ |
615 | &(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */ | 2490 | &(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */ |
616 | &(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */ | 2491 | &(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */ |
617 | &(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */ | 2492 | &(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */ |
2493 | &(nid_objs[409]),/* OBJ_X9_62_prime192v1 1 2 840 10045 3 1 1 */ | ||
2494 | &(nid_objs[410]),/* OBJ_X9_62_prime192v2 1 2 840 10045 3 1 2 */ | ||
2495 | &(nid_objs[411]),/* OBJ_X9_62_prime192v3 1 2 840 10045 3 1 3 */ | ||
2496 | &(nid_objs[412]),/* OBJ_X9_62_prime239v1 1 2 840 10045 3 1 4 */ | ||
2497 | &(nid_objs[413]),/* OBJ_X9_62_prime239v2 1 2 840 10045 3 1 5 */ | ||
2498 | &(nid_objs[414]),/* OBJ_X9_62_prime239v3 1 2 840 10045 3 1 6 */ | ||
2499 | &(nid_objs[415]),/* OBJ_X9_62_prime256v1 1 2 840 10045 3 1 7 */ | ||
2500 | &(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */ | ||
2501 | &(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */ | ||
2502 | &(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */ | ||
2503 | &(nid_objs[272]),/* OBJ_id_pkix1_implicit_93 1 3 6 1 5 5 7 0 4 */ | ||
2504 | &(nid_objs[273]),/* OBJ_id_mod_crmf 1 3 6 1 5 5 7 0 5 */ | ||
2505 | &(nid_objs[274]),/* OBJ_id_mod_cmc 1 3 6 1 5 5 7 0 6 */ | ||
2506 | &(nid_objs[275]),/* OBJ_id_mod_kea_profile_88 1 3 6 1 5 5 7 0 7 */ | ||
2507 | &(nid_objs[276]),/* OBJ_id_mod_kea_profile_93 1 3 6 1 5 5 7 0 8 */ | ||
2508 | &(nid_objs[277]),/* OBJ_id_mod_cmp 1 3 6 1 5 5 7 0 9 */ | ||
2509 | &(nid_objs[278]),/* OBJ_id_mod_qualified_cert_88 1 3 6 1 5 5 7 0 10 */ | ||
2510 | &(nid_objs[279]),/* OBJ_id_mod_qualified_cert_93 1 3 6 1 5 5 7 0 11 */ | ||
2511 | &(nid_objs[280]),/* OBJ_id_mod_attribute_cert 1 3 6 1 5 5 7 0 12 */ | ||
2512 | &(nid_objs[281]),/* OBJ_id_mod_timestamp_protocol 1 3 6 1 5 5 7 0 13 */ | ||
2513 | &(nid_objs[282]),/* OBJ_id_mod_ocsp 1 3 6 1 5 5 7 0 14 */ | ||
2514 | &(nid_objs[283]),/* OBJ_id_mod_dvcs 1 3 6 1 5 5 7 0 15 */ | ||
2515 | &(nid_objs[284]),/* OBJ_id_mod_cmp2000 1 3 6 1 5 5 7 0 16 */ | ||
2516 | &(nid_objs[177]),/* OBJ_info_access 1 3 6 1 5 5 7 1 1 */ | ||
2517 | &(nid_objs[285]),/* OBJ_biometricInfo 1 3 6 1 5 5 7 1 2 */ | ||
2518 | &(nid_objs[286]),/* OBJ_qcStatements 1 3 6 1 5 5 7 1 3 */ | ||
2519 | &(nid_objs[287]),/* OBJ_ac_auditEntity 1 3 6 1 5 5 7 1 4 */ | ||
2520 | &(nid_objs[288]),/* OBJ_ac_targeting 1 3 6 1 5 5 7 1 5 */ | ||
2521 | &(nid_objs[289]),/* OBJ_aaControls 1 3 6 1 5 5 7 1 6 */ | ||
2522 | &(nid_objs[290]),/* OBJ_sbqp_ipAddrBlock 1 3 6 1 5 5 7 1 7 */ | ||
2523 | &(nid_objs[291]),/* OBJ_sbqp_autonomousSysNum 1 3 6 1 5 5 7 1 8 */ | ||
2524 | &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ | ||
2525 | &(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */ | ||
2526 | &(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */ | ||
2527 | &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ | ||
2528 | &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ | ||
2529 | &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ | ||
2530 | &(nid_objs[129]),/* OBJ_server_auth 1 3 6 1 5 5 7 3 1 */ | ||
2531 | &(nid_objs[130]),/* OBJ_client_auth 1 3 6 1 5 5 7 3 2 */ | ||
2532 | &(nid_objs[131]),/* OBJ_code_sign 1 3 6 1 5 5 7 3 3 */ | ||
2533 | &(nid_objs[132]),/* OBJ_email_protect 1 3 6 1 5 5 7 3 4 */ | ||
2534 | &(nid_objs[294]),/* OBJ_ipsecEndSystem 1 3 6 1 5 5 7 3 5 */ | ||
2535 | &(nid_objs[295]),/* OBJ_ipsecTunnel 1 3 6 1 5 5 7 3 6 */ | ||
2536 | &(nid_objs[296]),/* OBJ_ipsecUser 1 3 6 1 5 5 7 3 7 */ | ||
2537 | &(nid_objs[133]),/* OBJ_time_stamp 1 3 6 1 5 5 7 3 8 */ | ||
2538 | &(nid_objs[180]),/* OBJ_OCSP_sign 1 3 6 1 5 5 7 3 9 */ | ||
2539 | &(nid_objs[297]),/* OBJ_dvcs 1 3 6 1 5 5 7 3 10 */ | ||
2540 | &(nid_objs[298]),/* OBJ_id_it_caProtEncCert 1 3 6 1 5 5 7 4 1 */ | ||
2541 | &(nid_objs[299]),/* OBJ_id_it_signKeyPairTypes 1 3 6 1 5 5 7 4 2 */ | ||
2542 | &(nid_objs[300]),/* OBJ_id_it_encKeyPairTypes 1 3 6 1 5 5 7 4 3 */ | ||
2543 | &(nid_objs[301]),/* OBJ_id_it_preferredSymmAlg 1 3 6 1 5 5 7 4 4 */ | ||
2544 | &(nid_objs[302]),/* OBJ_id_it_caKeyUpdateInfo 1 3 6 1 5 5 7 4 5 */ | ||
2545 | &(nid_objs[303]),/* OBJ_id_it_currentCRL 1 3 6 1 5 5 7 4 6 */ | ||
2546 | &(nid_objs[304]),/* OBJ_id_it_unsupportedOIDs 1 3 6 1 5 5 7 4 7 */ | ||
2547 | &(nid_objs[305]),/* OBJ_id_it_subscriptionRequest 1 3 6 1 5 5 7 4 8 */ | ||
2548 | &(nid_objs[306]),/* OBJ_id_it_subscriptionResponse 1 3 6 1 5 5 7 4 9 */ | ||
2549 | &(nid_objs[307]),/* OBJ_id_it_keyPairParamReq 1 3 6 1 5 5 7 4 10 */ | ||
2550 | &(nid_objs[308]),/* OBJ_id_it_keyPairParamRep 1 3 6 1 5 5 7 4 11 */ | ||
2551 | &(nid_objs[309]),/* OBJ_id_it_revPassphrase 1 3 6 1 5 5 7 4 12 */ | ||
2552 | &(nid_objs[310]),/* OBJ_id_it_implicitConfirm 1 3 6 1 5 5 7 4 13 */ | ||
2553 | &(nid_objs[311]),/* OBJ_id_it_confirmWaitTime 1 3 6 1 5 5 7 4 14 */ | ||
2554 | &(nid_objs[312]),/* OBJ_id_it_origPKIMessage 1 3 6 1 5 5 7 4 15 */ | ||
2555 | &(nid_objs[313]),/* OBJ_id_regCtrl 1 3 6 1 5 5 7 5 1 */ | ||
2556 | &(nid_objs[314]),/* OBJ_id_regInfo 1 3 6 1 5 5 7 5 2 */ | ||
2557 | &(nid_objs[323]),/* OBJ_id_alg_des40 1 3 6 1 5 5 7 6 1 */ | ||
2558 | &(nid_objs[324]),/* OBJ_id_alg_noSignature 1 3 6 1 5 5 7 6 2 */ | ||
2559 | &(nid_objs[325]),/* OBJ_id_alg_dh_sig_hmac_sha1 1 3 6 1 5 5 7 6 3 */ | ||
2560 | &(nid_objs[326]),/* OBJ_id_alg_dh_pop 1 3 6 1 5 5 7 6 4 */ | ||
2561 | &(nid_objs[327]),/* OBJ_id_cmc_statusInfo 1 3 6 1 5 5 7 7 1 */ | ||
2562 | &(nid_objs[328]),/* OBJ_id_cmc_identification 1 3 6 1 5 5 7 7 2 */ | ||
2563 | &(nid_objs[329]),/* OBJ_id_cmc_identityProof 1 3 6 1 5 5 7 7 3 */ | ||
2564 | &(nid_objs[330]),/* OBJ_id_cmc_dataReturn 1 3 6 1 5 5 7 7 4 */ | ||
2565 | &(nid_objs[331]),/* OBJ_id_cmc_transactionId 1 3 6 1 5 5 7 7 5 */ | ||
2566 | &(nid_objs[332]),/* OBJ_id_cmc_senderNonce 1 3 6 1 5 5 7 7 6 */ | ||
2567 | &(nid_objs[333]),/* OBJ_id_cmc_recipientNonce 1 3 6 1 5 5 7 7 7 */ | ||
2568 | &(nid_objs[334]),/* OBJ_id_cmc_addExtensions 1 3 6 1 5 5 7 7 8 */ | ||
2569 | &(nid_objs[335]),/* OBJ_id_cmc_encryptedPOP 1 3 6 1 5 5 7 7 9 */ | ||
2570 | &(nid_objs[336]),/* OBJ_id_cmc_decryptedPOP 1 3 6 1 5 5 7 7 10 */ | ||
2571 | &(nid_objs[337]),/* OBJ_id_cmc_lraPOPWitness 1 3 6 1 5 5 7 7 11 */ | ||
2572 | &(nid_objs[338]),/* OBJ_id_cmc_getCert 1 3 6 1 5 5 7 7 15 */ | ||
2573 | &(nid_objs[339]),/* OBJ_id_cmc_getCRL 1 3 6 1 5 5 7 7 16 */ | ||
2574 | &(nid_objs[340]),/* OBJ_id_cmc_revokeRequest 1 3 6 1 5 5 7 7 17 */ | ||
2575 | &(nid_objs[341]),/* OBJ_id_cmc_regInfo 1 3 6 1 5 5 7 7 18 */ | ||
2576 | &(nid_objs[342]),/* OBJ_id_cmc_responseInfo 1 3 6 1 5 5 7 7 19 */ | ||
2577 | &(nid_objs[343]),/* OBJ_id_cmc_queryPending 1 3 6 1 5 5 7 7 21 */ | ||
2578 | &(nid_objs[344]),/* OBJ_id_cmc_popLinkRandom 1 3 6 1 5 5 7 7 22 */ | ||
2579 | &(nid_objs[345]),/* OBJ_id_cmc_popLinkWitness 1 3 6 1 5 5 7 7 23 */ | ||
2580 | &(nid_objs[346]),/* OBJ_id_cmc_confirmCertAcceptance 1 3 6 1 5 5 7 7 24 */ | ||
2581 | &(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */ | ||
2582 | &(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */ | ||
2583 | &(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */ | ||
2584 | &(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 3 */ | ||
2585 | &(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 4 */ | ||
2586 | &(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 5 */ | ||
2587 | &(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */ | ||
2588 | &(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */ | ||
2589 | &(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */ | ||
2590 | &(nid_objs[357]),/* OBJ_id_aca_group 1 3 6 1 5 5 7 10 4 */ | ||
2591 | &(nid_objs[358]),/* OBJ_id_aca_role 1 3 6 1 5 5 7 10 5 */ | ||
2592 | &(nid_objs[399]),/* OBJ_id_aca_encAttrs 1 3 6 1 5 5 7 10 6 */ | ||
2593 | &(nid_objs[359]),/* OBJ_id_qcs_pkixQCSyntax_v1 1 3 6 1 5 5 7 11 1 */ | ||
2594 | &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ | ||
2595 | &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ | ||
2596 | &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ | ||
2597 | &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ | ||
2598 | &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ | ||
2599 | &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ | ||
2600 | &(nid_objs[364]),/* OBJ_ad_dvcs 1 3 6 1 5 5 7 48 4 */ | ||
618 | &(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */ | 2601 | &(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */ |
619 | &(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */ | 2602 | &(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */ |
2603 | &(nid_objs[438]),/* OBJ_pilotAttributeType 0 9 2342 19200300 100 1 */ | ||
2604 | &(nid_objs[439]),/* OBJ_pilotAttributeSyntax 0 9 2342 19200300 100 3 */ | ||
2605 | &(nid_objs[440]),/* OBJ_pilotObjectClass 0 9 2342 19200300 100 4 */ | ||
2606 | &(nid_objs[441]),/* OBJ_pilotGroups 0 9 2342 19200300 100 10 */ | ||
620 | &(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */ | 2607 | &(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */ |
621 | &(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */ | 2608 | &(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */ |
622 | &(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */ | 2609 | &(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */ |
623 | &(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */ | 2610 | &(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */ |
2611 | &(nid_objs[396]),/* OBJ_md4WithRSAEncryption 1 2 840 113549 1 1 3 */ | ||
624 | &(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ | 2612 | &(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ |
625 | &(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ | 2613 | &(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ |
626 | &(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */ | 2614 | &(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */ |
627 | &(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */ | 2615 | &(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */ |
628 | &(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */ | 2616 | &(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */ |
629 | &(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */ | 2617 | &(nid_objs[168]),/* OBJ_pbeWithMD2AndRC2_CBC 1 2 840 113549 1 5 4 */ |
630 | &(nid_objs[69]),/* OBJ_pbeWithSHA1AndRC4 1 2 840 113549 1 5 12 */ | 2618 | &(nid_objs[169]),/* OBJ_pbeWithMD5AndRC2_CBC 1 2 840 113549 1 5 6 */ |
2619 | &(nid_objs[170]),/* OBJ_pbeWithSHA1AndDES_CBC 1 2 840 113549 1 5 10 */ | ||
2620 | &(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */ | ||
2621 | &(nid_objs[69]),/* OBJ_id_pbkdf2 1 2 840 113549 1 5 12 */ | ||
2622 | &(nid_objs[161]),/* OBJ_pbes2 1 2 840 113549 1 5 13 */ | ||
2623 | &(nid_objs[162]),/* OBJ_pbmac1 1 2 840 113549 1 5 14 */ | ||
631 | &(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */ | 2624 | &(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */ |
632 | &(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */ | 2625 | &(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */ |
633 | &(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */ | 2626 | &(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */ |
@@ -643,6 +2636,45 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | |||
643 | &(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */ | 2636 | &(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */ |
644 | &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */ | 2637 | &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */ |
645 | &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */ | 2638 | &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */ |
2639 | &(nid_objs[172]),/* OBJ_ext_req 1 2 840 113549 1 9 14 */ | ||
2640 | &(nid_objs[167]),/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */ | ||
2641 | &(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */ | ||
2642 | &(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */ | ||
2643 | &(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */ | ||
2644 | &(nid_objs[417]),/* OBJ_ms_csp_name 1 3 6 1 4 1 311 17 1 */ | ||
2645 | &(nid_objs[390]),/* OBJ_dcObject 1 3 6 1 4 1 1466 344 */ | ||
2646 | &(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */ | ||
2647 | &(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */ | ||
2648 | &(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */ | ||
2649 | &(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */ | ||
2650 | &(nid_objs[318]),/* OBJ_id_regCtrl_pkiArchiveOptions 1 3 6 1 5 5 7 5 1 4 */ | ||
2651 | &(nid_objs[319]),/* OBJ_id_regCtrl_oldCertID 1 3 6 1 5 5 7 5 1 5 */ | ||
2652 | &(nid_objs[320]),/* OBJ_id_regCtrl_protocolEncrKey 1 3 6 1 5 5 7 5 1 6 */ | ||
2653 | &(nid_objs[321]),/* OBJ_id_regInfo_utf8Pairs 1 3 6 1 5 5 7 5 2 1 */ | ||
2654 | &(nid_objs[322]),/* OBJ_id_regInfo_certReq 1 3 6 1 5 5 7 5 2 2 */ | ||
2655 | &(nid_objs[365]),/* OBJ_id_pkix_OCSP_basic 1 3 6 1 5 5 7 48 1 1 */ | ||
2656 | &(nid_objs[366]),/* OBJ_id_pkix_OCSP_Nonce 1 3 6 1 5 5 7 48 1 2 */ | ||
2657 | &(nid_objs[367]),/* OBJ_id_pkix_OCSP_CrlID 1 3 6 1 5 5 7 48 1 3 */ | ||
2658 | &(nid_objs[368]),/* OBJ_id_pkix_OCSP_acceptableResponses 1 3 6 1 5 5 7 48 1 4 */ | ||
2659 | &(nid_objs[369]),/* OBJ_id_pkix_OCSP_noCheck 1 3 6 1 5 5 7 48 1 5 */ | ||
2660 | &(nid_objs[370]),/* OBJ_id_pkix_OCSP_archiveCutoff 1 3 6 1 5 5 7 48 1 6 */ | ||
2661 | &(nid_objs[371]),/* OBJ_id_pkix_OCSP_serviceLocator 1 3 6 1 5 5 7 48 1 7 */ | ||
2662 | &(nid_objs[372]),/* OBJ_id_pkix_OCSP_extendedStatus 1 3 6 1 5 5 7 48 1 8 */ | ||
2663 | &(nid_objs[373]),/* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */ | ||
2664 | &(nid_objs[374]),/* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */ | ||
2665 | &(nid_objs[375]),/* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */ | ||
2666 | &(nid_objs[418]),/* OBJ_aes_128_ecb 2 16 840 1 101 3 4 1 1 */ | ||
2667 | &(nid_objs[419]),/* OBJ_aes_128_cbc 2 16 840 1 101 3 4 1 2 */ | ||
2668 | &(nid_objs[420]),/* OBJ_aes_128_ofb128 2 16 840 1 101 3 4 1 3 */ | ||
2669 | &(nid_objs[421]),/* OBJ_aes_128_cfb128 2 16 840 1 101 3 4 1 4 */ | ||
2670 | &(nid_objs[422]),/* OBJ_aes_192_ecb 2 16 840 1 101 3 4 1 21 */ | ||
2671 | &(nid_objs[423]),/* OBJ_aes_192_cbc 2 16 840 1 101 3 4 1 22 */ | ||
2672 | &(nid_objs[424]),/* OBJ_aes_192_ofb128 2 16 840 1 101 3 4 1 23 */ | ||
2673 | &(nid_objs[425]),/* OBJ_aes_192_cfb128 2 16 840 1 101 3 4 1 24 */ | ||
2674 | &(nid_objs[426]),/* OBJ_aes_256_ecb 2 16 840 1 101 3 4 1 41 */ | ||
2675 | &(nid_objs[427]),/* OBJ_aes_256_cbc 2 16 840 1 101 3 4 1 42 */ | ||
2676 | &(nid_objs[428]),/* OBJ_aes_256_ofb128 2 16 840 1 101 3 4 1 43 */ | ||
2677 | &(nid_objs[429]),/* OBJ_aes_256_cfb128 2 16 840 1 101 3 4 1 44 */ | ||
646 | &(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */ | 2678 | &(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */ |
647 | &(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */ | 2679 | &(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */ |
648 | &(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */ | 2680 | &(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */ |
@@ -652,5 +2684,159 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | |||
652 | &(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */ | 2684 | &(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */ |
653 | &(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */ | 2685 | &(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */ |
654 | &(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */ | 2686 | &(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */ |
2687 | &(nid_objs[139]),/* OBJ_ns_sgc 2 16 840 1 113730 4 1 */ | ||
2688 | &(nid_objs[458]),/* OBJ_userId 0 9 2342 19200300 100 1 1 */ | ||
2689 | &(nid_objs[459]),/* OBJ_textEncodedORAddress 0 9 2342 19200300 100 1 2 */ | ||
2690 | &(nid_objs[460]),/* OBJ_rfc822Mailbox 0 9 2342 19200300 100 1 3 */ | ||
2691 | &(nid_objs[461]),/* OBJ_info 0 9 2342 19200300 100 1 4 */ | ||
2692 | &(nid_objs[462]),/* OBJ_favouriteDrink 0 9 2342 19200300 100 1 5 */ | ||
2693 | &(nid_objs[463]),/* OBJ_roomNumber 0 9 2342 19200300 100 1 6 */ | ||
2694 | &(nid_objs[464]),/* OBJ_photo 0 9 2342 19200300 100 1 7 */ | ||
2695 | &(nid_objs[465]),/* OBJ_userClass 0 9 2342 19200300 100 1 8 */ | ||
2696 | &(nid_objs[466]),/* OBJ_host 0 9 2342 19200300 100 1 9 */ | ||
2697 | &(nid_objs[467]),/* OBJ_manager 0 9 2342 19200300 100 1 10 */ | ||
2698 | &(nid_objs[468]),/* OBJ_documentIdentifier 0 9 2342 19200300 100 1 11 */ | ||
2699 | &(nid_objs[469]),/* OBJ_documentTitle 0 9 2342 19200300 100 1 12 */ | ||
2700 | &(nid_objs[470]),/* OBJ_documentVersion 0 9 2342 19200300 100 1 13 */ | ||
2701 | &(nid_objs[471]),/* OBJ_documentAuthor 0 9 2342 19200300 100 1 14 */ | ||
2702 | &(nid_objs[472]),/* OBJ_documentLocation 0 9 2342 19200300 100 1 15 */ | ||
2703 | &(nid_objs[473]),/* OBJ_homeTelephoneNumber 0 9 2342 19200300 100 1 20 */ | ||
2704 | &(nid_objs[474]),/* OBJ_secretary 0 9 2342 19200300 100 1 21 */ | ||
2705 | &(nid_objs[475]),/* OBJ_otherMailbox 0 9 2342 19200300 100 1 22 */ | ||
2706 | &(nid_objs[476]),/* OBJ_lastModifiedTime 0 9 2342 19200300 100 1 23 */ | ||
2707 | &(nid_objs[477]),/* OBJ_lastModifiedBy 0 9 2342 19200300 100 1 24 */ | ||
2708 | &(nid_objs[391]),/* OBJ_domainComponent 0 9 2342 19200300 100 1 25 */ | ||
2709 | &(nid_objs[478]),/* OBJ_aRecord 0 9 2342 19200300 100 1 26 */ | ||
2710 | &(nid_objs[479]),/* OBJ_pilotAttributeType27 0 9 2342 19200300 100 1 27 */ | ||
2711 | &(nid_objs[480]),/* OBJ_mXRecord 0 9 2342 19200300 100 1 28 */ | ||
2712 | &(nid_objs[481]),/* OBJ_nSRecord 0 9 2342 19200300 100 1 29 */ | ||
2713 | &(nid_objs[482]),/* OBJ_sOARecord 0 9 2342 19200300 100 1 30 */ | ||
2714 | &(nid_objs[483]),/* OBJ_cNAMERecord 0 9 2342 19200300 100 1 31 */ | ||
2715 | &(nid_objs[484]),/* OBJ_associatedDomain 0 9 2342 19200300 100 1 37 */ | ||
2716 | &(nid_objs[485]),/* OBJ_associatedName 0 9 2342 19200300 100 1 38 */ | ||
2717 | &(nid_objs[486]),/* OBJ_homePostalAddress 0 9 2342 19200300 100 1 39 */ | ||
2718 | &(nid_objs[487]),/* OBJ_personalTitle 0 9 2342 19200300 100 1 40 */ | ||
2719 | &(nid_objs[488]),/* OBJ_mobileTelephoneNumber 0 9 2342 19200300 100 1 41 */ | ||
2720 | &(nid_objs[489]),/* OBJ_pagerTelephoneNumber 0 9 2342 19200300 100 1 42 */ | ||
2721 | &(nid_objs[490]),/* OBJ_friendlyCountryName 0 9 2342 19200300 100 1 43 */ | ||
2722 | &(nid_objs[491]),/* OBJ_organizationalStatus 0 9 2342 19200300 100 1 45 */ | ||
2723 | &(nid_objs[492]),/* OBJ_janetMailbox 0 9 2342 19200300 100 1 46 */ | ||
2724 | &(nid_objs[493]),/* OBJ_mailPreferenceOption 0 9 2342 19200300 100 1 47 */ | ||
2725 | &(nid_objs[494]),/* OBJ_buildingName 0 9 2342 19200300 100 1 48 */ | ||
2726 | &(nid_objs[495]),/* OBJ_dSAQuality 0 9 2342 19200300 100 1 49 */ | ||
2727 | &(nid_objs[496]),/* OBJ_singleLevelQuality 0 9 2342 19200300 100 1 50 */ | ||
2728 | &(nid_objs[497]),/* OBJ_subtreeMinimumQuality 0 9 2342 19200300 100 1 51 */ | ||
2729 | &(nid_objs[498]),/* OBJ_subtreeMaximumQuality 0 9 2342 19200300 100 1 52 */ | ||
2730 | &(nid_objs[499]),/* OBJ_personalSignature 0 9 2342 19200300 100 1 53 */ | ||
2731 | &(nid_objs[500]),/* OBJ_dITRedirect 0 9 2342 19200300 100 1 54 */ | ||
2732 | &(nid_objs[501]),/* OBJ_audio 0 9 2342 19200300 100 1 55 */ | ||
2733 | &(nid_objs[502]),/* OBJ_documentPublisher 0 9 2342 19200300 100 1 56 */ | ||
2734 | &(nid_objs[442]),/* OBJ_iA5StringSyntax 0 9 2342 19200300 100 3 4 */ | ||
2735 | &(nid_objs[443]),/* OBJ_caseIgnoreIA5StringSyntax 0 9 2342 19200300 100 3 5 */ | ||
2736 | &(nid_objs[444]),/* OBJ_pilotObject 0 9 2342 19200300 100 4 3 */ | ||
2737 | &(nid_objs[445]),/* OBJ_pilotPerson 0 9 2342 19200300 100 4 4 */ | ||
2738 | &(nid_objs[446]),/* OBJ_account 0 9 2342 19200300 100 4 5 */ | ||
2739 | &(nid_objs[447]),/* OBJ_document 0 9 2342 19200300 100 4 6 */ | ||
2740 | &(nid_objs[448]),/* OBJ_room 0 9 2342 19200300 100 4 7 */ | ||
2741 | &(nid_objs[449]),/* OBJ_documentSeries 0 9 2342 19200300 100 4 9 */ | ||
2742 | &(nid_objs[392]),/* OBJ_Domain 0 9 2342 19200300 100 4 13 */ | ||
2743 | &(nid_objs[450]),/* OBJ_rFC822localPart 0 9 2342 19200300 100 4 14 */ | ||
2744 | &(nid_objs[451]),/* OBJ_dNSDomain 0 9 2342 19200300 100 4 15 */ | ||
2745 | &(nid_objs[452]),/* OBJ_domainRelatedObject 0 9 2342 19200300 100 4 17 */ | ||
2746 | &(nid_objs[453]),/* OBJ_friendlyCountry 0 9 2342 19200300 100 4 18 */ | ||
2747 | &(nid_objs[454]),/* OBJ_simpleSecurityObject 0 9 2342 19200300 100 4 19 */ | ||
2748 | &(nid_objs[455]),/* OBJ_pilotOrganization 0 9 2342 19200300 100 4 20 */ | ||
2749 | &(nid_objs[456]),/* OBJ_pilotDSA 0 9 2342 19200300 100 4 21 */ | ||
2750 | &(nid_objs[457]),/* OBJ_qualityLabelledData 0 9 2342 19200300 100 4 22 */ | ||
2751 | &(nid_objs[189]),/* OBJ_id_smime_mod 1 2 840 113549 1 9 16 0 */ | ||
2752 | &(nid_objs[190]),/* OBJ_id_smime_ct 1 2 840 113549 1 9 16 1 */ | ||
2753 | &(nid_objs[191]),/* OBJ_id_smime_aa 1 2 840 113549 1 9 16 2 */ | ||
2754 | &(nid_objs[192]),/* OBJ_id_smime_alg 1 2 840 113549 1 9 16 3 */ | ||
2755 | &(nid_objs[193]),/* OBJ_id_smime_cd 1 2 840 113549 1 9 16 4 */ | ||
2756 | &(nid_objs[194]),/* OBJ_id_smime_spq 1 2 840 113549 1 9 16 5 */ | ||
2757 | &(nid_objs[195]),/* OBJ_id_smime_cti 1 2 840 113549 1 9 16 6 */ | ||
2758 | &(nid_objs[158]),/* OBJ_x509Certificate 1 2 840 113549 1 9 22 1 */ | ||
2759 | &(nid_objs[159]),/* OBJ_sdsiCertificate 1 2 840 113549 1 9 22 2 */ | ||
2760 | &(nid_objs[160]),/* OBJ_x509Crl 1 2 840 113549 1 9 23 1 */ | ||
2761 | &(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4 1 2 840 113549 1 12 1 1 */ | ||
2762 | &(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4 1 2 840 113549 1 12 1 2 */ | ||
2763 | &(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12 1 3 */ | ||
2764 | &(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12 1 4 */ | ||
2765 | &(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12 1 5 */ | ||
2766 | &(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC 1 2 840 113549 1 12 1 6 */ | ||
2767 | &(nid_objs[171]),/* OBJ_ms_ext_req 1 3 6 1 4 1 311 2 1 14 */ | ||
2768 | &(nid_objs[134]),/* OBJ_ms_code_ind 1 3 6 1 4 1 311 2 1 21 */ | ||
2769 | &(nid_objs[135]),/* OBJ_ms_code_com 1 3 6 1 4 1 311 2 1 22 */ | ||
2770 | &(nid_objs[136]),/* OBJ_ms_ctl_sign 1 3 6 1 4 1 311 10 3 1 */ | ||
2771 | &(nid_objs[137]),/* OBJ_ms_sgc 1 3 6 1 4 1 311 10 3 3 */ | ||
2772 | &(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */ | ||
2773 | &(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ | ||
2774 | &(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ | ||
2775 | &(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ | ||
2776 | &(nid_objs[199]),/* OBJ_id_smime_mod_msg_v3 1 2 840 113549 1 9 16 0 4 */ | ||
2777 | &(nid_objs[200]),/* OBJ_id_smime_mod_ets_eSignature_88 1 2 840 113549 1 9 16 0 5 */ | ||
2778 | &(nid_objs[201]),/* OBJ_id_smime_mod_ets_eSignature_97 1 2 840 113549 1 9 16 0 6 */ | ||
2779 | &(nid_objs[202]),/* OBJ_id_smime_mod_ets_eSigPolicy_88 1 2 840 113549 1 9 16 0 7 */ | ||
2780 | &(nid_objs[203]),/* OBJ_id_smime_mod_ets_eSigPolicy_97 1 2 840 113549 1 9 16 0 8 */ | ||
2781 | &(nid_objs[204]),/* OBJ_id_smime_ct_receipt 1 2 840 113549 1 9 16 1 1 */ | ||
2782 | &(nid_objs[205]),/* OBJ_id_smime_ct_authData 1 2 840 113549 1 9 16 1 2 */ | ||
2783 | &(nid_objs[206]),/* OBJ_id_smime_ct_publishCert 1 2 840 113549 1 9 16 1 3 */ | ||
2784 | &(nid_objs[207]),/* OBJ_id_smime_ct_TSTInfo 1 2 840 113549 1 9 16 1 4 */ | ||
2785 | &(nid_objs[208]),/* OBJ_id_smime_ct_TDTInfo 1 2 840 113549 1 9 16 1 5 */ | ||
2786 | &(nid_objs[209]),/* OBJ_id_smime_ct_contentInfo 1 2 840 113549 1 9 16 1 6 */ | ||
2787 | &(nid_objs[210]),/* OBJ_id_smime_ct_DVCSRequestData 1 2 840 113549 1 9 16 1 7 */ | ||
2788 | &(nid_objs[211]),/* OBJ_id_smime_ct_DVCSResponseData 1 2 840 113549 1 9 16 1 8 */ | ||
2789 | &(nid_objs[212]),/* OBJ_id_smime_aa_receiptRequest 1 2 840 113549 1 9 16 2 1 */ | ||
2790 | &(nid_objs[213]),/* OBJ_id_smime_aa_securityLabel 1 2 840 113549 1 9 16 2 2 */ | ||
2791 | &(nid_objs[214]),/* OBJ_id_smime_aa_mlExpandHistory 1 2 840 113549 1 9 16 2 3 */ | ||
2792 | &(nid_objs[215]),/* OBJ_id_smime_aa_contentHint 1 2 840 113549 1 9 16 2 4 */ | ||
2793 | &(nid_objs[216]),/* OBJ_id_smime_aa_msgSigDigest 1 2 840 113549 1 9 16 2 5 */ | ||
2794 | &(nid_objs[217]),/* OBJ_id_smime_aa_encapContentType 1 2 840 113549 1 9 16 2 6 */ | ||
2795 | &(nid_objs[218]),/* OBJ_id_smime_aa_contentIdentifier 1 2 840 113549 1 9 16 2 7 */ | ||
2796 | &(nid_objs[219]),/* OBJ_id_smime_aa_macValue 1 2 840 113549 1 9 16 2 8 */ | ||
2797 | &(nid_objs[220]),/* OBJ_id_smime_aa_equivalentLabels 1 2 840 113549 1 9 16 2 9 */ | ||
2798 | &(nid_objs[221]),/* OBJ_id_smime_aa_contentReference 1 2 840 113549 1 9 16 2 10 */ | ||
2799 | &(nid_objs[222]),/* OBJ_id_smime_aa_encrypKeyPref 1 2 840 113549 1 9 16 2 11 */ | ||
2800 | &(nid_objs[223]),/* OBJ_id_smime_aa_signingCertificate 1 2 840 113549 1 9 16 2 12 */ | ||
2801 | &(nid_objs[224]),/* OBJ_id_smime_aa_smimeEncryptCerts 1 2 840 113549 1 9 16 2 13 */ | ||
2802 | &(nid_objs[225]),/* OBJ_id_smime_aa_timeStampToken 1 2 840 113549 1 9 16 2 14 */ | ||
2803 | &(nid_objs[226]),/* OBJ_id_smime_aa_ets_sigPolicyId 1 2 840 113549 1 9 16 2 15 */ | ||
2804 | &(nid_objs[227]),/* OBJ_id_smime_aa_ets_commitmentType 1 2 840 113549 1 9 16 2 16 */ | ||
2805 | &(nid_objs[228]),/* OBJ_id_smime_aa_ets_signerLocation 1 2 840 113549 1 9 16 2 17 */ | ||
2806 | &(nid_objs[229]),/* OBJ_id_smime_aa_ets_signerAttr 1 2 840 113549 1 9 16 2 18 */ | ||
2807 | &(nid_objs[230]),/* OBJ_id_smime_aa_ets_otherSigCert 1 2 840 113549 1 9 16 2 19 */ | ||
2808 | &(nid_objs[231]),/* OBJ_id_smime_aa_ets_contentTimestamp 1 2 840 113549 1 9 16 2 20 */ | ||
2809 | &(nid_objs[232]),/* OBJ_id_smime_aa_ets_CertificateRefs 1 2 840 113549 1 9 16 2 21 */ | ||
2810 | &(nid_objs[233]),/* OBJ_id_smime_aa_ets_RevocationRefs 1 2 840 113549 1 9 16 2 22 */ | ||
2811 | &(nid_objs[234]),/* OBJ_id_smime_aa_ets_certValues 1 2 840 113549 1 9 16 2 23 */ | ||
2812 | &(nid_objs[235]),/* OBJ_id_smime_aa_ets_revocationValues 1 2 840 113549 1 9 16 2 24 */ | ||
2813 | &(nid_objs[236]),/* OBJ_id_smime_aa_ets_escTimeStamp 1 2 840 113549 1 9 16 2 25 */ | ||
2814 | &(nid_objs[237]),/* OBJ_id_smime_aa_ets_certCRLTimestamp 1 2 840 113549 1 9 16 2 26 */ | ||
2815 | &(nid_objs[238]),/* OBJ_id_smime_aa_ets_archiveTimeStamp 1 2 840 113549 1 9 16 2 27 */ | ||
2816 | &(nid_objs[239]),/* OBJ_id_smime_aa_signatureType 1 2 840 113549 1 9 16 2 28 */ | ||
2817 | &(nid_objs[240]),/* OBJ_id_smime_aa_dvcs_dvc 1 2 840 113549 1 9 16 2 29 */ | ||
2818 | &(nid_objs[241]),/* OBJ_id_smime_alg_ESDHwith3DES 1 2 840 113549 1 9 16 3 1 */ | ||
2819 | &(nid_objs[242]),/* OBJ_id_smime_alg_ESDHwithRC2 1 2 840 113549 1 9 16 3 2 */ | ||
2820 | &(nid_objs[243]),/* OBJ_id_smime_alg_3DESwrap 1 2 840 113549 1 9 16 3 3 */ | ||
2821 | &(nid_objs[244]),/* OBJ_id_smime_alg_RC2wrap 1 2 840 113549 1 9 16 3 4 */ | ||
2822 | &(nid_objs[245]),/* OBJ_id_smime_alg_ESDH 1 2 840 113549 1 9 16 3 5 */ | ||
2823 | &(nid_objs[246]),/* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */ | ||
2824 | &(nid_objs[247]),/* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */ | ||
2825 | &(nid_objs[248]),/* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */ | ||
2826 | &(nid_objs[249]),/* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */ | ||
2827 | &(nid_objs[250]),/* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */ | ||
2828 | &(nid_objs[251]),/* OBJ_id_smime_cti_ets_proofOfOrigin 1 2 840 113549 1 9 16 6 1 */ | ||
2829 | &(nid_objs[252]),/* OBJ_id_smime_cti_ets_proofOfReceipt 1 2 840 113549 1 9 16 6 2 */ | ||
2830 | &(nid_objs[253]),/* OBJ_id_smime_cti_ets_proofOfDelivery 1 2 840 113549 1 9 16 6 3 */ | ||
2831 | &(nid_objs[254]),/* OBJ_id_smime_cti_ets_proofOfSender 1 2 840 113549 1 9 16 6 4 */ | ||
2832 | &(nid_objs[255]),/* OBJ_id_smime_cti_ets_proofOfApproval 1 2 840 113549 1 9 16 6 5 */ | ||
2833 | &(nid_objs[256]),/* OBJ_id_smime_cti_ets_proofOfCreation 1 2 840 113549 1 9 16 6 6 */ | ||
2834 | &(nid_objs[150]),/* OBJ_keyBag 1 2 840 113549 1 12 10 1 1 */ | ||
2835 | &(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag 1 2 840 113549 1 12 10 1 2 */ | ||
2836 | &(nid_objs[152]),/* OBJ_certBag 1 2 840 113549 1 12 10 1 3 */ | ||
2837 | &(nid_objs[153]),/* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */ | ||
2838 | &(nid_objs[154]),/* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */ | ||
2839 | &(nid_objs[155]),/* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */ | ||
2840 | &(nid_objs[34]),/* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */ | ||
655 | }; | 2841 | }; |
656 | 2842 | ||
diff --git a/src/lib/libcrypto/objects/obj_mac.h b/src/lib/libcrypto/objects/obj_mac.h index 401b1e5a1b..6d77fcba3f 100644 --- a/src/lib/libcrypto/objects/obj_mac.h +++ b/src/lib/libcrypto/objects/obj_mac.h | |||
@@ -1,4 +1,10 @@ | |||
1 | /* lib/obj/obj_mac.h */ | 1 | /* crypto/objects/obj_mac.h */ |
2 | |||
3 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
4 | * following command: | ||
5 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
6 | */ | ||
7 | |||
2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 8 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 9 | * All rights reserved. |
4 | * | 10 | * |
@@ -56,26 +62,40 @@ | |||
56 | * [including the GNU Public Licence.] | 62 | * [including the GNU Public Licence.] |
57 | */ | 63 | */ |
58 | 64 | ||
59 | /* THIS FILE IS GENERATED FROM objects.txt by objects.pl via the | ||
60 | * following command: | ||
61 | * perl objects.pl objects.txt obj_mac.num obj_mac.h | ||
62 | */ | ||
63 | |||
64 | #define SN_undef "UNDEF" | 65 | #define SN_undef "UNDEF" |
65 | #define LN_undef "undefined" | 66 | #define LN_undef "undefined" |
66 | #define NID_undef 0 | 67 | #define NID_undef 0 |
67 | #define OBJ_undef 0L | 68 | #define OBJ_undef 0L |
68 | 69 | ||
70 | #define SN_ccitt "CCITT" | ||
71 | #define LN_ccitt "ccitt" | ||
72 | #define NID_ccitt 404 | ||
73 | #define OBJ_ccitt 0L | ||
74 | |||
69 | #define SN_iso "ISO" | 75 | #define SN_iso "ISO" |
70 | #define LN_iso "iso" | 76 | #define LN_iso "iso" |
71 | #define NID_iso 181 | 77 | #define NID_iso 181 |
72 | #define OBJ_iso 1L | 78 | #define OBJ_iso 1L |
73 | 79 | ||
80 | #define SN_joint_iso_ccitt "JOINT-ISO-CCITT" | ||
81 | #define LN_joint_iso_ccitt "joint-iso-ccitt" | ||
82 | #define NID_joint_iso_ccitt 393 | ||
83 | #define OBJ_joint_iso_ccitt 2L | ||
84 | |||
74 | #define SN_member_body "member-body" | 85 | #define SN_member_body "member-body" |
75 | #define LN_member_body "ISO Member Body" | 86 | #define LN_member_body "ISO Member Body" |
76 | #define NID_member_body 182 | 87 | #define NID_member_body 182 |
77 | #define OBJ_member_body OBJ_iso,2L | 88 | #define OBJ_member_body OBJ_iso,2L |
78 | 89 | ||
90 | #define SN_selected_attribute_types "selected-attribute-types" | ||
91 | #define LN_selected_attribute_types "Selected Attribute Types" | ||
92 | #define NID_selected_attribute_types 394 | ||
93 | #define OBJ_selected_attribute_types OBJ_joint_iso_ccitt,5L,1L,5L | ||
94 | |||
95 | #define SN_clearance "clearance" | ||
96 | #define NID_clearance 395 | ||
97 | #define OBJ_clearance OBJ_selected_attribute_types,55L | ||
98 | |||
79 | #define SN_ISO_US "ISO-US" | 99 | #define SN_ISO_US "ISO-US" |
80 | #define LN_ISO_US "ISO US Member Body" | 100 | #define LN_ISO_US "ISO US Member Body" |
81 | #define NID_ISO_US 183 | 101 | #define NID_ISO_US 183 |
@@ -101,6 +121,67 @@ | |||
101 | #define NID_dsaWithSHA1 113 | 121 | #define NID_dsaWithSHA1 113 |
102 | #define OBJ_dsaWithSHA1 OBJ_X9cm,3L | 122 | #define OBJ_dsaWithSHA1 OBJ_X9cm,3L |
103 | 123 | ||
124 | #define SN_ansi_X9_62 "ansi-X9-62" | ||
125 | #define LN_ansi_X9_62 "ANSI X9.62" | ||
126 | #define NID_ansi_X9_62 405 | ||
127 | #define OBJ_ansi_X9_62 OBJ_ISO_US,10045L | ||
128 | |||
129 | #define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L | ||
130 | |||
131 | #define SN_X9_62_prime_field "prime-field" | ||
132 | #define NID_X9_62_prime_field 406 | ||
133 | #define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L | ||
134 | |||
135 | #define SN_X9_62_characteristic_two_field "characteristic-two-field" | ||
136 | #define NID_X9_62_characteristic_two_field 407 | ||
137 | #define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L | ||
138 | |||
139 | #define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L | ||
140 | |||
141 | #define SN_X9_62_id_ecPublicKey "id-ecPublicKey" | ||
142 | #define NID_X9_62_id_ecPublicKey 408 | ||
143 | #define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L | ||
144 | |||
145 | #define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L | ||
146 | |||
147 | #define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L | ||
148 | |||
149 | #define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L | ||
150 | |||
151 | #define SN_X9_62_prime192v1 "prime192v1" | ||
152 | #define NID_X9_62_prime192v1 409 | ||
153 | #define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L | ||
154 | |||
155 | #define SN_X9_62_prime192v2 "prime192v2" | ||
156 | #define NID_X9_62_prime192v2 410 | ||
157 | #define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L | ||
158 | |||
159 | #define SN_X9_62_prime192v3 "prime192v3" | ||
160 | #define NID_X9_62_prime192v3 411 | ||
161 | #define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L | ||
162 | |||
163 | #define SN_X9_62_prime239v1 "prime239v1" | ||
164 | #define NID_X9_62_prime239v1 412 | ||
165 | #define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L | ||
166 | |||
167 | #define SN_X9_62_prime239v2 "prime239v2" | ||
168 | #define NID_X9_62_prime239v2 413 | ||
169 | #define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L | ||
170 | |||
171 | #define SN_X9_62_prime239v3 "prime239v3" | ||
172 | #define NID_X9_62_prime239v3 414 | ||
173 | #define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L | ||
174 | |||
175 | #define SN_X9_62_prime256v1 "prime256v1" | ||
176 | #define NID_X9_62_prime256v1 415 | ||
177 | #define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L | ||
178 | |||
179 | #define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L | ||
180 | |||
181 | #define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1" | ||
182 | #define NID_ecdsa_with_SHA1 416 | ||
183 | #define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L | ||
184 | |||
104 | #define SN_cast5_cbc "CAST5-CBC" | 185 | #define SN_cast5_cbc "CAST5-CBC" |
105 | #define LN_cast5_cbc "cast5-cbc" | 186 | #define LN_cast5_cbc "cast5-cbc" |
106 | #define NID_cast5_cbc 108 | 187 | #define NID_cast5_cbc 108 |
@@ -145,6 +226,11 @@ | |||
145 | #define NID_md2WithRSAEncryption 7 | 226 | #define NID_md2WithRSAEncryption 7 |
146 | #define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L | 227 | #define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L |
147 | 228 | ||
229 | #define SN_md4WithRSAEncryption "RSA-MD4" | ||
230 | #define LN_md4WithRSAEncryption "md4WithRSAEncryption" | ||
231 | #define NID_md4WithRSAEncryption 396 | ||
232 | #define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L | ||
233 | |||
148 | #define SN_md5WithRSAEncryption "RSA-MD5" | 234 | #define SN_md5WithRSAEncryption "RSA-MD5" |
149 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" | 235 | #define LN_md5WithRSAEncryption "md5WithRSAEncryption" |
150 | #define NID_md5WithRSAEncryption 8 | 236 | #define NID_md5WithRSAEncryption 8 |
@@ -241,7 +327,6 @@ | |||
241 | #define NID_pkcs9 47 | 327 | #define NID_pkcs9 47 |
242 | #define OBJ_pkcs9 OBJ_pkcs,9L | 328 | #define OBJ_pkcs9 OBJ_pkcs,9L |
243 | 329 | ||
244 | #define SN_pkcs9_emailAddress "Email" | ||
245 | #define LN_pkcs9_emailAddress "emailAddress" | 330 | #define LN_pkcs9_emailAddress "emailAddress" |
246 | #define NID_pkcs9_emailAddress 48 | 331 | #define NID_pkcs9_emailAddress 48 |
247 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L | 332 | #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L |
@@ -573,6 +658,11 @@ | |||
573 | #define NID_localKeyID 157 | 658 | #define NID_localKeyID 157 |
574 | #define OBJ_localKeyID OBJ_pkcs9,21L | 659 | #define OBJ_localKeyID OBJ_pkcs9,21L |
575 | 660 | ||
661 | #define SN_ms_csp_name "CSPName" | ||
662 | #define LN_ms_csp_name "Microsoft CSP Name" | ||
663 | #define NID_ms_csp_name 417 | ||
664 | #define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L | ||
665 | |||
576 | #define OBJ_certTypes OBJ_pkcs9,22L | 666 | #define OBJ_certTypes OBJ_pkcs9,22L |
577 | 667 | ||
578 | #define LN_x509Certificate "x509Certificate" | 668 | #define LN_x509Certificate "x509Certificate" |
@@ -956,6 +1046,15 @@ | |||
956 | #define NID_sbqp_routerIdentifier 292 | 1046 | #define NID_sbqp_routerIdentifier 292 |
957 | #define OBJ_sbqp_routerIdentifier OBJ_id_pe,9L | 1047 | #define OBJ_sbqp_routerIdentifier OBJ_id_pe,9L |
958 | 1048 | ||
1049 | #define SN_ac_proxying "ac-proxying" | ||
1050 | #define NID_ac_proxying 397 | ||
1051 | #define OBJ_ac_proxying OBJ_id_pe,10L | ||
1052 | |||
1053 | #define SN_sinfo_access "subjectInfoAccess" | ||
1054 | #define LN_sinfo_access "Subject Information Access" | ||
1055 | #define NID_sinfo_access 398 | ||
1056 | #define OBJ_sinfo_access OBJ_id_pe,11L | ||
1057 | |||
959 | #define SN_id_qt_cps "id-qt-cps" | 1058 | #define SN_id_qt_cps "id-qt-cps" |
960 | #define LN_id_qt_cps "Policy Qualifier CPS" | 1059 | #define LN_id_qt_cps "Policy Qualifier CPS" |
961 | #define NID_id_qt_cps 164 | 1060 | #define NID_id_qt_cps 164 |
@@ -1228,21 +1327,17 @@ | |||
1228 | #define NID_id_pda_placeOfBirth 349 | 1327 | #define NID_id_pda_placeOfBirth 349 |
1229 | #define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L | 1328 | #define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L |
1230 | 1329 | ||
1231 | #define SN_id_pda_pseudonym "id-pda-pseudonym" | ||
1232 | #define NID_id_pda_pseudonym 350 | ||
1233 | #define OBJ_id_pda_pseudonym OBJ_id_pda,3L | ||
1234 | |||
1235 | #define SN_id_pda_gender "id-pda-gender" | 1330 | #define SN_id_pda_gender "id-pda-gender" |
1236 | #define NID_id_pda_gender 351 | 1331 | #define NID_id_pda_gender 351 |
1237 | #define OBJ_id_pda_gender OBJ_id_pda,4L | 1332 | #define OBJ_id_pda_gender OBJ_id_pda,3L |
1238 | 1333 | ||
1239 | #define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" | 1334 | #define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" |
1240 | #define NID_id_pda_countryOfCitizenship 352 | 1335 | #define NID_id_pda_countryOfCitizenship 352 |
1241 | #define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,5L | 1336 | #define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L |
1242 | 1337 | ||
1243 | #define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" | 1338 | #define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" |
1244 | #define NID_id_pda_countryOfResidence 353 | 1339 | #define NID_id_pda_countryOfResidence 353 |
1245 | #define OBJ_id_pda_countryOfResidence OBJ_id_pda,6L | 1340 | #define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L |
1246 | 1341 | ||
1247 | #define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" | 1342 | #define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" |
1248 | #define NID_id_aca_authenticationInfo 354 | 1343 | #define NID_id_aca_authenticationInfo 354 |
@@ -1264,6 +1359,10 @@ | |||
1264 | #define NID_id_aca_role 358 | 1359 | #define NID_id_aca_role 358 |
1265 | #define OBJ_id_aca_role OBJ_id_aca,5L | 1360 | #define OBJ_id_aca_role OBJ_id_aca,5L |
1266 | 1361 | ||
1362 | #define SN_id_aca_encAttrs "id-aca-encAttrs" | ||
1363 | #define NID_id_aca_encAttrs 399 | ||
1364 | #define OBJ_id_aca_encAttrs OBJ_id_aca,6L | ||
1365 | |||
1267 | #define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" | 1366 | #define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" |
1268 | #define NID_id_qcs_pkixQCSyntax_v1 359 | 1367 | #define NID_id_qcs_pkixQCSyntax_v1 359 |
1269 | #define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L | 1368 | #define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L |
@@ -1323,6 +1422,7 @@ | |||
1323 | #define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L | 1422 | #define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L |
1324 | 1423 | ||
1325 | #define SN_id_pkix_OCSP_noCheck "noCheck" | 1424 | #define SN_id_pkix_OCSP_noCheck "noCheck" |
1425 | #define LN_id_pkix_OCSP_noCheck "OCSP No Check" | ||
1326 | #define NID_id_pkix_OCSP_noCheck 369 | 1426 | #define NID_id_pkix_OCSP_noCheck 369 |
1327 | #define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L | 1427 | #define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L |
1328 | 1428 | ||
@@ -1403,14 +1503,14 @@ | |||
1403 | #define NID_shaWithRSAEncryption 42 | 1503 | #define NID_shaWithRSAEncryption 42 |
1404 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L | 1504 | #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L |
1405 | 1505 | ||
1406 | #define SN_des_ede "DES-EDE" | 1506 | #define SN_des_ede_ecb "DES-EDE" |
1407 | #define LN_des_ede "des-ede" | 1507 | #define LN_des_ede_ecb "des-ede" |
1408 | #define NID_des_ede 32 | 1508 | #define NID_des_ede_ecb 32 |
1409 | #define OBJ_des_ede OBJ_algorithm,17L | 1509 | #define OBJ_des_ede_ecb OBJ_algorithm,17L |
1410 | 1510 | ||
1411 | #define SN_des_ede3 "DES-EDE3" | 1511 | #define SN_des_ede3_ecb "DES-EDE3" |
1412 | #define LN_des_ede3 "des-ede3" | 1512 | #define LN_des_ede3_ecb "des-ede3" |
1413 | #define NID_des_ede3 33 | 1513 | #define NID_des_ede3_ecb 33 |
1414 | 1514 | ||
1415 | #define SN_des_ede_cbc "DES-EDE-CBC" | 1515 | #define SN_des_ede_cbc "DES-EDE-CBC" |
1416 | #define LN_des_ede_cbc "des-ede-cbc" | 1516 | #define LN_des_ede_cbc "des-ede-cbc" |
@@ -1485,12 +1585,11 @@ | |||
1485 | #define NID_commonName 13 | 1585 | #define NID_commonName 13 |
1486 | #define OBJ_commonName OBJ_X509,3L | 1586 | #define OBJ_commonName OBJ_X509,3L |
1487 | 1587 | ||
1488 | #define SN_surname "S" | 1588 | #define SN_surname "SN" |
1489 | #define LN_surname "surname" | 1589 | #define LN_surname "surname" |
1490 | #define NID_surname 100 | 1590 | #define NID_surname 100 |
1491 | #define OBJ_surname OBJ_X509,4L | 1591 | #define OBJ_surname OBJ_X509,4L |
1492 | 1592 | ||
1493 | #define SN_serialNumber "SN" | ||
1494 | #define LN_serialNumber "serialNumber" | 1593 | #define LN_serialNumber "serialNumber" |
1495 | #define NID_serialNumber 105 | 1594 | #define NID_serialNumber 105 |
1496 | #define OBJ_serialNumber OBJ_X509,5L | 1595 | #define OBJ_serialNumber OBJ_X509,5L |
@@ -1520,12 +1619,10 @@ | |||
1520 | #define NID_organizationalUnitName 18 | 1619 | #define NID_organizationalUnitName 18 |
1521 | #define OBJ_organizationalUnitName OBJ_X509,11L | 1620 | #define OBJ_organizationalUnitName OBJ_X509,11L |
1522 | 1621 | ||
1523 | #define SN_title "T" | ||
1524 | #define LN_title "title" | 1622 | #define LN_title "title" |
1525 | #define NID_title 106 | 1623 | #define NID_title 106 |
1526 | #define OBJ_title OBJ_X509,12L | 1624 | #define OBJ_title OBJ_X509,12L |
1527 | 1625 | ||
1528 | #define SN_description "D" | ||
1529 | #define LN_description "description" | 1626 | #define LN_description "description" |
1530 | #define NID_description 107 | 1627 | #define NID_description 107 |
1531 | #define OBJ_description OBJ_X509,13L | 1628 | #define OBJ_description OBJ_X509,13L |
@@ -1535,26 +1632,33 @@ | |||
1535 | #define NID_name 173 | 1632 | #define NID_name 173 |
1536 | #define OBJ_name OBJ_X509,41L | 1633 | #define OBJ_name OBJ_X509,41L |
1537 | 1634 | ||
1538 | #define SN_givenName "G" | 1635 | #define SN_givenName "gn" |
1539 | #define LN_givenName "givenName" | 1636 | #define LN_givenName "givenName" |
1540 | #define NID_givenName 99 | 1637 | #define NID_givenName 99 |
1541 | #define OBJ_givenName OBJ_X509,42L | 1638 | #define OBJ_givenName OBJ_X509,42L |
1542 | 1639 | ||
1543 | #define SN_initials "I" | ||
1544 | #define LN_initials "initials" | 1640 | #define LN_initials "initials" |
1545 | #define NID_initials 101 | 1641 | #define NID_initials 101 |
1546 | #define OBJ_initials OBJ_X509,43L | 1642 | #define OBJ_initials OBJ_X509,43L |
1547 | 1643 | ||
1548 | #define SN_uniqueIdentifier "UID" | 1644 | #define LN_generationQualifier "generationQualifier" |
1549 | #define LN_uniqueIdentifier "uniqueIdentifier" | 1645 | #define NID_generationQualifier 509 |
1550 | #define NID_uniqueIdentifier 102 | 1646 | #define OBJ_generationQualifier OBJ_X509,44L |
1551 | #define OBJ_uniqueIdentifier OBJ_X509,45L | 1647 | |
1648 | #define LN_x500UniqueIdentifier "x500UniqueIdentifier" | ||
1649 | #define NID_x500UniqueIdentifier 503 | ||
1650 | #define OBJ_x500UniqueIdentifier OBJ_X509,45L | ||
1552 | 1651 | ||
1553 | #define SN_dnQualifier "dnQualifier" | 1652 | #define SN_dnQualifier "dnQualifier" |
1554 | #define LN_dnQualifier "dnQualifier" | 1653 | #define LN_dnQualifier "dnQualifier" |
1555 | #define NID_dnQualifier 174 | 1654 | #define NID_dnQualifier 174 |
1556 | #define OBJ_dnQualifier OBJ_X509,46L | 1655 | #define OBJ_dnQualifier OBJ_X509,46L |
1557 | 1656 | ||
1657 | #define SN_role "role" | ||
1658 | #define LN_role "role" | ||
1659 | #define NID_role 400 | ||
1660 | #define OBJ_role OBJ_X509,72L | ||
1661 | |||
1558 | #define SN_X500algorithms "X500algorithms" | 1662 | #define SN_X500algorithms "X500algorithms" |
1559 | #define LN_X500algorithms "directory services - algorithms" | 1663 | #define LN_X500algorithms "directory services - algorithms" |
1560 | #define NID_X500algorithms 378 | 1664 | #define NID_X500algorithms 378 |
@@ -1644,11 +1748,26 @@ | |||
1644 | #define NID_authority_key_identifier 90 | 1748 | #define NID_authority_key_identifier 90 |
1645 | #define OBJ_authority_key_identifier OBJ_id_ce,35L | 1749 | #define OBJ_authority_key_identifier OBJ_id_ce,35L |
1646 | 1750 | ||
1751 | #define SN_policy_constraints "policyConstraints" | ||
1752 | #define LN_policy_constraints "X509v3 Policy Constraints" | ||
1753 | #define NID_policy_constraints 401 | ||
1754 | #define OBJ_policy_constraints OBJ_id_ce,36L | ||
1755 | |||
1647 | #define SN_ext_key_usage "extendedKeyUsage" | 1756 | #define SN_ext_key_usage "extendedKeyUsage" |
1648 | #define LN_ext_key_usage "X509v3 Extended Key Usage" | 1757 | #define LN_ext_key_usage "X509v3 Extended Key Usage" |
1649 | #define NID_ext_key_usage 126 | 1758 | #define NID_ext_key_usage 126 |
1650 | #define OBJ_ext_key_usage OBJ_id_ce,37L | 1759 | #define OBJ_ext_key_usage OBJ_id_ce,37L |
1651 | 1760 | ||
1761 | #define SN_target_information "targetInformation" | ||
1762 | #define LN_target_information "X509v3 AC Targeting" | ||
1763 | #define NID_target_information 402 | ||
1764 | #define OBJ_target_information OBJ_id_ce,55L | ||
1765 | |||
1766 | #define SN_no_rev_avail "noRevAvail" | ||
1767 | #define LN_no_rev_avail "X509v3 No Revocation Available" | ||
1768 | #define NID_no_rev_avail 403 | ||
1769 | #define OBJ_no_rev_avail OBJ_id_ce,56L | ||
1770 | |||
1652 | #define SN_netscape "Netscape" | 1771 | #define SN_netscape "Netscape" |
1653 | #define LN_netscape "Netscape Communications Corp." | 1772 | #define LN_netscape "Netscape Communications Corp." |
1654 | #define NID_netscape 57 | 1773 | #define NID_netscape 57 |
@@ -1761,7 +1880,6 @@ | |||
1761 | #define NID_SNMPv2 387 | 1880 | #define NID_SNMPv2 387 |
1762 | #define OBJ_SNMPv2 OBJ_internet,6L | 1881 | #define OBJ_SNMPv2 OBJ_internet,6L |
1763 | 1882 | ||
1764 | #define SN_Mail "mail" | ||
1765 | #define LN_Mail "Mail" | 1883 | #define LN_Mail "Mail" |
1766 | #define NID_Mail 388 | 1884 | #define NID_Mail 388 |
1767 | #define OBJ_Mail OBJ_internet,7L | 1885 | #define OBJ_Mail OBJ_internet,7L |
@@ -1769,22 +1887,37 @@ | |||
1769 | #define SN_Enterprises "enterprises" | 1887 | #define SN_Enterprises "enterprises" |
1770 | #define LN_Enterprises "Enterprises" | 1888 | #define LN_Enterprises "Enterprises" |
1771 | #define NID_Enterprises 389 | 1889 | #define NID_Enterprises 389 |
1772 | #define OBJ_Enterprises OBJ_private,1L | 1890 | #define OBJ_Enterprises OBJ_Private,1L |
1773 | 1891 | ||
1774 | #define SN_dcObject "dcobject" | 1892 | #define SN_dcObject "dcobject" |
1775 | #define LN_dcObject "dcObject" | 1893 | #define LN_dcObject "dcObject" |
1776 | #define NID_dcObject 390 | 1894 | #define NID_dcObject 390 |
1777 | #define OBJ_dcObject OBJ_enterprises,1466L,344L | 1895 | #define OBJ_dcObject OBJ_Enterprises,1466L,344L |
1778 | 1896 | ||
1779 | #define SN_domainComponent "DC" | 1897 | #define SN_mime_mhs "mime-mhs" |
1780 | #define LN_domainComponent "domainComponent" | 1898 | #define LN_mime_mhs "MIME MHS" |
1781 | #define NID_domainComponent 391 | 1899 | #define NID_mime_mhs 504 |
1782 | #define OBJ_domainComponent 0L,9L,2342L,19200300L,100L,1L,25L | 1900 | #define OBJ_mime_mhs OBJ_Mail,1L |
1783 | 1901 | ||
1784 | #define SN_Domain "domain" | 1902 | #define SN_mime_mhs_headings "mime-mhs-headings" |
1785 | #define LN_Domain "Domain" | 1903 | #define LN_mime_mhs_headings "mime-mhs-headings" |
1786 | #define NID_Domain 392 | 1904 | #define NID_mime_mhs_headings 505 |
1787 | #define OBJ_Domain 0L,9L,2342L,19200300L,100L,4L,13L | 1905 | #define OBJ_mime_mhs_headings OBJ_mime_mhs,1L |
1906 | |||
1907 | #define SN_mime_mhs_bodies "mime-mhs-bodies" | ||
1908 | #define LN_mime_mhs_bodies "mime-mhs-bodies" | ||
1909 | #define NID_mime_mhs_bodies 506 | ||
1910 | #define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L | ||
1911 | |||
1912 | #define SN_id_hex_partial_message "id-hex-partial-message" | ||
1913 | #define LN_id_hex_partial_message "id-hex-partial-message" | ||
1914 | #define NID_id_hex_partial_message 507 | ||
1915 | #define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L | ||
1916 | |||
1917 | #define SN_id_hex_multipart_message "id-hex-multipart-message" | ||
1918 | #define LN_id_hex_multipart_message "id-hex-multipart-message" | ||
1919 | #define NID_id_hex_multipart_message 508 | ||
1920 | #define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L | ||
1788 | 1921 | ||
1789 | #define SN_rle_compression "RLE" | 1922 | #define SN_rle_compression "RLE" |
1790 | #define LN_rle_compression "run length compression" | 1923 | #define LN_rle_compression "run length compression" |
@@ -1796,3 +1929,379 @@ | |||
1796 | #define NID_zlib_compression 125 | 1929 | #define NID_zlib_compression 125 |
1797 | #define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L | 1930 | #define OBJ_zlib_compression 1L,1L,1L,1L,666L,2L |
1798 | 1931 | ||
1932 | #define OBJ_csor 2L,16L,840L,1L,101L,3L | ||
1933 | |||
1934 | #define OBJ_nistAlgorithms OBJ_csor,4L | ||
1935 | |||
1936 | #define OBJ_aes OBJ_nistAlgorithms,1L | ||
1937 | |||
1938 | #define SN_aes_128_ecb "AES-128-ECB" | ||
1939 | #define LN_aes_128_ecb "aes-128-ecb" | ||
1940 | #define NID_aes_128_ecb 418 | ||
1941 | #define OBJ_aes_128_ecb OBJ_aes,1L | ||
1942 | |||
1943 | #define SN_aes_128_cbc "AES-128-CBC" | ||
1944 | #define LN_aes_128_cbc "aes-128-cbc" | ||
1945 | #define NID_aes_128_cbc 419 | ||
1946 | #define OBJ_aes_128_cbc OBJ_aes,2L | ||
1947 | |||
1948 | #define SN_aes_128_ofb128 "AES-128-OFB" | ||
1949 | #define LN_aes_128_ofb128 "aes-128-ofb" | ||
1950 | #define NID_aes_128_ofb128 420 | ||
1951 | #define OBJ_aes_128_ofb128 OBJ_aes,3L | ||
1952 | |||
1953 | #define SN_aes_128_cfb128 "AES-128-CFB" | ||
1954 | #define LN_aes_128_cfb128 "aes-128-cfb" | ||
1955 | #define NID_aes_128_cfb128 421 | ||
1956 | #define OBJ_aes_128_cfb128 OBJ_aes,4L | ||
1957 | |||
1958 | #define SN_aes_192_ecb "AES-192-ECB" | ||
1959 | #define LN_aes_192_ecb "aes-192-ecb" | ||
1960 | #define NID_aes_192_ecb 422 | ||
1961 | #define OBJ_aes_192_ecb OBJ_aes,21L | ||
1962 | |||
1963 | #define SN_aes_192_cbc "AES-192-CBC" | ||
1964 | #define LN_aes_192_cbc "aes-192-cbc" | ||
1965 | #define NID_aes_192_cbc 423 | ||
1966 | #define OBJ_aes_192_cbc OBJ_aes,22L | ||
1967 | |||
1968 | #define SN_aes_192_ofb128 "AES-192-OFB" | ||
1969 | #define LN_aes_192_ofb128 "aes-192-ofb" | ||
1970 | #define NID_aes_192_ofb128 424 | ||
1971 | #define OBJ_aes_192_ofb128 OBJ_aes,23L | ||
1972 | |||
1973 | #define SN_aes_192_cfb128 "AES-192-CFB" | ||
1974 | #define LN_aes_192_cfb128 "aes-192-cfb" | ||
1975 | #define NID_aes_192_cfb128 425 | ||
1976 | #define OBJ_aes_192_cfb128 OBJ_aes,24L | ||
1977 | |||
1978 | #define SN_aes_256_ecb "AES-256-ECB" | ||
1979 | #define LN_aes_256_ecb "aes-256-ecb" | ||
1980 | #define NID_aes_256_ecb 426 | ||
1981 | #define OBJ_aes_256_ecb OBJ_aes,41L | ||
1982 | |||
1983 | #define SN_aes_256_cbc "AES-256-CBC" | ||
1984 | #define LN_aes_256_cbc "aes-256-cbc" | ||
1985 | #define NID_aes_256_cbc 427 | ||
1986 | #define OBJ_aes_256_cbc OBJ_aes,42L | ||
1987 | |||
1988 | #define SN_aes_256_ofb128 "AES-256-OFB" | ||
1989 | #define LN_aes_256_ofb128 "aes-256-ofb" | ||
1990 | #define NID_aes_256_ofb128 428 | ||
1991 | #define OBJ_aes_256_ofb128 OBJ_aes,43L | ||
1992 | |||
1993 | #define SN_aes_256_cfb128 "AES-256-CFB" | ||
1994 | #define LN_aes_256_cfb128 "aes-256-cfb" | ||
1995 | #define NID_aes_256_cfb128 429 | ||
1996 | #define OBJ_aes_256_cfb128 OBJ_aes,44L | ||
1997 | |||
1998 | #define SN_hold_instruction_code "holdInstructionCode" | ||
1999 | #define LN_hold_instruction_code "Hold Instruction Code" | ||
2000 | #define NID_hold_instruction_code 430 | ||
2001 | #define OBJ_hold_instruction_code OBJ_id_ce,23L | ||
2002 | |||
2003 | #define OBJ_holdInstruction OBJ_X9_57,2L | ||
2004 | |||
2005 | #define SN_hold_instruction_none "holdInstructionNone" | ||
2006 | #define LN_hold_instruction_none "Hold Instruction None" | ||
2007 | #define NID_hold_instruction_none 431 | ||
2008 | #define OBJ_hold_instruction_none OBJ_holdInstruction,1L | ||
2009 | |||
2010 | #define SN_hold_instruction_call_issuer "holdInstructionCallIssuer" | ||
2011 | #define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer" | ||
2012 | #define NID_hold_instruction_call_issuer 432 | ||
2013 | #define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L | ||
2014 | |||
2015 | #define SN_hold_instruction_reject "holdInstructionReject" | ||
2016 | #define LN_hold_instruction_reject "Hold Instruction Reject" | ||
2017 | #define NID_hold_instruction_reject 433 | ||
2018 | #define OBJ_hold_instruction_reject OBJ_holdInstruction,3L | ||
2019 | |||
2020 | #define SN_data "data" | ||
2021 | #define NID_data 434 | ||
2022 | #define OBJ_data OBJ_ccitt,9L | ||
2023 | |||
2024 | #define SN_pss "pss" | ||
2025 | #define NID_pss 435 | ||
2026 | #define OBJ_pss OBJ_data,2342L | ||
2027 | |||
2028 | #define SN_ucl "ucl" | ||
2029 | #define NID_ucl 436 | ||
2030 | #define OBJ_ucl OBJ_pss,19200300L | ||
2031 | |||
2032 | #define SN_pilot "pilot" | ||
2033 | #define NID_pilot 437 | ||
2034 | #define OBJ_pilot OBJ_ucl,100L | ||
2035 | |||
2036 | #define LN_pilotAttributeType "pilotAttributeType" | ||
2037 | #define NID_pilotAttributeType 438 | ||
2038 | #define OBJ_pilotAttributeType OBJ_pilot,1L | ||
2039 | |||
2040 | #define LN_pilotAttributeSyntax "pilotAttributeSyntax" | ||
2041 | #define NID_pilotAttributeSyntax 439 | ||
2042 | #define OBJ_pilotAttributeSyntax OBJ_pilot,3L | ||
2043 | |||
2044 | #define LN_pilotObjectClass "pilotObjectClass" | ||
2045 | #define NID_pilotObjectClass 440 | ||
2046 | #define OBJ_pilotObjectClass OBJ_pilot,4L | ||
2047 | |||
2048 | #define LN_pilotGroups "pilotGroups" | ||
2049 | #define NID_pilotGroups 441 | ||
2050 | #define OBJ_pilotGroups OBJ_pilot,10L | ||
2051 | |||
2052 | #define LN_iA5StringSyntax "iA5StringSyntax" | ||
2053 | #define NID_iA5StringSyntax 442 | ||
2054 | #define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L | ||
2055 | |||
2056 | #define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax" | ||
2057 | #define NID_caseIgnoreIA5StringSyntax 443 | ||
2058 | #define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L | ||
2059 | |||
2060 | #define LN_pilotObject "pilotObject" | ||
2061 | #define NID_pilotObject 444 | ||
2062 | #define OBJ_pilotObject OBJ_pilotObjectClass,3L | ||
2063 | |||
2064 | #define LN_pilotPerson "pilotPerson" | ||
2065 | #define NID_pilotPerson 445 | ||
2066 | #define OBJ_pilotPerson OBJ_pilotObjectClass,4L | ||
2067 | |||
2068 | #define SN_account "account" | ||
2069 | #define NID_account 446 | ||
2070 | #define OBJ_account OBJ_pilotObjectClass,5L | ||
2071 | |||
2072 | #define SN_document "document" | ||
2073 | #define NID_document 447 | ||
2074 | #define OBJ_document OBJ_pilotObjectClass,6L | ||
2075 | |||
2076 | #define SN_room "room" | ||
2077 | #define NID_room 448 | ||
2078 | #define OBJ_room OBJ_pilotObjectClass,7L | ||
2079 | |||
2080 | #define LN_documentSeries "documentSeries" | ||
2081 | #define NID_documentSeries 449 | ||
2082 | #define OBJ_documentSeries OBJ_pilotObjectClass,9L | ||
2083 | |||
2084 | #define SN_Domain "domain" | ||
2085 | #define LN_Domain "Domain" | ||
2086 | #define NID_Domain 392 | ||
2087 | #define OBJ_Domain OBJ_pilotObjectClass,13L | ||
2088 | |||
2089 | #define LN_rFC822localPart "rFC822localPart" | ||
2090 | #define NID_rFC822localPart 450 | ||
2091 | #define OBJ_rFC822localPart OBJ_pilotObjectClass,14L | ||
2092 | |||
2093 | #define LN_dNSDomain "dNSDomain" | ||
2094 | #define NID_dNSDomain 451 | ||
2095 | #define OBJ_dNSDomain OBJ_pilotObjectClass,15L | ||
2096 | |||
2097 | #define LN_domainRelatedObject "domainRelatedObject" | ||
2098 | #define NID_domainRelatedObject 452 | ||
2099 | #define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L | ||
2100 | |||
2101 | #define LN_friendlyCountry "friendlyCountry" | ||
2102 | #define NID_friendlyCountry 453 | ||
2103 | #define OBJ_friendlyCountry OBJ_pilotObjectClass,18L | ||
2104 | |||
2105 | #define LN_simpleSecurityObject "simpleSecurityObject" | ||
2106 | #define NID_simpleSecurityObject 454 | ||
2107 | #define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L | ||
2108 | |||
2109 | #define LN_pilotOrganization "pilotOrganization" | ||
2110 | #define NID_pilotOrganization 455 | ||
2111 | #define OBJ_pilotOrganization OBJ_pilotObjectClass,20L | ||
2112 | |||
2113 | #define LN_pilotDSA "pilotDSA" | ||
2114 | #define NID_pilotDSA 456 | ||
2115 | #define OBJ_pilotDSA OBJ_pilotObjectClass,21L | ||
2116 | |||
2117 | #define LN_qualityLabelledData "qualityLabelledData" | ||
2118 | #define NID_qualityLabelledData 457 | ||
2119 | #define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L | ||
2120 | |||
2121 | #define SN_userId "UID" | ||
2122 | #define LN_userId "userId" | ||
2123 | #define NID_userId 458 | ||
2124 | #define OBJ_userId OBJ_pilotAttributeType,1L | ||
2125 | |||
2126 | #define LN_textEncodedORAddress "textEncodedORAddress" | ||
2127 | #define NID_textEncodedORAddress 459 | ||
2128 | #define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L | ||
2129 | |||
2130 | #define SN_rfc822Mailbox "mail" | ||
2131 | #define LN_rfc822Mailbox "rfc822Mailbox" | ||
2132 | #define NID_rfc822Mailbox 460 | ||
2133 | #define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L | ||
2134 | |||
2135 | #define SN_info "info" | ||
2136 | #define NID_info 461 | ||
2137 | #define OBJ_info OBJ_pilotAttributeType,4L | ||
2138 | |||
2139 | #define LN_favouriteDrink "favouriteDrink" | ||
2140 | #define NID_favouriteDrink 462 | ||
2141 | #define OBJ_favouriteDrink OBJ_pilotAttributeType,5L | ||
2142 | |||
2143 | #define LN_roomNumber "roomNumber" | ||
2144 | #define NID_roomNumber 463 | ||
2145 | #define OBJ_roomNumber OBJ_pilotAttributeType,6L | ||
2146 | |||
2147 | #define SN_photo "photo" | ||
2148 | #define NID_photo 464 | ||
2149 | #define OBJ_photo OBJ_pilotAttributeType,7L | ||
2150 | |||
2151 | #define LN_userClass "userClass" | ||
2152 | #define NID_userClass 465 | ||
2153 | #define OBJ_userClass OBJ_pilotAttributeType,8L | ||
2154 | |||
2155 | #define SN_host "host" | ||
2156 | #define NID_host 466 | ||
2157 | #define OBJ_host OBJ_pilotAttributeType,9L | ||
2158 | |||
2159 | #define SN_manager "manager" | ||
2160 | #define NID_manager 467 | ||
2161 | #define OBJ_manager OBJ_pilotAttributeType,10L | ||
2162 | |||
2163 | #define LN_documentIdentifier "documentIdentifier" | ||
2164 | #define NID_documentIdentifier 468 | ||
2165 | #define OBJ_documentIdentifier OBJ_pilotAttributeType,11L | ||
2166 | |||
2167 | #define LN_documentTitle "documentTitle" | ||
2168 | #define NID_documentTitle 469 | ||
2169 | #define OBJ_documentTitle OBJ_pilotAttributeType,12L | ||
2170 | |||
2171 | #define LN_documentVersion "documentVersion" | ||
2172 | #define NID_documentVersion 470 | ||
2173 | #define OBJ_documentVersion OBJ_pilotAttributeType,13L | ||
2174 | |||
2175 | #define LN_documentAuthor "documentAuthor" | ||
2176 | #define NID_documentAuthor 471 | ||
2177 | #define OBJ_documentAuthor OBJ_pilotAttributeType,14L | ||
2178 | |||
2179 | #define LN_documentLocation "documentLocation" | ||
2180 | #define NID_documentLocation 472 | ||
2181 | #define OBJ_documentLocation OBJ_pilotAttributeType,15L | ||
2182 | |||
2183 | #define LN_homeTelephoneNumber "homeTelephoneNumber" | ||
2184 | #define NID_homeTelephoneNumber 473 | ||
2185 | #define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L | ||
2186 | |||
2187 | #define SN_secretary "secretary" | ||
2188 | #define NID_secretary 474 | ||
2189 | #define OBJ_secretary OBJ_pilotAttributeType,21L | ||
2190 | |||
2191 | #define LN_otherMailbox "otherMailbox" | ||
2192 | #define NID_otherMailbox 475 | ||
2193 | #define OBJ_otherMailbox OBJ_pilotAttributeType,22L | ||
2194 | |||
2195 | #define LN_lastModifiedTime "lastModifiedTime" | ||
2196 | #define NID_lastModifiedTime 476 | ||
2197 | #define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L | ||
2198 | |||
2199 | #define LN_lastModifiedBy "lastModifiedBy" | ||
2200 | #define NID_lastModifiedBy 477 | ||
2201 | #define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L | ||
2202 | |||
2203 | #define SN_domainComponent "DC" | ||
2204 | #define LN_domainComponent "domainComponent" | ||
2205 | #define NID_domainComponent 391 | ||
2206 | #define OBJ_domainComponent OBJ_pilotAttributeType,25L | ||
2207 | |||
2208 | #define LN_aRecord "aRecord" | ||
2209 | #define NID_aRecord 478 | ||
2210 | #define OBJ_aRecord OBJ_pilotAttributeType,26L | ||
2211 | |||
2212 | #define LN_pilotAttributeType27 "pilotAttributeType27" | ||
2213 | #define NID_pilotAttributeType27 479 | ||
2214 | #define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L | ||
2215 | |||
2216 | #define LN_mXRecord "mXRecord" | ||
2217 | #define NID_mXRecord 480 | ||
2218 | #define OBJ_mXRecord OBJ_pilotAttributeType,28L | ||
2219 | |||
2220 | #define LN_nSRecord "nSRecord" | ||
2221 | #define NID_nSRecord 481 | ||
2222 | #define OBJ_nSRecord OBJ_pilotAttributeType,29L | ||
2223 | |||
2224 | #define LN_sOARecord "sOARecord" | ||
2225 | #define NID_sOARecord 482 | ||
2226 | #define OBJ_sOARecord OBJ_pilotAttributeType,30L | ||
2227 | |||
2228 | #define LN_cNAMERecord "cNAMERecord" | ||
2229 | #define NID_cNAMERecord 483 | ||
2230 | #define OBJ_cNAMERecord OBJ_pilotAttributeType,31L | ||
2231 | |||
2232 | #define LN_associatedDomain "associatedDomain" | ||
2233 | #define NID_associatedDomain 484 | ||
2234 | #define OBJ_associatedDomain OBJ_pilotAttributeType,37L | ||
2235 | |||
2236 | #define LN_associatedName "associatedName" | ||
2237 | #define NID_associatedName 485 | ||
2238 | #define OBJ_associatedName OBJ_pilotAttributeType,38L | ||
2239 | |||
2240 | #define LN_homePostalAddress "homePostalAddress" | ||
2241 | #define NID_homePostalAddress 486 | ||
2242 | #define OBJ_homePostalAddress OBJ_pilotAttributeType,39L | ||
2243 | |||
2244 | #define LN_personalTitle "personalTitle" | ||
2245 | #define NID_personalTitle 487 | ||
2246 | #define OBJ_personalTitle OBJ_pilotAttributeType,40L | ||
2247 | |||
2248 | #define LN_mobileTelephoneNumber "mobileTelephoneNumber" | ||
2249 | #define NID_mobileTelephoneNumber 488 | ||
2250 | #define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L | ||
2251 | |||
2252 | #define LN_pagerTelephoneNumber "pagerTelephoneNumber" | ||
2253 | #define NID_pagerTelephoneNumber 489 | ||
2254 | #define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L | ||
2255 | |||
2256 | #define LN_friendlyCountryName "friendlyCountryName" | ||
2257 | #define NID_friendlyCountryName 490 | ||
2258 | #define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L | ||
2259 | |||
2260 | #define LN_organizationalStatus "organizationalStatus" | ||
2261 | #define NID_organizationalStatus 491 | ||
2262 | #define OBJ_organizationalStatus OBJ_pilotAttributeType,45L | ||
2263 | |||
2264 | #define LN_janetMailbox "janetMailbox" | ||
2265 | #define NID_janetMailbox 492 | ||
2266 | #define OBJ_janetMailbox OBJ_pilotAttributeType,46L | ||
2267 | |||
2268 | #define LN_mailPreferenceOption "mailPreferenceOption" | ||
2269 | #define NID_mailPreferenceOption 493 | ||
2270 | #define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L | ||
2271 | |||
2272 | #define LN_buildingName "buildingName" | ||
2273 | #define NID_buildingName 494 | ||
2274 | #define OBJ_buildingName OBJ_pilotAttributeType,48L | ||
2275 | |||
2276 | #define LN_dSAQuality "dSAQuality" | ||
2277 | #define NID_dSAQuality 495 | ||
2278 | #define OBJ_dSAQuality OBJ_pilotAttributeType,49L | ||
2279 | |||
2280 | #define LN_singleLevelQuality "singleLevelQuality" | ||
2281 | #define NID_singleLevelQuality 496 | ||
2282 | #define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L | ||
2283 | |||
2284 | #define LN_subtreeMinimumQuality "subtreeMinimumQuality" | ||
2285 | #define NID_subtreeMinimumQuality 497 | ||
2286 | #define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L | ||
2287 | |||
2288 | #define LN_subtreeMaximumQuality "subtreeMaximumQuality" | ||
2289 | #define NID_subtreeMaximumQuality 498 | ||
2290 | #define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L | ||
2291 | |||
2292 | #define LN_personalSignature "personalSignature" | ||
2293 | #define NID_personalSignature 499 | ||
2294 | #define OBJ_personalSignature OBJ_pilotAttributeType,53L | ||
2295 | |||
2296 | #define LN_dITRedirect "dITRedirect" | ||
2297 | #define NID_dITRedirect 500 | ||
2298 | #define OBJ_dITRedirect OBJ_pilotAttributeType,54L | ||
2299 | |||
2300 | #define SN_audio "audio" | ||
2301 | #define NID_audio 501 | ||
2302 | #define OBJ_audio OBJ_pilotAttributeType,55L | ||
2303 | |||
2304 | #define LN_documentPublisher "documentPublisher" | ||
2305 | #define NID_documentPublisher 502 | ||
2306 | #define OBJ_documentPublisher OBJ_pilotAttributeType,56L | ||
2307 | |||
diff --git a/src/lib/libcrypto/opensslconf.h b/src/lib/libcrypto/opensslconf.h new file mode 100644 index 0000000000..c9756e47a3 --- /dev/null +++ b/src/lib/libcrypto/opensslconf.h | |||
@@ -0,0 +1,180 @@ | |||
1 | /* opensslconf.h */ | ||
2 | /* WARNING: Generated automatically from opensslconf.h.in by Configure. */ | ||
3 | |||
4 | /* OpenSSL was configured with the following options: */ | ||
5 | #ifndef OPENSSL_DOING_MAKEDEPEND | ||
6 | |||
7 | #ifndef OPENSSL_NO_KRB5 | ||
8 | # define OPENSSL_NO_KRB5 | ||
9 | #endif | ||
10 | |||
11 | #endif /* OPENSSL_DOING_MAKEDEPEND */ | ||
12 | |||
13 | /* The OPENSSL_NO_* macros are also defined as NO_* if the application | ||
14 | asks for it. This is a transient feature that is provided for those | ||
15 | who haven't had the time to do the appropriate changes in their | ||
16 | applications. */ | ||
17 | #ifdef OPENSSL_ALGORITHM_DEFINES | ||
18 | # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) | ||
19 | # define NO_KRB5 | ||
20 | # endif | ||
21 | #endif | ||
22 | |||
23 | /* crypto/opensslconf.h.in */ | ||
24 | |||
25 | /* Generate 80386 code? */ | ||
26 | #undef I386_ONLY | ||
27 | |||
28 | #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ | ||
29 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | ||
30 | #define OPENSSLDIR "/usr/local/ssl" | ||
31 | #endif | ||
32 | #endif | ||
33 | |||
34 | #undef OPENSSL_UNISTD | ||
35 | #define OPENSSL_UNISTD <unistd.h> | ||
36 | |||
37 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | ||
38 | |||
39 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) | ||
40 | #define IDEA_INT unsigned int | ||
41 | #endif | ||
42 | |||
43 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) | ||
44 | #define MD2_INT unsigned int | ||
45 | #endif | ||
46 | |||
47 | #if defined(HEADER_RC2_H) && !defined(RC2_INT) | ||
48 | /* I need to put in a mod for the alpha - eay */ | ||
49 | #define RC2_INT unsigned int | ||
50 | #endif | ||
51 | |||
52 | #if defined(HEADER_RC4_H) | ||
53 | #if !defined(RC4_INT) | ||
54 | /* using int types make the structure larger but make the code faster | ||
55 | * on most boxes I have tested - up to %20 faster. */ | ||
56 | /* | ||
57 | * I don't know what does "most" mean, but declaring "int" is a must on: | ||
58 | * - Intel P6 because partial register stalls are very expensive; | ||
59 | * - elder Alpha because it lacks byte load/store instructions; | ||
60 | */ | ||
61 | #define RC4_INT unsigned int | ||
62 | #endif | ||
63 | #if !defined(RC4_CHUNK) | ||
64 | /* | ||
65 | * This enables code handling data aligned at natural CPU word | ||
66 | * boundary. See crypto/rc4/rc4_enc.c for further details. | ||
67 | */ | ||
68 | #undef RC4_CHUNK | ||
69 | #endif | ||
70 | #endif | ||
71 | |||
72 | #if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG) | ||
73 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a | ||
74 | * %20 speed up (longs are 8 bytes, int's are 4). */ | ||
75 | #ifndef DES_LONG | ||
76 | #define DES_LONG unsigned long | ||
77 | #endif | ||
78 | #endif | ||
79 | |||
80 | #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) | ||
81 | #define CONFIG_HEADER_BN_H | ||
82 | #undef BN_LLONG | ||
83 | |||
84 | /* Should we define BN_DIV2W here? */ | ||
85 | |||
86 | /* Only one for the following should be defined */ | ||
87 | /* The prime number generation stuff may not work when | ||
88 | * EIGHT_BIT but I don't care since I've only used this mode | ||
89 | * for debuging the bignum libraries */ | ||
90 | #undef SIXTY_FOUR_BIT_LONG | ||
91 | #undef SIXTY_FOUR_BIT | ||
92 | #define THIRTY_TWO_BIT | ||
93 | #undef SIXTEEN_BIT | ||
94 | #undef EIGHT_BIT | ||
95 | #endif | ||
96 | |||
97 | #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) | ||
98 | #define CONFIG_HEADER_RC4_LOCL_H | ||
99 | /* if this is defined data[i] is used instead of *data, this is a %20 | ||
100 | * speedup on x86 */ | ||
101 | #undef RC4_INDEX | ||
102 | #endif | ||
103 | |||
104 | #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) | ||
105 | #define CONFIG_HEADER_BF_LOCL_H | ||
106 | #undef BF_PTR | ||
107 | #endif /* HEADER_BF_LOCL_H */ | ||
108 | |||
109 | #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) | ||
110 | #define CONFIG_HEADER_DES_LOCL_H | ||
111 | #ifndef DES_DEFAULT_OPTIONS | ||
112 | /* the following is tweaked from a config script, that is why it is a | ||
113 | * protected undef/define */ | ||
114 | #ifndef DES_PTR | ||
115 | #undef DES_PTR | ||
116 | #endif | ||
117 | |||
118 | /* This helps C compiler generate the correct code for multiple functional | ||
119 | * units. It reduces register dependancies at the expense of 2 more | ||
120 | * registers */ | ||
121 | #ifndef DES_RISC1 | ||
122 | #undef DES_RISC1 | ||
123 | #endif | ||
124 | |||
125 | #ifndef DES_RISC2 | ||
126 | #undef DES_RISC2 | ||
127 | #endif | ||
128 | |||
129 | #if defined(DES_RISC1) && defined(DES_RISC2) | ||
130 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! | ||
131 | #endif | ||
132 | |||
133 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. | ||
134 | * Very mucy CPU dependant */ | ||
135 | #ifndef DES_UNROLL | ||
136 | #undef DES_UNROLL | ||
137 | #endif | ||
138 | |||
139 | /* These default values were supplied by | ||
140 | * Peter Gutman <pgut001@cs.auckland.ac.nz> | ||
141 | * They are only used if nothing else has been defined */ | ||
142 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) | ||
143 | /* Special defines which change the way the code is built depending on the | ||
144 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find | ||
145 | even newer MIPS CPU's, but at the moment one size fits all for | ||
146 | optimization options. Older Sparc's work better with only UNROLL, but | ||
147 | there's no way to tell at compile time what it is you're running on */ | ||
148 | |||
149 | #if defined( sun ) /* Newer Sparc's */ | ||
150 | # define DES_PTR | ||
151 | # define DES_RISC1 | ||
152 | # define DES_UNROLL | ||
153 | #elif defined( __ultrix ) /* Older MIPS */ | ||
154 | # define DES_PTR | ||
155 | # define DES_RISC2 | ||
156 | # define DES_UNROLL | ||
157 | #elif defined( __osf1__ ) /* Alpha */ | ||
158 | # define DES_PTR | ||
159 | # define DES_RISC2 | ||
160 | #elif defined ( _AIX ) /* RS6000 */ | ||
161 | /* Unknown */ | ||
162 | #elif defined( __hpux ) /* HP-PA */ | ||
163 | /* Unknown */ | ||
164 | #elif defined( __aux ) /* 68K */ | ||
165 | /* Unknown */ | ||
166 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ | ||
167 | # define DES_UNROLL | ||
168 | #elif defined( __sgi ) /* Newer MIPS */ | ||
169 | # define DES_PTR | ||
170 | # define DES_RISC2 | ||
171 | # define DES_UNROLL | ||
172 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ | ||
173 | # define DES_PTR | ||
174 | # define DES_RISC1 | ||
175 | # define DES_UNROLL | ||
176 | #endif /* Systems-specific speed defines */ | ||
177 | #endif | ||
178 | |||
179 | #endif /* DES_DEFAULT_OPTIONS */ | ||
180 | #endif /* HEADER_DES_LOCL_H */ | ||
diff --git a/src/lib/libcrypto/opensslconf.h.in b/src/lib/libcrypto/opensslconf.h.in index e4a8f8ad54..9082a16c46 100644 --- a/src/lib/libcrypto/opensslconf.h.in +++ b/src/lib/libcrypto/opensslconf.h.in | |||
@@ -1,5 +1,4 @@ | |||
1 | /* crypto/opensslconf.h */ | 1 | /* crypto/opensslconf.h.in */ |
2 | /* WARNING: This file is autogenerated by Configure */ | ||
3 | 2 | ||
4 | /* Generate 80386 code? */ | 3 | /* Generate 80386 code? */ |
5 | #undef I386_ONLY | 4 | #undef I386_ONLY |
@@ -10,8 +9,11 @@ | |||
10 | #endif | 9 | #endif |
11 | #endif | 10 | #endif |
12 | 11 | ||
12 | #undef OPENSSL_UNISTD | ||
13 | #define OPENSSL_UNISTD <unistd.h> | 13 | #define OPENSSL_UNISTD <unistd.h> |
14 | 14 | ||
15 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION | ||
16 | |||
15 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) | 17 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) |
16 | #define IDEA_INT unsigned int | 18 | #define IDEA_INT unsigned int |
17 | #endif | 19 | #endif |
@@ -25,13 +27,27 @@ | |||
25 | #define RC2_INT unsigned int | 27 | #define RC2_INT unsigned int |
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #if defined(HEADER_RC4_H) && !defined(RC4_INT) | 30 | #if defined(HEADER_RC4_H) |
31 | #if !defined(RC4_INT) | ||
29 | /* using int types make the structure larger but make the code faster | 32 | /* using int types make the structure larger but make the code faster |
30 | * on most boxes I have tested - up to %20 faster. */ | 33 | * on most boxes I have tested - up to %20 faster. */ |
34 | /* | ||
35 | * I don't know what does "most" mean, but declaring "int" is a must on: | ||
36 | * - Intel P6 because partial register stalls are very expensive; | ||
37 | * - elder Alpha because it lacks byte load/store instructions; | ||
38 | */ | ||
31 | #define RC4_INT unsigned int | 39 | #define RC4_INT unsigned int |
32 | #endif | 40 | #endif |
41 | #if !defined(RC4_CHUNK) | ||
42 | /* | ||
43 | * This enables code handling data aligned at natural CPU word | ||
44 | * boundary. See crypto/rc4/rc4_enc.c for further details. | ||
45 | */ | ||
46 | #undef RC4_CHUNK | ||
47 | #endif | ||
48 | #endif | ||
33 | 49 | ||
34 | #if defined(HEADER_DES_H) && !defined(DES_LONG) | 50 | #if (defined(HEADER_DES_H) || defined(HEADER_DES_OLD_H)) && !defined(DES_LONG) |
35 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a | 51 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a |
36 | * %20 speed up (longs are 8 bytes, int's are 4). */ | 52 | * %20 speed up (longs are 8 bytes, int's are 4). */ |
37 | #ifndef DES_LONG | 53 | #ifndef DES_LONG |
@@ -131,7 +147,7 @@ YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! | |||
131 | # define DES_PTR | 147 | # define DES_PTR |
132 | # define DES_RISC2 | 148 | # define DES_RISC2 |
133 | # define DES_UNROLL | 149 | # define DES_UNROLL |
134 | #elif defined( i386 ) /* x86 boxes, should be gcc */ | 150 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ |
135 | # define DES_PTR | 151 | # define DES_PTR |
136 | # define DES_RISC1 | 152 | # define DES_RISC1 |
137 | # define DES_UNROLL | 153 | # define DES_UNROLL |
diff --git a/src/lib/libcrypto/perlasm/x86ms.pl b/src/lib/libcrypto/perlasm/x86ms.pl index 893b50b1a4..206452341d 100644 --- a/src/lib/libcrypto/perlasm/x86ms.pl +++ b/src/lib/libcrypto/perlasm/x86ms.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | package x86ms; | 3 | package x86ms; |
4 | 4 | ||
@@ -51,6 +51,16 @@ sub main'DWP | |||
51 | &get_mem("DWORD",@_); | 51 | &get_mem("DWORD",@_); |
52 | } | 52 | } |
53 | 53 | ||
54 | sub main'BC | ||
55 | { | ||
56 | return @_; | ||
57 | } | ||
58 | |||
59 | sub main'DWC | ||
60 | { | ||
61 | return @_; | ||
62 | } | ||
63 | |||
54 | sub main'stack_push | 64 | sub main'stack_push |
55 | { | 65 | { |
56 | local($num)=@_; | 66 | local($num)=@_; |
@@ -331,7 +341,14 @@ sub main'set_label | |||
331 | $label{$_[0]}="${label}${_[0]}"; | 341 | $label{$_[0]}="${label}${_[0]}"; |
332 | $label++; | 342 | $label++; |
333 | } | 343 | } |
334 | push(@out,"$label{$_[0]}:\n"); | 344 | if((defined $_[2]) && ($_[2] == 1)) |
345 | { | ||
346 | push(@out,"$label{$_[0]}::\n"); | ||
347 | } | ||
348 | else | ||
349 | { | ||
350 | push(@out,"$label{$_[0]}:\n"); | ||
351 | } | ||
335 | } | 352 | } |
336 | 353 | ||
337 | sub main'data_word | 354 | sub main'data_word |
diff --git a/src/lib/libcrypto/perlasm/x86unix.pl b/src/lib/libcrypto/perlasm/x86unix.pl index 6ee4dd3245..9ceabf0705 100644 --- a/src/lib/libcrypto/perlasm/x86unix.pl +++ b/src/lib/libcrypto/perlasm/x86unix.pl | |||
@@ -1,14 +1,10 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | |||
3 | # Because the bswapl instruction is not supported for old assembers | ||
4 | # (it was a new instruction for the 486), I've added .byte xxxx code | ||
5 | # to put it in. | ||
6 | # eric 24-Apr-1998 | ||
7 | # | ||
8 | 2 | ||
9 | package x86unix; | 3 | package x86unix; |
10 | 4 | ||
11 | $label="L000"; | 5 | $label="L000"; |
6 | $const=""; | ||
7 | $constl=0; | ||
12 | 8 | ||
13 | $align=($main'aout)?"4":"16"; | 9 | $align=($main'aout)?"4":"16"; |
14 | $under=($main'aout)?"_":""; | 10 | $under=($main'aout)?"_":""; |
@@ -85,12 +81,17 @@ sub main'DWP | |||
85 | local($addr,$reg1,$reg2,$idx)=@_; | 81 | local($addr,$reg1,$reg2,$idx)=@_; |
86 | 82 | ||
87 | $ret=""; | 83 | $ret=""; |
88 | $addr =~ s/(^|[+ \t])([A-Za-z_]+)($|[+ \t])/$1$under$2$3/; | 84 | $addr =~ s/(^|[+ \t])([A-Za-z_]+[A-Za-z0-9_]+)($|[+ \t])/$1$under$2$3/; |
89 | $reg1="$regs{$reg1}" if defined($regs{$reg1}); | 85 | $reg1="$regs{$reg1}" if defined($regs{$reg1}); |
90 | $reg2="$regs{$reg2}" if defined($regs{$reg2}); | 86 | $reg2="$regs{$reg2}" if defined($regs{$reg2}); |
91 | $ret.=$addr if ($addr ne "") && ($addr ne 0); | 87 | $ret.=$addr if ($addr ne "") && ($addr ne 0); |
92 | if ($reg2 ne "") | 88 | if ($reg2 ne "") |
93 | { $ret.="($reg1,$reg2,$idx)"; } | 89 | { |
90 | if($idx ne "") | ||
91 | { $ret.="($reg1,$reg2,$idx)"; } | ||
92 | else | ||
93 | { $ret.="($reg1,$reg2)"; } | ||
94 | } | ||
94 | else | 95 | else |
95 | { $ret.="($reg1)" } | 96 | { $ret.="($reg1)" } |
96 | return($ret); | 97 | return($ret); |
@@ -101,6 +102,16 @@ sub main'BP | |||
101 | return(&main'DWP(@_)); | 102 | return(&main'DWP(@_)); |
102 | } | 103 | } |
103 | 104 | ||
105 | sub main'BC | ||
106 | { | ||
107 | return @_; | ||
108 | } | ||
109 | |||
110 | sub main'DWC | ||
111 | { | ||
112 | return @_; | ||
113 | } | ||
114 | |||
104 | #sub main'BP | 115 | #sub main'BP |
105 | # { | 116 | # { |
106 | # local($addr,$reg1,$reg2,$idx)=@_; | 117 | # local($addr,$reg1,$reg2,$idx)=@_; |
@@ -153,12 +164,29 @@ sub main'dec { &out1("decl",@_); } | |||
153 | sub main'inc { &out1("incl",@_); } | 164 | sub main'inc { &out1("incl",@_); } |
154 | sub main'push { &out1("pushl",@_); $stack+=4; } | 165 | sub main'push { &out1("pushl",@_); $stack+=4; } |
155 | sub main'pop { &out1("popl",@_); $stack-=4; } | 166 | sub main'pop { &out1("popl",@_); $stack-=4; } |
156 | sub main'bswap { &out1("bswapl",@_); } | 167 | sub main'pushf { &out0("pushf"); $stack+=4; } |
168 | sub main'popf { &out0("popf"); $stack-=4; } | ||
157 | sub main'not { &out1("notl",@_); } | 169 | sub main'not { &out1("notl",@_); } |
158 | sub main'call { &out1("call",$under.$_[0]); } | 170 | sub main'call { &out1("call",$under.$_[0]); } |
159 | sub main'ret { &out0("ret"); } | 171 | sub main'ret { &out0("ret"); } |
160 | sub main'nop { &out0("nop"); } | 172 | sub main'nop { &out0("nop"); } |
161 | 173 | ||
174 | # The bswapl instruction is new for the 486. Emulate if i386. | ||
175 | sub main'bswap | ||
176 | { | ||
177 | if ($main'i386) | ||
178 | { | ||
179 | &main'comment("bswapl @_"); | ||
180 | &main'exch(main'HB(@_),main'LB(@_)); | ||
181 | &main'rotr(@_,16); | ||
182 | &main'exch(main'HB(@_),main'LB(@_)); | ||
183 | } | ||
184 | else | ||
185 | { | ||
186 | &out1("bswapl",@_); | ||
187 | } | ||
188 | } | ||
189 | |||
162 | sub out2 | 190 | sub out2 |
163 | { | 191 | { |
164 | local($name,$p1,$p2)=@_; | 192 | local($name,$p1,$p2)=@_; |
@@ -268,6 +296,8 @@ EOF | |||
268 | push(@out,$tmp); | 296 | push(@out,$tmp); |
269 | if ($main'cpp) | 297 | if ($main'cpp) |
270 | { $tmp=push(@out,"\tTYPE($func,\@function)\n"); } | 298 | { $tmp=push(@out,"\tTYPE($func,\@function)\n"); } |
299 | elsif ($main'gaswin) | ||
300 | { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); } | ||
271 | else { $tmp=push(@out,"\t.type\t$func,\@function\n"); } | 301 | else { $tmp=push(@out,"\t.type\t$func,\@function\n"); } |
272 | push(@out,"$func:\n"); | 302 | push(@out,"$func:\n"); |
273 | $tmp=<<"EOF"; | 303 | $tmp=<<"EOF"; |
@@ -296,6 +326,8 @@ EOF | |||
296 | push(@out,$tmp); | 326 | push(@out,$tmp); |
297 | if ($main'cpp) | 327 | if ($main'cpp) |
298 | { push(@out,"\tTYPE($func,\@function)\n"); } | 328 | { push(@out,"\tTYPE($func,\@function)\n"); } |
329 | elsif ($main'gaswin) | ||
330 | { $tmp=push(@out,"\t.def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); } | ||
299 | else { push(@out,"\t.type $func,\@function\n"); } | 331 | else { push(@out,"\t.type $func,\@function\n"); } |
300 | push(@out,"$func:\n"); | 332 | push(@out,"$func:\n"); |
301 | $stack=4; | 333 | $stack=4; |
@@ -316,8 +348,11 @@ sub main'function_end | |||
316 | .${func}_end: | 348 | .${func}_end: |
317 | EOF | 349 | EOF |
318 | push(@out,$tmp); | 350 | push(@out,$tmp); |
351 | |||
319 | if ($main'cpp) | 352 | if ($main'cpp) |
320 | { push(@out,"\tSIZE($func,.${func}_end-$func)\n"); } | 353 | { push(@out,"\tSIZE($func,.${func}_end-$func)\n"); } |
354 | elsif ($main'gaswin) | ||
355 | { $tmp=push(@out,"\t.align 4\n"); } | ||
321 | else { push(@out,"\t.size\t$func,.${func}_end-$func\n"); } | 356 | else { push(@out,"\t.size\t$func,.${func}_end-$func\n"); } |
322 | push(@out,".ident \"$func\"\n"); | 357 | push(@out,".ident \"$func\"\n"); |
323 | $stack=0; | 358 | $stack=0; |
@@ -344,10 +379,12 @@ sub main'function_end_B | |||
344 | 379 | ||
345 | $func=$under.$func; | 380 | $func=$under.$func; |
346 | 381 | ||
347 | push(@out,".${func}_end:\n"); | 382 | push(@out,".L_${func}_end:\n"); |
348 | if ($main'cpp) | 383 | if ($main'cpp) |
349 | { push(@out,"\tSIZE($func,.${func}_end-$func)\n"); } | 384 | { push(@out,"\tSIZE($func,.L_${func}_end-$func)\n"); } |
350 | else { push(@out,"\t.size\t$func,.${func}_end-$func\n"); } | 385 | elsif ($main'gaswin) |
386 | { push(@out,"\t.align 4\n"); } | ||
387 | else { push(@out,"\t.size\t$func,.L_${func}_end-$func\n"); } | ||
351 | push(@out,".ident \"desasm.pl\"\n"); | 388 | push(@out,".ident \"desasm.pl\"\n"); |
352 | $stack=0; | 389 | $stack=0; |
353 | %label=(); | 390 | %label=(); |
@@ -421,9 +458,87 @@ sub main'set_label | |||
421 | 458 | ||
422 | sub main'file_end | 459 | sub main'file_end |
423 | { | 460 | { |
461 | if ($const ne "") | ||
462 | { | ||
463 | push(@out,".section .rodata\n"); | ||
464 | push(@out,$const); | ||
465 | $const=""; | ||
466 | } | ||
424 | } | 467 | } |
425 | 468 | ||
426 | sub main'data_word | 469 | sub main'data_word |
427 | { | 470 | { |
428 | push(@out,"\t.long $_[0]\n"); | 471 | push(@out,"\t.long $_[0]\n"); |
429 | } | 472 | } |
473 | |||
474 | # debug output functions: puts, putx, printf | ||
475 | |||
476 | sub main'puts | ||
477 | { | ||
478 | &pushvars(); | ||
479 | &main'push('$Lstring' . ++$constl); | ||
480 | &main'call('puts'); | ||
481 | $stack-=4; | ||
482 | &main'add("esp",4); | ||
483 | &popvars(); | ||
484 | |||
485 | $const .= "Lstring$constl:\n\t.string \"@_[0]\"\n"; | ||
486 | } | ||
487 | |||
488 | sub main'putx | ||
489 | { | ||
490 | &pushvars(); | ||
491 | &main'push($_[0]); | ||
492 | &main'push('$Lstring' . ++$constl); | ||
493 | &main'call('printf'); | ||
494 | &main'add("esp",8); | ||
495 | $stack-=8; | ||
496 | &popvars(); | ||
497 | |||
498 | $const .= "Lstring$constl:\n\t.string \"\%X\"\n"; | ||
499 | } | ||
500 | |||
501 | sub main'printf | ||
502 | { | ||
503 | $ostack = $stack; | ||
504 | &pushvars(); | ||
505 | for ($i = @_ - 1; $i >= 0; $i--) | ||
506 | { | ||
507 | if ($i == 0) # change this to support %s format strings | ||
508 | { | ||
509 | &main'push('$Lstring' . ++$constl); | ||
510 | $const .= "Lstring$constl:\n\t.string \"@_[$i]\"\n"; | ||
511 | } | ||
512 | else | ||
513 | { | ||
514 | if ($_[$i] =~ /([0-9]*)\(%esp\)/) | ||
515 | { | ||
516 | &main'push(($1 + $stack - $ostack) . '(%esp)'); | ||
517 | } | ||
518 | else | ||
519 | { | ||
520 | &main'push($_[$i]); | ||
521 | } | ||
522 | } | ||
523 | } | ||
524 | &main'call('printf'); | ||
525 | $stack-=4*@_; | ||
526 | &main'add("esp",4*@_); | ||
527 | &popvars(); | ||
528 | } | ||
529 | |||
530 | sub pushvars | ||
531 | { | ||
532 | &main'pushf(); | ||
533 | &main'push("edx"); | ||
534 | &main'push("ecx"); | ||
535 | &main'push("eax"); | ||
536 | } | ||
537 | |||
538 | sub popvars | ||
539 | { | ||
540 | &main'pop("eax"); | ||
541 | &main'pop("ecx"); | ||
542 | &main'pop("edx"); | ||
543 | &main'popf(); | ||
544 | } | ||
diff --git a/src/lib/libcrypto/pkcs7/bio_ber.c b/src/lib/libcrypto/pkcs7/bio_ber.c index 2f17723e98..42331f7ab0 100644 --- a/src/lib/libcrypto/pkcs7/bio_ber.c +++ b/src/lib/libcrypto/pkcs7/bio_ber.c | |||
@@ -69,6 +69,7 @@ static int ber_read(BIO *h,char *buf,int size); | |||
69 | static long ber_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 69 | static long ber_ctrl(BIO *h,int cmd,long arg1,char *arg2); |
70 | static int ber_new(BIO *h); | 70 | static int ber_new(BIO *h); |
71 | static int ber_free(BIO *data); | 71 | static int ber_free(BIO *data); |
72 | static long ber_callback_ctrl(BIO *h,int cmd,void *(*fp)()); | ||
72 | #define BER_BUF_SIZE (32) | 73 | #define BER_BUF_SIZE (32) |
73 | 74 | ||
74 | /* This is used to hold the state of the BER objects being read. */ | 75 | /* This is used to hold the state of the BER objects being read. */ |
@@ -92,7 +93,7 @@ typedef struct bio_ber_struct | |||
92 | /* most of the following are used when doing non-blocking IO */ | 93 | /* most of the following are used when doing non-blocking IO */ |
93 | /* reading */ | 94 | /* reading */ |
94 | long num_left; /* number of bytes still to read/write in block */ | 95 | long num_left; /* number of bytes still to read/write in block */ |
95 | int depth; /* used with idefinite encoding. */ | 96 | int depth; /* used with indefinite encoding. */ |
96 | int finished; /* No more read data */ | 97 | int finished; /* No more read data */ |
97 | 98 | ||
98 | /* writting */ | 99 | /* writting */ |
@@ -115,6 +116,7 @@ static BIO_METHOD methods_ber= | |||
115 | ber_ctrl, | 116 | ber_ctrl, |
116 | ber_new, | 117 | ber_new, |
117 | ber_free, | 118 | ber_free, |
119 | ber_callback_ctrl, | ||
118 | }; | 120 | }; |
119 | 121 | ||
120 | BIO_METHOD *BIO_f_ber(void) | 122 | BIO_METHOD *BIO_f_ber(void) |
@@ -126,7 +128,7 @@ static int ber_new(BIO *bi) | |||
126 | { | 128 | { |
127 | BIO_BER_CTX *ctx; | 129 | BIO_BER_CTX *ctx; |
128 | 130 | ||
129 | ctx=(BIO_BER_CTX *)Malloc(sizeof(BIO_BER_CTX)); | 131 | ctx=(BIO_BER_CTX *)OPENSSL_malloc(sizeof(BIO_BER_CTX)); |
130 | if (ctx == NULL) return(0); | 132 | if (ctx == NULL) return(0); |
131 | 133 | ||
132 | memset((char *)ctx,0,sizeof(BIO_BER_CTX)); | 134 | memset((char *)ctx,0,sizeof(BIO_BER_CTX)); |
@@ -144,7 +146,7 @@ static int ber_free(BIO *a) | |||
144 | if (a == NULL) return(0); | 146 | if (a == NULL) return(0); |
145 | b=(BIO_BER_CTX *)a->ptr; | 147 | b=(BIO_BER_CTX *)a->ptr; |
146 | memset(a->ptr,0,sizeof(BIO_BER_CTX)); | 148 | memset(a->ptr,0,sizeof(BIO_BER_CTX)); |
147 | Free(a->ptr); | 149 | OPENSSL_free(a->ptr); |
148 | a->ptr=NULL; | 150 | a->ptr=NULL; |
149 | a->init=0; | 151 | a->init=0; |
150 | a->flags=0; | 152 | a->flags=0; |
@@ -337,7 +339,7 @@ static long ber_ctrl(BIO *b, int cmd, long num, char *ptr) | |||
337 | case BIO_CTRL_RESET: | 339 | case BIO_CTRL_RESET: |
338 | ctx->ok=1; | 340 | ctx->ok=1; |
339 | ctx->finished=0; | 341 | ctx->finished=0; |
340 | EVP_CipherInit(&(ctx->cipher),NULL,NULL,NULL, | 342 | EVP_CipherInit_ex(&(ctx->cipher),NULL,NULL,NULL,NULL, |
341 | ctx->cipher.berrypt); | 343 | ctx->cipher.berrypt); |
342 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | 344 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); |
343 | break; | 345 | break; |
@@ -374,7 +376,7 @@ again: | |||
374 | { | 376 | { |
375 | ctx->finished=1; | 377 | ctx->finished=1; |
376 | ctx->buf_off=0; | 378 | ctx->buf_off=0; |
377 | ret=EVP_CipherFinal(&(ctx->cipher), | 379 | ret=EVP_CipherFinal_ex(&(ctx->cipher), |
378 | (unsigned char *)ctx->buf, | 380 | (unsigned char *)ctx->buf, |
379 | &(ctx->buf_len)); | 381 | &(ctx->buf_len)); |
380 | ctx->ok=(int)ret; | 382 | ctx->ok=(int)ret; |
@@ -409,6 +411,20 @@ again: | |||
409 | return(ret); | 411 | return(ret); |
410 | } | 412 | } |
411 | 413 | ||
414 | static long ber_callback_ctrl(BIO *b, int cmd, void *(*fp)()) | ||
415 | { | ||
416 | long ret=1; | ||
417 | |||
418 | if (b->next_bio == NULL) return(0); | ||
419 | switch (cmd) | ||
420 | { | ||
421 | default: | ||
422 | ret=BIO_callback_ctrl(b->next_bio,cmd,fp); | ||
423 | break; | ||
424 | } | ||
425 | return(ret); | ||
426 | } | ||
427 | |||
412 | /* | 428 | /* |
413 | void BIO_set_cipher_ctx(b,c) | 429 | void BIO_set_cipher_ctx(b,c) |
414 | BIO *b; | 430 | BIO *b; |
@@ -442,7 +458,7 @@ void BIO_set_cipher(BIO *b, EVP_CIPHER *c, unsigned char *k, unsigned char *i, | |||
442 | 458 | ||
443 | b->init=1; | 459 | b->init=1; |
444 | ctx=(BIO_ENC_CTX *)b->ptr; | 460 | ctx=(BIO_ENC_CTX *)b->ptr; |
445 | EVP_CipherInit(&(ctx->cipher),c,k,i,e); | 461 | EVP_CipherInit_ex(&(ctx->cipher),c,NULL,k,i,e); |
446 | 462 | ||
447 | if (b->callback != NULL) | 463 | if (b->callback != NULL) |
448 | b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L); | 464 | b->callback(b,BIO_CB_CTRL,(char *)c,BIO_CTRL_SET,e,1L); |
diff --git a/src/lib/libcrypto/pkcs7/dec.c b/src/lib/libcrypto/pkcs7/dec.c index b3661f28d3..6752ec568a 100644 --- a/src/lib/libcrypto/pkcs7/dec.c +++ b/src/lib/libcrypto/pkcs7/dec.c | |||
@@ -57,6 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
60 | #include <string.h> | ||
60 | #include <openssl/bio.h> | 61 | #include <openssl/bio.h> |
61 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
62 | #include <openssl/pem.h> | 63 | #include <openssl/pem.h> |
@@ -85,7 +86,7 @@ char *argv[]; | |||
85 | int i,printit=0; | 86 | int i,printit=0; |
86 | STACK_OF(PKCS7_SIGNER_INFO) *sk; | 87 | STACK_OF(PKCS7_SIGNER_INFO) *sk; |
87 | 88 | ||
88 | SSLeay_add_all_algorithms(); | 89 | OpenSSL_add_all_algorithms(); |
89 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 90 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
90 | 91 | ||
91 | data=BIO_new(BIO_s_file()); | 92 | data=BIO_new(BIO_s_file()); |
@@ -121,9 +122,10 @@ char *argv[]; | |||
121 | } | 122 | } |
122 | 123 | ||
123 | if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err; | 124 | if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err; |
124 | if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err; | 125 | if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err; |
125 | BIO_reset(in); | 126 | BIO_reset(in); |
126 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; | 127 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL) |
128 | goto err; | ||
127 | BIO_free(in); | 129 | BIO_free(in); |
128 | 130 | ||
129 | if (pp == NULL) | 131 | if (pp == NULL) |
@@ -131,7 +133,7 @@ char *argv[]; | |||
131 | 133 | ||
132 | 134 | ||
133 | /* Load the PKCS7 object from a file */ | 135 | /* Load the PKCS7 object from a file */ |
134 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL)) == NULL) goto err; | 136 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err; |
135 | 137 | ||
136 | 138 | ||
137 | 139 | ||
@@ -148,7 +150,7 @@ char *argv[]; | |||
148 | /* We need to process the data */ | 150 | /* We need to process the data */ |
149 | /* We cannot support detached encryption */ | 151 | /* We cannot support detached encryption */ |
150 | p7bio=PKCS7_dataDecode(p7,pkey,detached,x509); | 152 | p7bio=PKCS7_dataDecode(p7,pkey,detached,x509); |
151 | 153 | ||
152 | if (p7bio == NULL) | 154 | if (p7bio == NULL) |
153 | { | 155 | { |
154 | printf("problems decoding\n"); | 156 | printf("problems decoding\n"); |
diff --git a/src/lib/libcrypto/pkcs7/enc.c b/src/lib/libcrypto/pkcs7/enc.c index 625a7c2285..7417f8a4e0 100644 --- a/src/lib/libcrypto/pkcs7/enc.c +++ b/src/lib/libcrypto/pkcs7/enc.c | |||
@@ -56,61 +56,91 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include "bio.h" | 59 | #include <string.h> |
60 | #include "x509.h" | 60 | #include <openssl/bio.h> |
61 | #include "pem.h" | 61 | #include <openssl/x509.h> |
62 | #include <openssl/pem.h> | ||
63 | #include <openssl/err.h> | ||
62 | 64 | ||
63 | main(argc,argv) | 65 | int main(argc,argv) |
64 | int argc; | 66 | int argc; |
65 | char *argv[]; | 67 | char *argv[]; |
66 | { | 68 | { |
67 | X509 *x509; | 69 | X509 *x509; |
68 | EVP_PKEY *pkey; | ||
69 | PKCS7 *p7; | 70 | PKCS7 *p7; |
70 | PKCS7 *p7_data; | ||
71 | PKCS7_SIGNER_INFO *si; | ||
72 | BIO *in; | 71 | BIO *in; |
73 | BIO *data,*p7bio; | 72 | BIO *data,*p7bio; |
74 | char buf[1024*4]; | 73 | char buf[1024*4]; |
75 | int i,j; | 74 | int i; |
76 | int nodetach=0; | 75 | int nodetach=1; |
76 | char *keyfile = NULL; | ||
77 | const EVP_CIPHER *cipher=NULL; | ||
78 | STACK_OF(X509) *recips=NULL; | ||
77 | 79 | ||
78 | EVP_add_digest(EVP_sha1()); | 80 | OpenSSL_add_all_algorithms(); |
79 | EVP_add_cipher(EVP_des_cbc()); | ||
80 | 81 | ||
81 | data=BIO_new(BIO_s_file()); | 82 | data=BIO_new(BIO_s_file()); |
82 | again: | 83 | while(argc > 1) |
83 | if (argc > 1) | ||
84 | { | 84 | { |
85 | if (strcmp(argv[1],"-nd") == 0) | 85 | if (strcmp(argv[1],"-nd") == 0) |
86 | { | 86 | { |
87 | nodetach=1; | 87 | nodetach=1; |
88 | argv++; argc--; | 88 | argv++; argc--; |
89 | goto again; | ||
90 | } | 89 | } |
91 | if (!BIO_read_filename(data,argv[1])) | 90 | else if ((strcmp(argv[1],"-c") == 0) && (argc >= 2)) { |
92 | goto err; | 91 | if(!(cipher = EVP_get_cipherbyname(argv[2]))) { |
93 | } | 92 | fprintf(stderr, "Unknown cipher %s\n", argv[2]); |
94 | else | 93 | goto err; |
95 | BIO_set_fp(data,stdin,BIO_NOCLOSE); | 94 | } |
95 | argc-=2; | ||
96 | argv+=2; | ||
97 | } else if ((strcmp(argv[1],"-k") == 0) && (argc >= 2)) { | ||
98 | keyfile = argv[2]; | ||
99 | argc-=2; | ||
100 | argv+=2; | ||
101 | if (!(in=BIO_new_file(keyfile,"r"))) goto err; | ||
102 | if (!(x509=PEM_read_bio_X509(in,NULL,NULL,NULL))) | ||
103 | goto err; | ||
104 | if(!recips) recips = sk_X509_new_null(); | ||
105 | sk_X509_push(recips, x509); | ||
106 | BIO_free(in); | ||
107 | } else break; | ||
108 | } | ||
96 | 109 | ||
97 | if ((in=BIO_new_file("server.pem","r")) == NULL) goto err; | 110 | if(!recips) { |
98 | if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err; | 111 | fprintf(stderr, "No recipients\n"); |
112 | goto err; | ||
113 | } | ||
114 | |||
115 | if (!BIO_read_filename(data,argv[1])) goto err; | ||
116 | |||
117 | p7=PKCS7_new(); | ||
118 | #if 0 | ||
99 | BIO_reset(in); | 119 | BIO_reset(in); |
100 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; | 120 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; |
101 | BIO_free(in); | 121 | BIO_free(in); |
102 | |||
103 | p7=PKCS7_new(); | ||
104 | PKCS7_set_type(p7,NID_pkcs7_signedAndEnveloped); | 122 | PKCS7_set_type(p7,NID_pkcs7_signedAndEnveloped); |
105 | 123 | ||
106 | if (PKCS7_add_signature(p7,x509,pkey,EVP_sha1()) == NULL) goto err; | 124 | if (PKCS7_add_signature(p7,x509,pkey,EVP_sha1()) == NULL) goto err; |
107 | |||
108 | if (!PKCS7_set_cipher(p7,EVP_des_cbc())) goto err; | ||
109 | if (PKCS7_add_recipient(p7,x509) == NULL) goto err; | ||
110 | |||
111 | /* we may want to add more */ | 125 | /* we may want to add more */ |
112 | PKCS7_add_certificate(p7,x509); | 126 | PKCS7_add_certificate(p7,x509); |
127 | #else | ||
128 | PKCS7_set_type(p7,NID_pkcs7_enveloped); | ||
129 | #endif | ||
130 | if(!cipher) { | ||
131 | #ifndef OPENSSL_NO_DES | ||
132 | cipher = EVP_des_ede3_cbc(); | ||
133 | #else | ||
134 | fprintf(stderr, "No cipher selected\n"); | ||
135 | goto err; | ||
136 | #endif | ||
137 | } | ||
113 | 138 | ||
139 | if (!PKCS7_set_cipher(p7,cipher)) goto err; | ||
140 | for(i = 0; i < sk_X509_num(recips); i++) { | ||
141 | if (!PKCS7_add_recipient(p7,sk_X509_value(recips, i))) goto err; | ||
142 | } | ||
143 | sk_X509_pop_free(recips, X509_free); | ||
114 | 144 | ||
115 | /* Set the content of the signed to 'data' */ | 145 | /* Set the content of the signed to 'data' */ |
116 | /* PKCS7_content_new(p7,NID_pkcs7_data); not used in envelope */ | 146 | /* PKCS7_content_new(p7,NID_pkcs7_data); not used in envelope */ |
@@ -129,7 +159,7 @@ again: | |||
129 | } | 159 | } |
130 | BIO_flush(p7bio); | 160 | BIO_flush(p7bio); |
131 | 161 | ||
132 | if (!PKCS7_dataSign(p7,p7bio)) goto err; | 162 | if (!PKCS7_dataFinal(p7,p7bio)) goto err; |
133 | BIO_free(p7bio); | 163 | BIO_free(p7bio); |
134 | 164 | ||
135 | PEM_write_PKCS7(stdout,p7); | 165 | PEM_write_PKCS7(stdout,p7); |
diff --git a/src/lib/libcrypto/pkcs7/example.c b/src/lib/libcrypto/pkcs7/example.c index 7354890084..c993947cc3 100644 --- a/src/lib/libcrypto/pkcs7/example.c +++ b/src/lib/libcrypto/pkcs7/example.c | |||
@@ -1,7 +1,9 @@ | |||
1 | #include <stdio.h> | 1 | #include <stdio.h> |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <string.h> | ||
3 | #include <openssl/pkcs7.h> | 4 | #include <openssl/pkcs7.h> |
4 | #include <openssl/asn1_mac.h> | 5 | #include <openssl/asn1_mac.h> |
6 | #include <openssl/x509.h> | ||
5 | 7 | ||
6 | int add_signed_time(PKCS7_SIGNER_INFO *si) | 8 | int add_signed_time(PKCS7_SIGNER_INFO *si) |
7 | { | 9 | { |
@@ -36,7 +38,7 @@ void add_signed_string(PKCS7_SIGNER_INFO *si, char *str) | |||
36 | signed_string_nid= | 38 | signed_string_nid= |
37 | OBJ_create("1.2.3.4.5","OID_example","Our example OID"); | 39 | OBJ_create("1.2.3.4.5","OID_example","Our example OID"); |
38 | os=ASN1_OCTET_STRING_new(); | 40 | os=ASN1_OCTET_STRING_new(); |
39 | ASN1_OCTET_STRING_set(os,str,strlen(str)); | 41 | ASN1_OCTET_STRING_set(os,(unsigned char*)str,strlen(str)); |
40 | /* When we add, we do not free */ | 42 | /* When we add, we do not free */ |
41 | PKCS7_add_signed_attribute(si,signed_string_nid, | 43 | PKCS7_add_signed_attribute(si,signed_string_nid, |
42 | V_ASN1_OCTET_STRING,(char *)os); | 44 | V_ASN1_OCTET_STRING,(char *)os); |
@@ -68,7 +70,7 @@ int get_signed_string(PKCS7_SIGNER_INFO *si, char *buf, int len) | |||
68 | return(0); | 70 | return(0); |
69 | } | 71 | } |
70 | 72 | ||
71 | static signed_seq2string_nid= -1; | 73 | static int signed_seq2string_nid= -1; |
72 | /* ########################################### */ | 74 | /* ########################################### */ |
73 | int add_signed_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2) | 75 | int add_signed_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2) |
74 | { | 76 | { |
@@ -86,8 +88,8 @@ int add_signed_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2) | |||
86 | 88 | ||
87 | os1=ASN1_OCTET_STRING_new(); | 89 | os1=ASN1_OCTET_STRING_new(); |
88 | os2=ASN1_OCTET_STRING_new(); | 90 | os2=ASN1_OCTET_STRING_new(); |
89 | ASN1_OCTET_STRING_set(os1,str1,strlen(str1)); | 91 | ASN1_OCTET_STRING_set(os1,(unsigned char*)str1,strlen(str1)); |
90 | ASN1_OCTET_STRING_set(os2,str1,strlen(str1)); | 92 | ASN1_OCTET_STRING_set(os2,(unsigned char*)str1,strlen(str1)); |
91 | i =i2d_ASN1_OCTET_STRING(os1,NULL); | 93 | i =i2d_ASN1_OCTET_STRING(os1,NULL); |
92 | i+=i2d_ASN1_OCTET_STRING(os2,NULL); | 94 | i+=i2d_ASN1_OCTET_STRING(os2,NULL); |
93 | total=ASN1_object_size(1,i,V_ASN1_SEQUENCE); | 95 | total=ASN1_object_size(1,i,V_ASN1_SEQUENCE); |
@@ -197,7 +199,7 @@ X509_ATTRIBUTE *create_string(char *str) | |||
197 | signed_string_nid= | 199 | signed_string_nid= |
198 | OBJ_create("1.2.3.4.5","OID_example","Our example OID"); | 200 | OBJ_create("1.2.3.4.5","OID_example","Our example OID"); |
199 | os=ASN1_OCTET_STRING_new(); | 201 | os=ASN1_OCTET_STRING_new(); |
200 | ASN1_OCTET_STRING_set(os,str,strlen(str)); | 202 | ASN1_OCTET_STRING_set(os,(unsigned char*)str,strlen(str)); |
201 | /* When we add, we do not free */ | 203 | /* When we add, we do not free */ |
202 | ret=X509_ATTRIBUTE_create(signed_string_nid, | 204 | ret=X509_ATTRIBUTE_create(signed_string_nid, |
203 | V_ASN1_OCTET_STRING,(char *)os); | 205 | V_ASN1_OCTET_STRING,(char *)os); |
@@ -250,8 +252,8 @@ X509_ATTRIBUTE *add_seq2string(PKCS7_SIGNER_INFO *si, char *str1, char *str2) | |||
250 | 252 | ||
251 | os1=ASN1_OCTET_STRING_new(); | 253 | os1=ASN1_OCTET_STRING_new(); |
252 | os2=ASN1_OCTET_STRING_new(); | 254 | os2=ASN1_OCTET_STRING_new(); |
253 | ASN1_OCTET_STRING_set(os1,str1,strlen(str1)); | 255 | ASN1_OCTET_STRING_set(os1,(unsigned char*)str1,strlen(str1)); |
254 | ASN1_OCTET_STRING_set(os2,str1,strlen(str1)); | 256 | ASN1_OCTET_STRING_set(os2,(unsigned char*)str1,strlen(str1)); |
255 | i =i2d_ASN1_OCTET_STRING(os1,NULL); | 257 | i =i2d_ASN1_OCTET_STRING(os1,NULL); |
256 | i+=i2d_ASN1_OCTET_STRING(os2,NULL); | 258 | i+=i2d_ASN1_OCTET_STRING(os2,NULL); |
257 | total=ASN1_object_size(1,i,V_ASN1_SEQUENCE); | 259 | total=ASN1_object_size(1,i,V_ASN1_SEQUENCE); |
diff --git a/src/lib/libcrypto/pkcs7/pk7_dgst.c b/src/lib/libcrypto/pkcs7/pk7_dgst.c index 7769abeb1e..90edfa5001 100644 --- a/src/lib/libcrypto/pkcs7/pk7_dgst.c +++ b/src/lib/libcrypto/pkcs7/pk7_dgst.c | |||
@@ -58,9 +58,9 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
62 | #include "rand.h" | 62 | #include <openssl/rand.h> |
63 | #include "objects.h" | 63 | #include <openssl/objects.h> |
64 | #include "x509.h" | 64 | #include <openssl/x509.h> |
65 | #include "pkcs7.h" | 65 | #include <openssl/pkcs7.h> |
66 | 66 | ||
diff --git a/src/lib/libcrypto/pkcs7/pk7_enc.c b/src/lib/libcrypto/pkcs7/pk7_enc.c index a5b6dc463f..acbb189c59 100644 --- a/src/lib/libcrypto/pkcs7/pk7_enc.c +++ b/src/lib/libcrypto/pkcs7/pk7_enc.c | |||
@@ -58,11 +58,11 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
62 | #include "rand.h" | 62 | #include <openssl/rand.h> |
63 | #include "objects.h" | 63 | #include <openssl/objects.h> |
64 | #include "x509.h" | 64 | #include <openssl/x509.h> |
65 | #include "pkcs7.h" | 65 | #include <openssl/pkcs7.h> |
66 | 66 | ||
67 | PKCS7_in_bio(PKCS7 *p7,BIO *in); | 67 | PKCS7_in_bio(PKCS7 *p7,BIO *in); |
68 | PKCS7_out_bio(PKCS7 *p7,BIO *out); | 68 | PKCS7_out_bio(PKCS7 *p7,BIO *out); |
diff --git a/src/lib/libcrypto/pkcs7/sign.c b/src/lib/libcrypto/pkcs7/sign.c index ead1cb65ca..8b59885f7e 100644 --- a/src/lib/libcrypto/pkcs7/sign.c +++ b/src/lib/libcrypto/pkcs7/sign.c | |||
@@ -56,29 +56,38 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include "bio.h" | 59 | #include <string.h> |
60 | #include "x509.h" | 60 | #include <openssl/bio.h> |
61 | #include "pem.h" | 61 | #include <openssl/x509.h> |
62 | #include <openssl/pem.h> | ||
63 | #include <openssl/err.h> | ||
62 | 64 | ||
63 | main(argc,argv) | 65 | int main(argc,argv) |
64 | int argc; | 66 | int argc; |
65 | char *argv[]; | 67 | char *argv[]; |
66 | { | 68 | { |
67 | X509 *x509; | 69 | X509 *x509; |
68 | EVP_PKEY *pkey; | 70 | EVP_PKEY *pkey; |
69 | PKCS7 *p7; | 71 | PKCS7 *p7; |
70 | PKCS7 *p7_data; | ||
71 | PKCS7_SIGNER_INFO *si; | 72 | PKCS7_SIGNER_INFO *si; |
72 | BIO *in; | 73 | BIO *in; |
73 | BIO *data,*p7bio; | 74 | BIO *data,*p7bio; |
74 | char buf[1024*4]; | 75 | char buf[1024*4]; |
75 | int i,j; | 76 | int i; |
76 | int nodetach=0; | 77 | int nodetach=0; |
77 | 78 | ||
79 | #ifndef OPENSSL_NO_MD2 | ||
78 | EVP_add_digest(EVP_md2()); | 80 | EVP_add_digest(EVP_md2()); |
81 | #endif | ||
82 | #ifndef OPENSSL_NO_MD5 | ||
79 | EVP_add_digest(EVP_md5()); | 83 | EVP_add_digest(EVP_md5()); |
84 | #endif | ||
85 | #ifndef OPENSSL_NO_SHA1 | ||
80 | EVP_add_digest(EVP_sha1()); | 86 | EVP_add_digest(EVP_sha1()); |
87 | #endif | ||
88 | #ifndef OPENSSL_NO_MDC2 | ||
81 | EVP_add_digest(EVP_mdc2()); | 89 | EVP_add_digest(EVP_mdc2()); |
90 | #endif | ||
82 | 91 | ||
83 | data=BIO_new(BIO_s_file()); | 92 | data=BIO_new(BIO_s_file()); |
84 | again: | 93 | again: |
@@ -97,15 +106,20 @@ again: | |||
97 | BIO_set_fp(data,stdin,BIO_NOCLOSE); | 106 | BIO_set_fp(data,stdin,BIO_NOCLOSE); |
98 | 107 | ||
99 | if ((in=BIO_new_file("server.pem","r")) == NULL) goto err; | 108 | if ((in=BIO_new_file("server.pem","r")) == NULL) goto err; |
100 | if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err; | 109 | if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err; |
101 | BIO_reset(in); | 110 | BIO_reset(in); |
102 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; | 111 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL) goto err; |
103 | BIO_free(in); | 112 | BIO_free(in); |
104 | 113 | ||
105 | p7=PKCS7_new(); | 114 | p7=PKCS7_new(); |
106 | PKCS7_set_type(p7,NID_pkcs7_signed); | 115 | PKCS7_set_type(p7,NID_pkcs7_signed); |
107 | 116 | ||
108 | if (PKCS7_add_signature(p7,x509,pkey,EVP_sha1()) == NULL) goto err; | 117 | si=PKCS7_add_signature(p7,x509,pkey,EVP_sha1()); |
118 | if (si == NULL) goto err; | ||
119 | |||
120 | /* If you do this then you get signing time automatically added */ | ||
121 | PKCS7_add_signed_attribute(si, NID_pkcs9_contentType, V_ASN1_OBJECT, | ||
122 | OBJ_nid2obj(NID_pkcs7_data)); | ||
109 | 123 | ||
110 | /* we may want to add more */ | 124 | /* we may want to add more */ |
111 | PKCS7_add_certificate(p7,x509); | 125 | PKCS7_add_certificate(p7,x509); |
@@ -125,7 +139,7 @@ again: | |||
125 | BIO_write(p7bio,buf,i); | 139 | BIO_write(p7bio,buf,i); |
126 | } | 140 | } |
127 | 141 | ||
128 | if (!PKCS7_dataSign(p7,p7bio)) goto err; | 142 | if (!PKCS7_dataFinal(p7,p7bio)) goto err; |
129 | BIO_free(p7bio); | 143 | BIO_free(p7bio); |
130 | 144 | ||
131 | PEM_write_PKCS7(stdout,p7); | 145 | PEM_write_PKCS7(stdout,p7); |
diff --git a/src/lib/libcrypto/pkcs7/verify.c b/src/lib/libcrypto/pkcs7/verify.c index 0e1c1b26dc..5f7afe8933 100644 --- a/src/lib/libcrypto/pkcs7/verify.c +++ b/src/lib/libcrypto/pkcs7/verify.c | |||
@@ -56,41 +56,50 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include "asn1.h" | 59 | #include <string.h> |
60 | #include "bio.h" | 60 | #include <openssl/bio.h> |
61 | #include "x509.h" | 61 | #include <openssl/asn1.h> |
62 | #include "pem.h" | 62 | #include <openssl/x509.h> |
63 | #include <openssl/pem.h> | ||
64 | #include <openssl/err.h> | ||
65 | #include "example.h" | ||
63 | 66 | ||
64 | int verify_callback(int ok, X509_STORE_CTX *ctx); | 67 | int verify_callback(int ok, X509_STORE_CTX *ctx); |
65 | 68 | ||
66 | BIO *bio_err=NULL; | 69 | BIO *bio_err=NULL; |
70 | BIO *bio_out=NULL; | ||
67 | 71 | ||
68 | main(argc,argv) | 72 | int main(argc,argv) |
69 | int argc; | 73 | int argc; |
70 | char *argv[]; | 74 | char *argv[]; |
71 | { | 75 | { |
72 | X509 *x509,*x; | ||
73 | PKCS7 *p7; | 76 | PKCS7 *p7; |
74 | PKCS7_SIGNED *s; | ||
75 | PKCS7_SIGNER_INFO *si; | 77 | PKCS7_SIGNER_INFO *si; |
76 | PKCS7_ISSUER_AND_SERIAL *ias; | ||
77 | X509_STORE_CTX cert_ctx; | 78 | X509_STORE_CTX cert_ctx; |
78 | X509_STORE *cert_store=NULL; | 79 | X509_STORE *cert_store=NULL; |
79 | X509_LOOKUP *lookup=NULL; | ||
80 | BIO *data,*detached=NULL,*p7bio=NULL; | 80 | BIO *data,*detached=NULL,*p7bio=NULL; |
81 | char buf[1024*4]; | 81 | char buf[1024*4]; |
82 | unsigned char *p,*pp; | 82 | char *pp; |
83 | int i,j,printit=0; | 83 | int i,printit=0; |
84 | STACK *sk; | 84 | STACK_OF(PKCS7_SIGNER_INFO) *sk; |
85 | 85 | ||
86 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 86 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
87 | bio_out=BIO_new_fp(stdout,BIO_NOCLOSE); | ||
88 | #ifndef OPENSSL_NO_MD2 | ||
87 | EVP_add_digest(EVP_md2()); | 89 | EVP_add_digest(EVP_md2()); |
90 | #endif | ||
91 | #ifndef OPENSSL_NO_MD5 | ||
88 | EVP_add_digest(EVP_md5()); | 92 | EVP_add_digest(EVP_md5()); |
93 | #endif | ||
94 | #ifndef OPENSSL_NO_SHA1 | ||
89 | EVP_add_digest(EVP_sha1()); | 95 | EVP_add_digest(EVP_sha1()); |
96 | #endif | ||
97 | #ifndef OPENSSL_NO_MDC2 | ||
90 | EVP_add_digest(EVP_mdc2()); | 98 | EVP_add_digest(EVP_mdc2()); |
99 | #endif | ||
91 | 100 | ||
92 | data=BIO_new(BIO_s_file()); | 101 | data=BIO_new(BIO_s_file()); |
93 | again: | 102 | |
94 | pp=NULL; | 103 | pp=NULL; |
95 | while (argc > 1) | 104 | while (argc > 1) |
96 | { | 105 | { |
@@ -121,7 +130,7 @@ again: | |||
121 | 130 | ||
122 | 131 | ||
123 | /* Load the PKCS7 object from a file */ | 132 | /* Load the PKCS7 object from a file */ |
124 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL)) == NULL) goto err; | 133 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err; |
125 | 134 | ||
126 | /* This stuff is being setup for certificate verification. | 135 | /* This stuff is being setup for certificate verification. |
127 | * When using SSL, it could be replaced with a | 136 | * When using SSL, it could be replaced with a |
@@ -131,10 +140,10 @@ again: | |||
131 | X509_STORE_load_locations(cert_store,NULL,"../../certs"); | 140 | X509_STORE_load_locations(cert_store,NULL,"../../certs"); |
132 | X509_STORE_set_verify_cb_func(cert_store,verify_callback); | 141 | X509_STORE_set_verify_cb_func(cert_store,verify_callback); |
133 | 142 | ||
134 | ERR_clear_errors(); | 143 | ERR_clear_error(); |
135 | 144 | ||
136 | /* We need to process the data */ | 145 | /* We need to process the data */ |
137 | if (PKCS7_get_detached(p7)) | 146 | if ((PKCS7_get_detached(p7) || detached)) |
138 | { | 147 | { |
139 | if (detached == NULL) | 148 | if (detached == NULL) |
140 | { | 149 | { |
@@ -166,12 +175,29 @@ again: | |||
166 | } | 175 | } |
167 | 176 | ||
168 | /* Ok, first we need to, for each subject entry, see if we can verify */ | 177 | /* Ok, first we need to, for each subject entry, see if we can verify */ |
169 | for (i=0; i<sk_num(sk); i++) | 178 | for (i=0; i<sk_PKCS7_SIGNER_INFO_num(sk); i++) |
170 | { | 179 | { |
171 | si=(PKCS7_SIGNER_INFO *)sk_value(sk,i); | 180 | ASN1_UTCTIME *tm; |
181 | char *str1,*str2; | ||
182 | |||
183 | si=sk_PKCS7_SIGNER_INFO_value(sk,i); | ||
172 | i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); | 184 | i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); |
173 | if (i <= 0) | 185 | if (i <= 0) |
174 | goto err; | 186 | goto err; |
187 | printf("signer info\n"); | ||
188 | if ((tm=get_signed_time(si)) != NULL) | ||
189 | { | ||
190 | BIO_printf(bio_out,"Signed time:"); | ||
191 | ASN1_UTCTIME_print(bio_out,tm); | ||
192 | ASN1_UTCTIME_free(tm); | ||
193 | BIO_printf(bio_out,"\n"); | ||
194 | } | ||
195 | if (get_signed_seq2string(si,&str1,&str2)) | ||
196 | { | ||
197 | BIO_printf(bio_out,"String 1 is %s\n",str1); | ||
198 | BIO_printf(bio_out,"String 2 is %s\n",str2); | ||
199 | } | ||
200 | |||
175 | } | 201 | } |
176 | 202 | ||
177 | X509_STORE_free(cert_store); | 203 | X509_STORE_free(cert_store); |
@@ -185,9 +211,7 @@ err: | |||
185 | } | 211 | } |
186 | 212 | ||
187 | /* should be X509 * but we can just have them as char *. */ | 213 | /* should be X509 * but we can just have them as char *. */ |
188 | int verify_callback(ok, ctx) | 214 | int verify_callback(int ok, X509_STORE_CTX *ctx) |
189 | int ok; | ||
190 | X509_STORE_CTX *ctx; | ||
191 | { | 215 | { |
192 | char buf[256]; | 216 | char buf[256]; |
193 | X509 *err_cert; | 217 | X509 *err_cert; |
diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c index f44b36a8b9..a00ed70718 100644 --- a/src/lib/libcrypto/rand/md_rand.c +++ b/src/lib/libcrypto/rand/md_rand.c | |||
@@ -55,100 +55,185 @@ | |||
55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | /* ==================================================================== | ||
59 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. | ||
60 | * | ||
61 | * Redistribution and use in source and binary forms, with or without | ||
62 | * modification, are permitted provided that the following conditions | ||
63 | * are met: | ||
64 | * | ||
65 | * 1. Redistributions of source code must retain the above copyright | ||
66 | * notice, this list of conditions and the following disclaimer. | ||
67 | * | ||
68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
69 | * notice, this list of conditions and the following disclaimer in | ||
70 | * the documentation and/or other materials provided with the | ||
71 | * distribution. | ||
72 | * | ||
73 | * 3. All advertising materials mentioning features or use of this | ||
74 | * software must display the following acknowledgment: | ||
75 | * "This product includes software developed by the OpenSSL Project | ||
76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
77 | * | ||
78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
79 | * endorse or promote products derived from this software without | ||
80 | * prior written permission. For written permission, please contact | ||
81 | * openssl-core@openssl.org. | ||
82 | * | ||
83 | * 5. Products derived from this software may not be called "OpenSSL" | ||
84 | * nor may "OpenSSL" appear in their names without prior written | ||
85 | * permission of the OpenSSL Project. | ||
86 | * | ||
87 | * 6. Redistributions of any form whatsoever must retain the following | ||
88 | * acknowledgment: | ||
89 | * "This product includes software developed by the OpenSSL Project | ||
90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
91 | * | ||
92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
103 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
104 | * ==================================================================== | ||
105 | * | ||
106 | * This product includes cryptographic software written by Eric Young | ||
107 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
108 | * Hudson (tjh@cryptsoft.com). | ||
109 | * | ||
110 | */ | ||
58 | 111 | ||
59 | #include <stdio.h> | 112 | #ifdef MD_RAND_DEBUG |
60 | #include "cryptlib.h" | 113 | # ifndef NDEBUG |
61 | #include <sys/types.h> | 114 | # define NDEBUG |
62 | #include <time.h> | 115 | # endif |
63 | |||
64 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | ||
65 | #ifndef NO_MD5 | ||
66 | #define USE_MD5_RAND | ||
67 | #elif !defined(NO_SHA1) | ||
68 | #define USE_SHA1_RAND | ||
69 | #elif !defined(NO_MDC2) | ||
70 | #define USE_MDC2_RAND | ||
71 | #elif !defined(NO_MD2) | ||
72 | #define USE_MD2_RAND | ||
73 | #else | ||
74 | We need a message digest of some type | ||
75 | #endif | ||
76 | #endif | 116 | #endif |
77 | 117 | ||
78 | /* Changed how the state buffer used. I now attempt to 'wrap' such | 118 | #include <assert.h> |
79 | * that I don't run over the same locations the next time go through | 119 | #include <stdio.h> |
80 | * the 1023 bytes - many thanks to | 120 | #include <string.h> |
81 | * Robert J. LeBlanc <rjl@renaissoft.com> for his comments | ||
82 | */ | ||
83 | 121 | ||
84 | #if defined(USE_MD5_RAND) | 122 | #include "e_os.h" |
85 | #include "md5.h" | ||
86 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
87 | #define MD_CTX MD5_CTX | ||
88 | #define MD_Init(a) MD5_Init(a) | ||
89 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
90 | #define MD_Final(a,b) MD5_Final(a,b) | ||
91 | #elif defined(USE_SHA1_RAND) | ||
92 | #include "sha.h" | ||
93 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
94 | #define MD_CTX SHA_CTX | ||
95 | #define MD_Init(a) SHA1_Init(a) | ||
96 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
97 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
98 | #elif defined(USE_MDC2_RAND) | ||
99 | #include "mdc2.h" | ||
100 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
101 | #define MD_CTX MDC2_CTX | ||
102 | #define MD_Init(a) MDC2_Init(a) | ||
103 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
104 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
105 | #elif defined(USE_MD2_RAND) | ||
106 | #include "md2.h" | ||
107 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
108 | #define MD_CTX MD2_CTX | ||
109 | #define MD_Init(a) MD2_Init(a) | ||
110 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
111 | #define MD_Final(a,b) MD2_Final(a,b) | ||
112 | #endif | ||
113 | 123 | ||
114 | #include "rand.h" | 124 | #include <openssl/rand.h> |
125 | #include "rand_lcl.h" | ||
115 | 126 | ||
116 | /*#define NORAND 1 */ | 127 | #include <openssl/crypto.h> |
117 | /*#define PREDICT 1 */ | 128 | #include <openssl/err.h> |
129 | |||
130 | #ifdef BN_DEBUG | ||
131 | # define PREDICT | ||
132 | #endif | ||
133 | |||
134 | /* #define PREDICT 1 */ | ||
118 | 135 | ||
119 | #define STATE_SIZE 1023 | 136 | #define STATE_SIZE 1023 |
120 | static int state_num=0,state_index=0; | 137 | static int state_num=0,state_index=0; |
121 | static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH]; | 138 | static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH]; |
122 | static unsigned char md[MD_DIGEST_LENGTH]; | 139 | static unsigned char md[MD_DIGEST_LENGTH]; |
123 | static int md_count=0; | 140 | static long md_count[2]={0,0}; |
141 | static double entropy=0; | ||
142 | static int initialized=0; | ||
124 | 143 | ||
125 | char *RAND_version="RAND part of SSLeay 0.9.0b 29-Jun-1998"; | 144 | static unsigned int crypto_lock_rand = 0; /* may be set only when a thread |
145 | * holds CRYPTO_LOCK_RAND | ||
146 | * (to prevent double locking) */ | ||
147 | /* access to lockin_thread is synchronized by CRYPTO_LOCK_RAND2 */ | ||
148 | static unsigned long locking_thread = 0; /* valid iff crypto_lock_rand is set */ | ||
126 | 149 | ||
127 | void RAND_cleanup() | 150 | |
151 | #ifdef PREDICT | ||
152 | int rand_predictable=0; | ||
153 | #endif | ||
154 | |||
155 | const char *RAND_version="RAND" OPENSSL_VERSION_PTEXT; | ||
156 | |||
157 | static void ssleay_rand_cleanup(void); | ||
158 | static void ssleay_rand_seed(const void *buf, int num); | ||
159 | static void ssleay_rand_add(const void *buf, int num, double add_entropy); | ||
160 | static int ssleay_rand_bytes(unsigned char *buf, int num); | ||
161 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num); | ||
162 | static int ssleay_rand_status(void); | ||
163 | |||
164 | RAND_METHOD rand_ssleay_meth={ | ||
165 | ssleay_rand_seed, | ||
166 | ssleay_rand_bytes, | ||
167 | ssleay_rand_cleanup, | ||
168 | ssleay_rand_add, | ||
169 | ssleay_rand_pseudo_bytes, | ||
170 | ssleay_rand_status | ||
171 | }; | ||
172 | |||
173 | RAND_METHOD *RAND_SSLeay(void) | ||
174 | { | ||
175 | return(&rand_ssleay_meth); | ||
176 | } | ||
177 | |||
178 | static void ssleay_rand_cleanup(void) | ||
128 | { | 179 | { |
129 | memset(state,0,sizeof(state)); | 180 | memset(state,0,sizeof(state)); |
130 | state_num=0; | 181 | state_num=0; |
131 | state_index=0; | 182 | state_index=0; |
132 | memset(md,0,MD_DIGEST_LENGTH); | 183 | memset(md,0,MD_DIGEST_LENGTH); |
133 | md_count=0; | 184 | md_count[0]=0; |
185 | md_count[1]=0; | ||
186 | entropy=0; | ||
187 | initialized=0; | ||
134 | } | 188 | } |
135 | 189 | ||
136 | void RAND_seed(buf,num) | 190 | static void ssleay_rand_add(const void *buf, int num, double add) |
137 | unsigned char *buf; | ||
138 | int num; | ||
139 | { | 191 | { |
140 | int i,j,k,st_idx,st_num; | 192 | int i,j,k,st_idx; |
141 | MD_CTX m; | 193 | long md_c[2]; |
142 | 194 | unsigned char local_md[MD_DIGEST_LENGTH]; | |
143 | #ifdef NORAND | 195 | EVP_MD_CTX m; |
144 | return; | 196 | int do_not_lock; |
145 | #endif | 197 | |
198 | /* | ||
199 | * (Based on the rand(3) manpage) | ||
200 | * | ||
201 | * The input is chopped up into units of 20 bytes (or less for | ||
202 | * the last block). Each of these blocks is run through the hash | ||
203 | * function as follows: The data passed to the hash function | ||
204 | * is the current 'md', the same number of bytes from the 'state' | ||
205 | * (the location determined by in incremented looping index) as | ||
206 | * the current 'block', the new key data 'block', and 'count' | ||
207 | * (which is incremented after each use). | ||
208 | * The result of this is kept in 'md' and also xored into the | ||
209 | * 'state' at the same locations that were used as input into the | ||
210 | * hash function. | ||
211 | */ | ||
212 | |||
213 | /* check if we already have the lock */ | ||
214 | if (crypto_lock_rand) | ||
215 | { | ||
216 | CRYPTO_r_lock(CRYPTO_LOCK_RAND2); | ||
217 | do_not_lock = (locking_thread == CRYPTO_thread_id()); | ||
218 | CRYPTO_r_unlock(CRYPTO_LOCK_RAND2); | ||
219 | } | ||
220 | else | ||
221 | do_not_lock = 0; | ||
146 | 222 | ||
147 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | 223 | if (!do_not_lock) CRYPTO_w_lock(CRYPTO_LOCK_RAND); |
148 | st_idx=state_index; | 224 | st_idx=state_index; |
149 | st_num=state_num; | ||
150 | 225 | ||
151 | state_index=(state_index+num); | 226 | /* use our own copies of the counters so that even |
227 | * if a concurrent thread seeds with exactly the | ||
228 | * same data and uses the same subarray there's _some_ | ||
229 | * difference */ | ||
230 | md_c[0] = md_count[0]; | ||
231 | md_c[1] = md_count[1]; | ||
232 | |||
233 | memcpy(local_md, md, sizeof md); | ||
234 | |||
235 | /* state_index <= state_num <= STATE_SIZE */ | ||
236 | state_index += num; | ||
152 | if (state_index >= STATE_SIZE) | 237 | if (state_index >= STATE_SIZE) |
153 | { | 238 | { |
154 | state_index%=STATE_SIZE; | 239 | state_index%=STATE_SIZE; |
@@ -159,15 +244,24 @@ int num; | |||
159 | if (state_index > state_num) | 244 | if (state_index > state_num) |
160 | state_num=state_index; | 245 | state_num=state_index; |
161 | } | 246 | } |
162 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 247 | /* state_index <= state_num <= STATE_SIZE */ |
163 | 248 | ||
249 | /* state[st_idx], ..., state[(st_idx + num - 1) % STATE_SIZE] | ||
250 | * are what we will use now, but other threads may use them | ||
251 | * as well */ | ||
252 | |||
253 | md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0); | ||
254 | |||
255 | if (!do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
256 | |||
257 | EVP_MD_CTX_init(&m); | ||
164 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) | 258 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) |
165 | { | 259 | { |
166 | j=(num-i); | 260 | j=(num-i); |
167 | j=(j > MD_DIGEST_LENGTH)?MD_DIGEST_LENGTH:j; | 261 | j=(j > MD_DIGEST_LENGTH)?MD_DIGEST_LENGTH:j; |
168 | 262 | ||
169 | MD_Init(&m); | 263 | MD_Init(&m); |
170 | MD_Update(&m,md,MD_DIGEST_LENGTH); | 264 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); |
171 | k=(st_idx+j)-STATE_SIZE; | 265 | k=(st_idx+j)-STATE_SIZE; |
172 | if (k > 0) | 266 | if (k > 0) |
173 | { | 267 | { |
@@ -178,228 +272,301 @@ int num; | |||
178 | MD_Update(&m,&(state[st_idx]),j); | 272 | MD_Update(&m,&(state[st_idx]),j); |
179 | 273 | ||
180 | MD_Update(&m,buf,j); | 274 | MD_Update(&m,buf,j); |
181 | MD_Final(md,&m); | 275 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); |
276 | MD_Final(&m,local_md); | ||
277 | md_c[1]++; | ||
182 | 278 | ||
183 | buf+=j; | 279 | buf=(const char *)buf + j; |
184 | 280 | ||
185 | for (k=0; k<j; k++) | 281 | for (k=0; k<j; k++) |
186 | { | 282 | { |
187 | state[st_idx++]^=md[k]; | 283 | /* Parallel threads may interfere with this, |
284 | * but always each byte of the new state is | ||
285 | * the XOR of some previous value of its | ||
286 | * and local_md (itermediate values may be lost). | ||
287 | * Alway using locking could hurt performance more | ||
288 | * than necessary given that conflicts occur only | ||
289 | * when the total seeding is longer than the random | ||
290 | * state. */ | ||
291 | state[st_idx++]^=local_md[k]; | ||
188 | if (st_idx >= STATE_SIZE) | 292 | if (st_idx >= STATE_SIZE) |
189 | { | ||
190 | st_idx=0; | 293 | st_idx=0; |
191 | st_num=STATE_SIZE; | ||
192 | } | ||
193 | } | 294 | } |
194 | } | 295 | } |
195 | memset((char *)&m,0,sizeof(m)); | 296 | EVP_MD_CTX_cleanup(&m); |
297 | |||
298 | if (!do_not_lock) CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
299 | /* Don't just copy back local_md into md -- this could mean that | ||
300 | * other thread's seeding remains without effect (except for | ||
301 | * the incremented counter). By XORing it we keep at least as | ||
302 | * much entropy as fits into md. */ | ||
303 | for (k = 0; k < sizeof md; k++) | ||
304 | { | ||
305 | md[k] ^= local_md[k]; | ||
306 | } | ||
307 | if (entropy < ENTROPY_NEEDED) /* stop counting when we have enough */ | ||
308 | entropy += add; | ||
309 | if (!do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
310 | |||
311 | #if !defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) | ||
312 | assert(md_c[1] == md_count[1]); | ||
313 | #endif | ||
196 | } | 314 | } |
197 | 315 | ||
198 | void RAND_bytes(buf,num) | 316 | static void ssleay_rand_seed(const void *buf, int num) |
199 | unsigned char *buf; | ||
200 | int num; | ||
201 | { | 317 | { |
318 | ssleay_rand_add(buf, num, num); | ||
319 | } | ||
320 | |||
321 | static int ssleay_rand_bytes(unsigned char *buf, int num) | ||
322 | { | ||
323 | static volatile int stirred_pool = 0; | ||
202 | int i,j,k,st_num,st_idx; | 324 | int i,j,k,st_num,st_idx; |
203 | MD_CTX m; | 325 | int num_ceil; |
204 | static int init=1; | 326 | int ok; |
205 | unsigned long l; | 327 | long md_c[2]; |
206 | #ifdef DEVRANDOM | 328 | unsigned char local_md[MD_DIGEST_LENGTH]; |
207 | FILE *fh; | 329 | EVP_MD_CTX m; |
330 | #ifndef GETPID_IS_MEANINGLESS | ||
331 | pid_t curr_pid = getpid(); | ||
208 | #endif | 332 | #endif |
333 | int do_stir_pool = 0; | ||
209 | 334 | ||
210 | #ifdef PREDICT | 335 | #ifdef PREDICT |
211 | { | 336 | if (rand_predictable) |
212 | static unsigned char val=0; | 337 | { |
338 | static unsigned char val=0; | ||
213 | 339 | ||
214 | for (i=0; i<num; i++) | 340 | for (i=0; i<num; i++) |
215 | buf[i]=val++; | 341 | buf[i]=val++; |
216 | return; | 342 | return(1); |
217 | } | 343 | } |
218 | #endif | 344 | #endif |
219 | 345 | ||
346 | if (num <= 0) | ||
347 | return 1; | ||
348 | |||
349 | EVP_MD_CTX_init(&m); | ||
350 | /* round upwards to multiple of MD_DIGEST_LENGTH/2 */ | ||
351 | num_ceil = (1 + (num-1)/(MD_DIGEST_LENGTH/2)) * (MD_DIGEST_LENGTH/2); | ||
352 | |||
353 | /* | ||
354 | * (Based on the rand(3) manpage:) | ||
355 | * | ||
356 | * For each group of 10 bytes (or less), we do the following: | ||
357 | * | ||
358 | * Input into the hash function the local 'md' (which is initialized from | ||
359 | * the global 'md' before any bytes are generated), the bytes that are to | ||
360 | * be overwritten by the random bytes, and bytes from the 'state' | ||
361 | * (incrementing looping index). From this digest output (which is kept | ||
362 | * in 'md'), the top (up to) 10 bytes are returned to the caller and the | ||
363 | * bottom 10 bytes are xored into the 'state'. | ||
364 | * | ||
365 | * Finally, after we have finished 'num' random bytes for the | ||
366 | * caller, 'count' (which is incremented) and the local and global 'md' | ||
367 | * are fed into the hash function and the results are kept in the | ||
368 | * global 'md'. | ||
369 | */ | ||
370 | |||
220 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | 371 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); |
221 | 372 | ||
222 | if (init) | 373 | /* prevent ssleay_rand_bytes() from trying to obtain the lock again */ |
374 | CRYPTO_w_lock(CRYPTO_LOCK_RAND2); | ||
375 | locking_thread = CRYPTO_thread_id(); | ||
376 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND2); | ||
377 | crypto_lock_rand = 1; | ||
378 | |||
379 | if (!initialized) | ||
223 | { | 380 | { |
224 | init=0; | 381 | RAND_poll(); |
225 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 382 | initialized = 1; |
226 | /* put in some default random data, we need more than | 383 | } |
227 | * just this */ | 384 | |
228 | RAND_seed((unsigned char *)&m,sizeof(m)); | 385 | if (!stirred_pool) |
229 | #ifndef MSDOS | 386 | do_stir_pool = 1; |
230 | l=getpid(); | 387 | |
231 | RAND_seed((unsigned char *)&l,sizeof(l)); | 388 | ok = (entropy >= ENTROPY_NEEDED); |
232 | l=getuid(); | 389 | if (!ok) |
233 | RAND_seed((unsigned char *)&l,sizeof(l)); | 390 | { |
234 | #endif | 391 | /* If the PRNG state is not yet unpredictable, then seeing |
235 | l=time(NULL); | 392 | * the PRNG output may help attackers to determine the new |
236 | RAND_seed((unsigned char *)&l,sizeof(l)); | 393 | * state; thus we have to decrease the entropy estimate. |
237 | 394 | * Once we've had enough initial seeding we don't bother to | |
238 | /* #ifdef DEVRANDOM */ | 395 | * adjust the entropy count, though, because we're not ambitious |
239 | /* | 396 | * to provide *information-theoretic* randomness. |
240 | * Use a random entropy pool device. | 397 | * |
241 | * Linux 1.3.x and FreeBSD-Current has | 398 | * NOTE: This approach fails if the program forks before |
242 | * this. Use /dev/urandom if you can | 399 | * we have enough entropy. Entropy should be collected |
243 | * as /dev/random will block if it runs out | 400 | * in a separate input pool and be transferred to the |
244 | * of random entries. | 401 | * output pool only when the entropy limit has been reached. |
245 | */ | 402 | */ |
246 | if ((fh = fopen(DEVRANDOM, "r")) != NULL) | 403 | entropy -= num; |
404 | if (entropy < 0) | ||
405 | entropy = 0; | ||
406 | } | ||
407 | |||
408 | if (do_stir_pool) | ||
409 | { | ||
410 | /* In the output function only half of 'md' remains secret, | ||
411 | * so we better make sure that the required entropy gets | ||
412 | * 'evenly distributed' through 'state', our randomness pool. | ||
413 | * The input function (ssleay_rand_add) chains all of 'md', | ||
414 | * which makes it more suitable for this purpose. | ||
415 | */ | ||
416 | |||
417 | int n = STATE_SIZE; /* so that the complete pool gets accessed */ | ||
418 | while (n > 0) | ||
247 | { | 419 | { |
248 | unsigned char tmpbuf[32]; | 420 | #if MD_DIGEST_LENGTH > 20 |
249 | 421 | # error "Please adjust DUMMY_SEED." | |
250 | fread((unsigned char *)tmpbuf,1,32,fh); | ||
251 | /* we don't care how many bytes we read, | ||
252 | * we will just copy the 'stack' if there is | ||
253 | * nothing else :-) */ | ||
254 | fclose(fh); | ||
255 | RAND_seed(tmpbuf,32); | ||
256 | memset(tmpbuf,0,32); | ||
257 | } | ||
258 | /* #endif */ | ||
259 | #ifdef PURIFY | ||
260 | memset(state,0,STATE_SIZE); | ||
261 | memset(md,0,MD_DIGEST_LENGTH); | ||
262 | #endif | 422 | #endif |
263 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | 423 | #define DUMMY_SEED "...................." /* at least MD_DIGEST_LENGTH */ |
424 | /* Note that the seed does not matter, it's just that | ||
425 | * ssleay_rand_add expects to have something to hash. */ | ||
426 | ssleay_rand_add(DUMMY_SEED, MD_DIGEST_LENGTH, 0.0); | ||
427 | n -= MD_DIGEST_LENGTH; | ||
428 | } | ||
429 | if (ok) | ||
430 | stirred_pool = 1; | ||
264 | } | 431 | } |
265 | 432 | ||
266 | st_idx=state_index; | 433 | st_idx=state_index; |
267 | st_num=state_num; | 434 | st_num=state_num; |
268 | state_index+=num; | 435 | md_c[0] = md_count[0]; |
436 | md_c[1] = md_count[1]; | ||
437 | memcpy(local_md, md, sizeof md); | ||
438 | |||
439 | state_index+=num_ceil; | ||
269 | if (state_index > state_num) | 440 | if (state_index > state_num) |
270 | state_index=(state_index%state_num); | 441 | state_index %= state_num; |
271 | 442 | ||
443 | /* state[st_idx], ..., state[(st_idx + num_ceil - 1) % st_num] | ||
444 | * are now ours (but other threads may use them too) */ | ||
445 | |||
446 | md_count[0] += 1; | ||
447 | |||
448 | /* before unlocking, we must clear 'crypto_lock_rand' */ | ||
449 | crypto_lock_rand = 0; | ||
272 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | 450 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
273 | 451 | ||
274 | while (num > 0) | 452 | while (num > 0) |
275 | { | 453 | { |
454 | /* num_ceil -= MD_DIGEST_LENGTH/2 */ | ||
276 | j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num; | 455 | j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num; |
277 | num-=j; | 456 | num-=j; |
278 | MD_Init(&m); | 457 | MD_Init(&m); |
279 | MD_Update(&m,&(md[MD_DIGEST_LENGTH/2]),MD_DIGEST_LENGTH/2); | 458 | #ifndef GETPID_IS_MEANINGLESS |
459 | if (curr_pid) /* just in the first iteration to save time */ | ||
460 | { | ||
461 | MD_Update(&m,(unsigned char*)&curr_pid,sizeof curr_pid); | ||
462 | curr_pid = 0; | ||
463 | } | ||
464 | #endif | ||
465 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
466 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | ||
280 | #ifndef PURIFY | 467 | #ifndef PURIFY |
281 | MD_Update(&m,buf,j); /* purify complains */ | 468 | MD_Update(&m,buf,j); /* purify complains */ |
282 | #endif | 469 | #endif |
283 | k=(st_idx+j)-st_num; | 470 | k=(st_idx+MD_DIGEST_LENGTH/2)-st_num; |
284 | if (k > 0) | 471 | if (k > 0) |
285 | { | 472 | { |
286 | MD_Update(&m,&(state[st_idx]),j-k); | 473 | MD_Update(&m,&(state[st_idx]),MD_DIGEST_LENGTH/2-k); |
287 | MD_Update(&m,&(state[0]),k); | 474 | MD_Update(&m,&(state[0]),k); |
288 | } | 475 | } |
289 | else | 476 | else |
290 | MD_Update(&m,&(state[st_idx]),j); | 477 | MD_Update(&m,&(state[st_idx]),MD_DIGEST_LENGTH/2); |
291 | MD_Final(md,&m); | 478 | MD_Final(&m,local_md); |
292 | 479 | ||
293 | for (i=0; i<j; i++) | 480 | for (i=0; i<MD_DIGEST_LENGTH/2; i++) |
294 | { | 481 | { |
482 | state[st_idx++]^=local_md[i]; /* may compete with other threads */ | ||
295 | if (st_idx >= st_num) | 483 | if (st_idx >= st_num) |
296 | st_idx=0; | 484 | st_idx=0; |
297 | state[st_idx++]^=md[i]; | 485 | if (i < j) |
298 | *(buf++)=md[i+MD_DIGEST_LENGTH/2]; | 486 | *(buf++)=local_md[i+MD_DIGEST_LENGTH/2]; |
299 | } | 487 | } |
300 | } | 488 | } |
301 | 489 | ||
302 | MD_Init(&m); | 490 | MD_Init(&m); |
303 | MD_Update(&m,(unsigned char *)&md_count,sizeof(md_count)); md_count++; | 491 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); |
492 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
493 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
304 | MD_Update(&m,md,MD_DIGEST_LENGTH); | 494 | MD_Update(&m,md,MD_DIGEST_LENGTH); |
305 | MD_Final(md,&m); | 495 | MD_Final(&m,md); |
306 | memset(&m,0,sizeof(m)); | 496 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); |
497 | |||
498 | EVP_MD_CTX_cleanup(&m); | ||
499 | if (ok) | ||
500 | return(1); | ||
501 | else | ||
502 | { | ||
503 | RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); | ||
504 | ERR_add_error_data(1, "You need to read the OpenSSL FAQ, " | ||
505 | "http://www.openssl.org/support/faq.html"); | ||
506 | return(0); | ||
507 | } | ||
307 | } | 508 | } |
308 | 509 | ||
309 | #ifdef WINDOWS | 510 | /* pseudo-random bytes that are guaranteed to be unique but not |
310 | #include <windows.h> | 511 | unpredictable */ |
311 | #include <rand.h> | 512 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) |
513 | { | ||
514 | int ret; | ||
515 | unsigned long err; | ||
312 | 516 | ||
313 | /***************************************************************************** | 517 | ret = RAND_bytes(buf, num); |
314 | * Initialisation function for the SSL random generator. Takes the contents | 518 | if (ret == 0) |
315 | * of the screen as random seed. | 519 | { |
316 | * | 520 | err = ERR_peek_error(); |
317 | * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. | 521 | if (ERR_GET_LIB(err) == ERR_LIB_RAND && |
318 | * | 522 | ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED) |
319 | * Code adapted from | 523 | (void)ERR_get_error(); |
320 | * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>; | 524 | } |
321 | * the original copyright message is: | 525 | return (ret); |
322 | * | ||
323 | // (C) Copyright Microsoft Corp. 1993. All rights reserved. | ||
324 | // | ||
325 | // You have a royalty-free right to use, modify, reproduce and | ||
326 | // distribute the Sample Files (and/or any modified version) in | ||
327 | // any way you find useful, provided that you agree that | ||
328 | // Microsoft has no warranty obligations or liability for any | ||
329 | // Sample Application Files which are modified. | ||
330 | */ | ||
331 | /* | ||
332 | * I have modified the loading of bytes via RAND_seed() mechanism since | ||
333 | * the origional would have been very very CPU intensive since RAND_seed() | ||
334 | * does an MD5 per 16 bytes of input. The cost to digest 16 bytes is the same | ||
335 | * as that to digest 56 bytes. So under the old system, a screen of | ||
336 | * 1024*768*256 would have been CPU cost of approximatly 49,000 56 byte MD5 | ||
337 | * digests or digesting 2.7 mbytes. What I have put in place would | ||
338 | * be 48 16k MD5 digests, or efectivly 48*16+48 MD5 bytes or 816 kbytes | ||
339 | * or about 3.5 times as much. | ||
340 | * - eric | ||
341 | */ | ||
342 | void RAND_screen(void) | ||
343 | { | ||
344 | HDC hScrDC; /* screen DC */ | ||
345 | HDC hMemDC; /* memory DC */ | ||
346 | HBITMAP hBitmap; /* handle for our bitmap */ | ||
347 | HBITMAP hOldBitmap; /* handle for previous bitmap */ | ||
348 | BITMAP bm; /* bitmap properties */ | ||
349 | unsigned int size; /* size of bitmap */ | ||
350 | char *bmbits; /* contents of bitmap */ | ||
351 | int w; /* screen width */ | ||
352 | int h; /* screen height */ | ||
353 | int y; /* y-coordinate of screen lines to grab */ | ||
354 | int n = 16; /* number of screen lines to grab at a time */ | ||
355 | |||
356 | /* Create a screen DC and a memory DC compatible to screen DC */ | ||
357 | hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); | ||
358 | hMemDC = CreateCompatibleDC(hScrDC); | ||
359 | |||
360 | /* Get screen resolution */ | ||
361 | w = GetDeviceCaps(hScrDC, HORZRES); | ||
362 | h = GetDeviceCaps(hScrDC, VERTRES); | ||
363 | |||
364 | /* Create a bitmap compatible with the screen DC */ | ||
365 | hBitmap = CreateCompatibleBitmap(hScrDC, w, n); | ||
366 | |||
367 | /* Select new bitmap into memory DC */ | ||
368 | hOldBitmap = SelectObject(hMemDC, hBitmap); | ||
369 | |||
370 | /* Get bitmap properties */ | ||
371 | GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); | ||
372 | size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes; | ||
373 | |||
374 | bmbits = Malloc(size); | ||
375 | if (bmbits) { | ||
376 | /* Now go through the whole screen, repeatedly grabbing n lines */ | ||
377 | for (y = 0; y < h-n; y += n) | ||
378 | { | ||
379 | unsigned char md[MD_DIGEST_LENGTH]; | ||
380 | |||
381 | /* Bitblt screen DC to memory DC */ | ||
382 | BitBlt(hMemDC, 0, 0, w, n, hScrDC, 0, y, SRCCOPY); | ||
383 | |||
384 | /* Copy bitmap bits from memory DC to bmbits */ | ||
385 | GetBitmapBits(hBitmap, size, bmbits); | ||
386 | |||
387 | /* Get the MD5 of the bitmap */ | ||
388 | MD5(bmbits,size,md); | ||
389 | |||
390 | /* Seed the random generator with the MD5 digest */ | ||
391 | RAND_seed(md, MD_DIGEST_LENGTH); | ||
392 | } | 526 | } |
393 | 527 | ||
394 | Free(bmbits); | 528 | static int ssleay_rand_status(void) |
395 | } | 529 | { |
530 | int ret; | ||
531 | int do_not_lock; | ||
396 | 532 | ||
397 | /* Select old bitmap back into memory DC */ | 533 | /* check if we already have the lock |
398 | hBitmap = SelectObject(hMemDC, hOldBitmap); | 534 | * (could happen if a RAND_poll() implementation calls RAND_status()) */ |
535 | if (crypto_lock_rand) | ||
536 | { | ||
537 | CRYPTO_r_lock(CRYPTO_LOCK_RAND2); | ||
538 | do_not_lock = (locking_thread == CRYPTO_thread_id()); | ||
539 | CRYPTO_r_unlock(CRYPTO_LOCK_RAND2); | ||
540 | } | ||
541 | else | ||
542 | do_not_lock = 0; | ||
543 | |||
544 | if (!do_not_lock) | ||
545 | { | ||
546 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
547 | |||
548 | /* prevent ssleay_rand_bytes() from trying to obtain the lock again */ | ||
549 | CRYPTO_w_lock(CRYPTO_LOCK_RAND2); | ||
550 | locking_thread = CRYPTO_thread_id(); | ||
551 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND2); | ||
552 | crypto_lock_rand = 1; | ||
553 | } | ||
554 | |||
555 | if (!initialized) | ||
556 | { | ||
557 | RAND_poll(); | ||
558 | initialized = 1; | ||
559 | } | ||
399 | 560 | ||
400 | /* Clean up */ | 561 | ret = entropy >= ENTROPY_NEEDED; |
401 | DeleteObject(hBitmap); | 562 | |
402 | DeleteDC(hMemDC); | 563 | if (!do_not_lock) |
403 | DeleteDC(hScrDC); | 564 | { |
404 | } | 565 | /* before unlocking, we must clear 'crypto_lock_rand' */ |
405 | #endif | 566 | crypto_lock_rand = 0; |
567 | |||
568 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
569 | } | ||
570 | |||
571 | return ret; | ||
572 | } | ||
diff --git a/src/lib/libcrypto/rand/rand_egd.c b/src/lib/libcrypto/rand/rand_egd.c index d834408bd4..97ed12cf67 100644 --- a/src/lib/libcrypto/rand/rand_egd.c +++ b/src/lib/libcrypto/rand/rand_egd.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* crypto/rand/rand_egd.c */ | 1 | /* crypto/rand/rand_egd.c */ |
2 | /* Written by Ulf Moeller for the OpenSSL project. */ | 2 | /* Written by Ulf Moeller and Lutz Jaenicke for the OpenSSL project. */ |
3 | /* ==================================================================== | 3 | /* ==================================================================== |
4 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | 4 | * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. |
5 | * | 5 | * |
@@ -54,35 +54,92 @@ | |||
54 | * | 54 | * |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <openssl/e_os2.h> | ||
57 | #include <openssl/rand.h> | 58 | #include <openssl/rand.h> |
58 | 59 | ||
59 | /* Query the EGD <URL: http://www.lothar.com/tech/crypto/>. | 60 | /* |
61 | * Query the EGD <URL: http://www.lothar.com/tech/crypto/>. | ||
62 | * | ||
63 | * This module supplies three routines: | ||
64 | * | ||
65 | * RAND_query_egd_bytes(path, buf, bytes) | ||
66 | * will actually query "bytes" bytes of entropy form the egd-socket located | ||
67 | * at path and will write them to buf (if supplied) or will directly feed | ||
68 | * it to RAND_seed() if buf==NULL. | ||
69 | * The number of bytes is not limited by the maximum chunk size of EGD, | ||
70 | * which is 255 bytes. If more than 255 bytes are wanted, several chunks | ||
71 | * of entropy bytes are requested. The connection is left open until the | ||
72 | * query is competed. | ||
73 | * RAND_query_egd_bytes() returns with | ||
74 | * -1 if an error occured during connection or communication. | ||
75 | * num the number of bytes read from the EGD socket. This number is either | ||
76 | * the number of bytes requested or smaller, if the EGD pool is | ||
77 | * drained and the daemon signals that the pool is empty. | ||
78 | * This routine does not touch any RAND_status(). This is necessary, since | ||
79 | * PRNG functions may call it during initialization. | ||
80 | * | ||
81 | * RAND_egd_bytes(path, bytes) will query "bytes" bytes and have them | ||
82 | * used to seed the PRNG. | ||
83 | * RAND_egd_bytes() is a wrapper for RAND_query_egd_bytes() with buf=NULL. | ||
84 | * Unlike RAND_query_egd_bytes(), RAND_status() is used to test the | ||
85 | * seed status so that the return value can reflect the seed state: | ||
86 | * -1 if an error occured during connection or communication _or_ | ||
87 | * if the PRNG has still not received the required seeding. | ||
88 | * num the number of bytes read from the EGD socket. This number is either | ||
89 | * the number of bytes requested or smaller, if the EGD pool is | ||
90 | * drained and the daemon signals that the pool is empty. | ||
91 | * | ||
92 | * RAND_egd(path) will query 255 bytes and use the bytes retreived to seed | ||
93 | * the PRNG. | ||
94 | * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255. | ||
60 | */ | 95 | */ |
61 | 96 | ||
62 | #if defined(WIN32) || defined(VMS) || defined(__VMS) | 97 | #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) |
98 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) | ||
99 | { | ||
100 | return(-1); | ||
101 | } | ||
63 | int RAND_egd(const char *path) | 102 | int RAND_egd(const char *path) |
64 | { | 103 | { |
65 | return(-1); | 104 | return(-1); |
66 | } | 105 | } |
106 | |||
107 | int RAND_egd_bytes(const char *path,int bytes) | ||
108 | { | ||
109 | return(-1); | ||
110 | } | ||
67 | #else | 111 | #else |
68 | #include <openssl/opensslconf.h> | 112 | #include <openssl/opensslconf.h> |
69 | #include OPENSSL_UNISTD | 113 | #include OPENSSL_UNISTD |
70 | #include <sys/types.h> | 114 | #include <sys/types.h> |
71 | #include <sys/socket.h> | 115 | #include <sys/socket.h> |
72 | #include <sys/un.h> | 116 | #ifndef NO_SYS_UN_H |
117 | # ifdef OPENSSL_SYS_VSWORKS | ||
118 | # include <streams/un.h> | ||
119 | # else | ||
120 | # include <sys/un.h> | ||
121 | # endif | ||
122 | #else | ||
123 | struct sockaddr_un { | ||
124 | short sun_family; /* AF_UNIX */ | ||
125 | char sun_path[108]; /* path name (gag) */ | ||
126 | }; | ||
127 | #endif /* NO_SYS_UN_H */ | ||
73 | #include <string.h> | 128 | #include <string.h> |
129 | #include <errno.h> | ||
74 | 130 | ||
75 | #ifndef offsetof | 131 | #ifndef offsetof |
76 | # define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | 132 | # define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
77 | #endif | 133 | #endif |
78 | 134 | ||
79 | int RAND_egd(const char *path) | 135 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) |
80 | { | 136 | { |
81 | int ret = -1; | 137 | int ret = 0; |
82 | struct sockaddr_un addr; | 138 | struct sockaddr_un addr; |
83 | int len, num; | 139 | int len, num, numbytes; |
84 | int fd = -1; | 140 | int fd = -1; |
85 | unsigned char buf[256]; | 141 | int success; |
142 | unsigned char egdbuf[2], tempbuf[255], *retrievebuf; | ||
86 | 143 | ||
87 | memset(&addr, 0, sizeof(addr)); | 144 | memset(&addr, 0, sizeof(addr)); |
88 | addr.sun_family = AF_UNIX; | 145 | addr.sun_family = AF_UNIX; |
@@ -92,19 +149,150 @@ int RAND_egd(const char *path) | |||
92 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); | 149 | len = offsetof(struct sockaddr_un, sun_path) + strlen(path); |
93 | fd = socket(AF_UNIX, SOCK_STREAM, 0); | 150 | fd = socket(AF_UNIX, SOCK_STREAM, 0); |
94 | if (fd == -1) return (-1); | 151 | if (fd == -1) return (-1); |
95 | if (connect(fd, (struct sockaddr *)&addr, len) == -1) goto err; | 152 | success = 0; |
96 | buf[0] = 1; | 153 | while (!success) |
97 | buf[1] = 255; | 154 | { |
98 | write(fd, buf, 2); | 155 | if (connect(fd, (struct sockaddr *)&addr, len) == 0) |
99 | if (read(fd, buf, 1) != 1) goto err; | 156 | success = 1; |
100 | if (buf[0] == 0) goto err; | 157 | else |
101 | num = read(fd, buf, 255); | 158 | { |
159 | switch (errno) | ||
160 | { | ||
161 | #ifdef EINTR | ||
162 | case EINTR: | ||
163 | #endif | ||
164 | #ifdef EAGAIN | ||
165 | case EAGAIN: | ||
166 | #endif | ||
167 | #ifdef EINPROGRESS | ||
168 | case EINPROGRESS: | ||
169 | #endif | ||
170 | #ifdef EALREADY | ||
171 | case EALREADY: | ||
172 | #endif | ||
173 | /* No error, try again */ | ||
174 | break; | ||
175 | #ifdef EISCONN | ||
176 | case EISCONN: | ||
177 | success = 1; | ||
178 | break; | ||
179 | #endif | ||
180 | default: | ||
181 | goto err; /* failure */ | ||
182 | } | ||
183 | } | ||
184 | } | ||
185 | |||
186 | while(bytes > 0) | ||
187 | { | ||
188 | egdbuf[0] = 1; | ||
189 | egdbuf[1] = bytes < 255 ? bytes : 255; | ||
190 | numbytes = 0; | ||
191 | while (numbytes != 2) | ||
192 | { | ||
193 | num = write(fd, egdbuf + numbytes, 2 - numbytes); | ||
194 | if (num >= 0) | ||
195 | numbytes += num; | ||
196 | else | ||
197 | { | ||
198 | switch (errno) | ||
199 | { | ||
200 | #ifdef EINTR | ||
201 | case EINTR: | ||
202 | #endif | ||
203 | #ifdef EAGAIN | ||
204 | case EAGAIN: | ||
205 | #endif | ||
206 | /* No error, try again */ | ||
207 | break; | ||
208 | default: | ||
209 | ret = -1; | ||
210 | goto err; /* failure */ | ||
211 | } | ||
212 | } | ||
213 | } | ||
214 | numbytes = 0; | ||
215 | while (numbytes != 1) | ||
216 | { | ||
217 | num = read(fd, egdbuf, 1); | ||
218 | if (num >= 0) | ||
219 | numbytes += num; | ||
220 | else | ||
221 | { | ||
222 | switch (errno) | ||
223 | { | ||
224 | #ifdef EINTR | ||
225 | case EINTR: | ||
226 | #endif | ||
227 | #ifdef EAGAIN | ||
228 | case EAGAIN: | ||
229 | #endif | ||
230 | /* No error, try again */ | ||
231 | break; | ||
232 | default: | ||
233 | ret = -1; | ||
234 | goto err; /* failure */ | ||
235 | } | ||
236 | } | ||
237 | } | ||
238 | if(egdbuf[0] == 0) | ||
239 | goto err; | ||
240 | if (buf) | ||
241 | retrievebuf = buf + ret; | ||
242 | else | ||
243 | retrievebuf = tempbuf; | ||
244 | numbytes = 0; | ||
245 | while (numbytes != egdbuf[0]) | ||
246 | { | ||
247 | num = read(fd, retrievebuf + numbytes, egdbuf[0] - numbytes); | ||
248 | if (num >= 0) | ||
249 | numbytes += num; | ||
250 | else | ||
251 | { | ||
252 | switch (errno) | ||
253 | { | ||
254 | #ifdef EINTR | ||
255 | case EINTR: | ||
256 | #endif | ||
257 | #ifdef EAGAIN | ||
258 | case EAGAIN: | ||
259 | #endif | ||
260 | /* No error, try again */ | ||
261 | break; | ||
262 | default: | ||
263 | ret = -1; | ||
264 | goto err; /* failure */ | ||
265 | } | ||
266 | } | ||
267 | } | ||
268 | ret += egdbuf[0]; | ||
269 | bytes -= egdbuf[0]; | ||
270 | if (!buf) | ||
271 | RAND_seed(tempbuf, egdbuf[0]); | ||
272 | } | ||
273 | err: | ||
274 | if (fd != -1) close(fd); | ||
275 | return(ret); | ||
276 | } | ||
277 | |||
278 | |||
279 | int RAND_egd_bytes(const char *path, int bytes) | ||
280 | { | ||
281 | int num, ret = 0; | ||
282 | |||
283 | num = RAND_query_egd_bytes(path, NULL, bytes); | ||
102 | if (num < 1) goto err; | 284 | if (num < 1) goto err; |
103 | RAND_seed(buf, num); | ||
104 | if (RAND_status() == 1) | 285 | if (RAND_status() == 1) |
105 | ret = num; | 286 | ret = num; |
106 | err: | 287 | err: |
107 | if (fd != -1) close(fd); | ||
108 | return(ret); | 288 | return(ret); |
109 | } | 289 | } |
290 | |||
291 | |||
292 | int RAND_egd(const char *path) | ||
293 | { | ||
294 | return (RAND_egd_bytes(path, 255)); | ||
295 | } | ||
296 | |||
297 | |||
110 | #endif | 298 | #endif |
diff --git a/src/lib/libcrypto/rand/rand_lcl.h b/src/lib/libcrypto/rand/rand_lcl.h index 120e9366d2..618a8ec899 100644 --- a/src/lib/libcrypto/rand/rand_lcl.h +++ b/src/lib/libcrypto/rand/rand_lcl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* crypto/rand/md_rand.c */ | 1 | /* crypto/rand/rand_lcl.h */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -112,72 +112,46 @@ | |||
112 | #ifndef HEADER_RAND_LCL_H | 112 | #ifndef HEADER_RAND_LCL_H |
113 | #define HEADER_RAND_LCL_H | 113 | #define HEADER_RAND_LCL_H |
114 | 114 | ||
115 | #define ENTROPY_NEEDED 20 /* require 160 bits = 20 bytes of randomness */ | 115 | #define ENTROPY_NEEDED 32 /* require 256 bits = 32 bytes of randomness */ |
116 | 116 | ||
117 | 117 | ||
118 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | 118 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) |
119 | #if !defined(NO_SHA) && !defined(NO_SHA1) | 119 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1) |
120 | #define USE_SHA1_RAND | 120 | #define USE_SHA1_RAND |
121 | #elif !defined(NO_MD5) | 121 | #elif !defined(OPENSSL_NO_MD5) |
122 | #define USE_MD5_RAND | 122 | #define USE_MD5_RAND |
123 | #elif !defined(NO_MDC2) && !defined(NO_DES) | 123 | #elif !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) |
124 | #define USE_MDC2_RAND | 124 | #define USE_MDC2_RAND |
125 | #elif !defined(NO_MD2) | 125 | #elif !defined(OPENSSL_NO_MD2) |
126 | #define USE_MD2_RAND | 126 | #define USE_MD2_RAND |
127 | #else | 127 | #else |
128 | #error No message digest algorithm available | 128 | #error No message digest algorithm available |
129 | #endif | 129 | #endif |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #include <openssl/evp.h> | ||
133 | #define MD_Update(a,b,c) EVP_DigestUpdate(a,b,c) | ||
134 | #define MD_Final(a,b) EVP_DigestFinal_ex(a,b,NULL) | ||
132 | #if defined(USE_MD5_RAND) | 135 | #if defined(USE_MD5_RAND) |
133 | #include <openssl/md5.h> | 136 | #include <openssl/md5.h> |
134 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | 137 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH |
135 | #define MD(a,b,c) MD5(a,b,c) | 138 | #define MD_Init(a) EVP_DigestInit_ex(a,EVP_md5(), NULL) |
139 | #define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md5(), NULL) | ||
136 | #elif defined(USE_SHA1_RAND) | 140 | #elif defined(USE_SHA1_RAND) |
137 | #include <openssl/sha.h> | 141 | #include <openssl/sha.h> |
138 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | 142 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH |
139 | #define MD(a,b,c) SHA1(a,b,c) | 143 | #define MD_Init(a) EVP_DigestInit_ex(a,EVP_sha1(), NULL) |
144 | #define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_sha1(), NULL) | ||
140 | #elif defined(USE_MDC2_RAND) | 145 | #elif defined(USE_MDC2_RAND) |
141 | #include <openssl/mdc2.h> | 146 | #include <openssl/mdc2.h> |
142 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | 147 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH |
143 | #define MD(a,b,c) MDC2(a,b,c) | 148 | #define MD_Init(a) EVP_DigestInit_ex(a,EVP_mdc2(), NULL) |
149 | #define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_mdc2(), NULL) | ||
144 | #elif defined(USE_MD2_RAND) | 150 | #elif defined(USE_MD2_RAND) |
145 | #include <openssl/md2.h> | 151 | #include <openssl/md2.h> |
146 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | 152 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH |
147 | #define MD(a,b,c) MD2(a,b,c) | 153 | #define MD_Init(a) EVP_DigestInit_ex(a,EVP_md2(), NULL) |
148 | #endif | 154 | #define MD(a,b,c) EVP_Digest(a,b,c,NULL,EVP_md2(), NULL) |
149 | #if defined(USE_MD5_RAND) | ||
150 | #include <openssl/md5.h> | ||
151 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
152 | #define MD_CTX MD5_CTX | ||
153 | #define MD_Init(a) MD5_Init(a) | ||
154 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
155 | #define MD_Final(a,b) MD5_Final(a,b) | ||
156 | #define MD(a,b,c) MD5(a,b,c) | ||
157 | #elif defined(USE_SHA1_RAND) | ||
158 | #include <openssl/sha.h> | ||
159 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
160 | #define MD_CTX SHA_CTX | ||
161 | #define MD_Init(a) SHA1_Init(a) | ||
162 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
163 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
164 | #define MD(a,b,c) SHA1(a,b,c) | ||
165 | #elif defined(USE_MDC2_RAND) | ||
166 | #include <openssl/mdc2.h> | ||
167 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
168 | #define MD_CTX MDC2_CTX | ||
169 | #define MD_Init(a) MDC2_Init(a) | ||
170 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
171 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
172 | #define MD(a,b,c) MDC2(a,b,c) | ||
173 | #elif defined(USE_MD2_RAND) | ||
174 | #include <openssl/md2.h> | ||
175 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
176 | #define MD_CTX MD2_CTX | ||
177 | #define MD_Init(a) MD2_Init(a) | ||
178 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
179 | #define MD_Final(a,b) MD2_Final(a,b) | ||
180 | #define MD(a,b,c) MD2(a,b,c) | ||
181 | #endif | 155 | #endif |
182 | 156 | ||
183 | 157 | ||
diff --git a/src/lib/libcrypto/rand/rand_unix.c b/src/lib/libcrypto/rand/rand_unix.c index 0b29235130..5a78009e9a 100644 --- a/src/lib/libcrypto/rand/rand_unix.c +++ b/src/lib/libcrypto/rand/rand_unix.c | |||
@@ -122,43 +122,6 @@ | |||
122 | #include <unistd.h> | 122 | #include <unistd.h> |
123 | #include <time.h> | 123 | #include <time.h> |
124 | 124 | ||
125 | #ifdef __OpenBSD__ | ||
126 | #undef DEVRANDOM | ||
127 | #define DEVRANDOM "/dev/arandom" | ||
128 | int RAND_poll(void) | ||
129 | { | ||
130 | unsigned long l; | ||
131 | pid_t curr_pid = getpid(); | ||
132 | FILE *fh; | ||
133 | |||
134 | /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD | ||
135 | * have this. Use /dev/urandom if you can as /dev/random may block | ||
136 | * if it runs out of random entries. */ | ||
137 | |||
138 | if ((fh = fopen(DEVRANDOM, "r")) != NULL) | ||
139 | { | ||
140 | unsigned char tmpbuf[ENTROPY_NEEDED]; | ||
141 | int n; | ||
142 | |||
143 | setvbuf(fh, NULL, _IONBF, 0); | ||
144 | n=fread((unsigned char *)tmpbuf,1,ENTROPY_NEEDED,fh); | ||
145 | fclose(fh); | ||
146 | RAND_add(tmpbuf,sizeof tmpbuf,n); | ||
147 | memset(tmpbuf,0,n); | ||
148 | } | ||
149 | |||
150 | /* put in some default random data, we need more than just this */ | ||
151 | l=curr_pid; | ||
152 | RAND_add(&l,sizeof(l),0); | ||
153 | l=getuid(); | ||
154 | RAND_add(&l,sizeof(l),0); | ||
155 | |||
156 | l=time(NULL); | ||
157 | RAND_add(&l,sizeof(l),0); | ||
158 | |||
159 | return 1; | ||
160 | } | ||
161 | #else | ||
162 | int RAND_poll(void) | 125 | int RAND_poll(void) |
163 | { | 126 | { |
164 | unsigned long l; | 127 | unsigned long l; |
@@ -271,4 +234,3 @@ int RAND_poll(void) | |||
271 | } | 234 | } |
272 | 235 | ||
273 | #endif | 236 | #endif |
274 | #endif | ||
diff --git a/src/lib/libcrypto/rand/rand_win.c b/src/lib/libcrypto/rand/rand_win.c index 9f2dcff9a9..c1b955b06f 100644 --- a/src/lib/libcrypto/rand/rand_win.c +++ b/src/lib/libcrypto/rand/rand_win.c | |||
@@ -113,7 +113,7 @@ | |||
113 | #include <openssl/rand.h> | 113 | #include <openssl/rand.h> |
114 | #include "rand_lcl.h" | 114 | #include "rand_lcl.h" |
115 | 115 | ||
116 | #if defined(WINDOWS) || defined(WIN32) | 116 | #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) |
117 | #include <windows.h> | 117 | #include <windows.h> |
118 | #ifndef _WIN32_WINNT | 118 | #ifndef _WIN32_WINNT |
119 | # define _WIN32_WINNT 0x0400 | 119 | # define _WIN32_WINNT 0x0400 |
@@ -254,6 +254,10 @@ int RAND_poll(void) | |||
254 | * at random times on Windows 2000. Reported by Jeffrey Altman. | 254 | * at random times on Windows 2000. Reported by Jeffrey Altman. |
255 | * Only use it on NT. | 255 | * Only use it on NT. |
256 | */ | 256 | */ |
257 | /* Wolfgang Marczy <WMarczy@topcall.co.at> reports that | ||
258 | * the RegQueryValueEx call below can hang on NT4.0 (SP6). | ||
259 | * So we don't use this at all for now. */ | ||
260 | #if 0 | ||
257 | if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && | 261 | if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT && |
258 | osverinfo.dwMajorVersion < 5) | 262 | osverinfo.dwMajorVersion < 5) |
259 | { | 263 | { |
@@ -290,6 +294,7 @@ int RAND_poll(void) | |||
290 | if (buf) | 294 | if (buf) |
291 | free(buf); | 295 | free(buf); |
292 | } | 296 | } |
297 | #endif | ||
293 | 298 | ||
294 | if (advapi) | 299 | if (advapi) |
295 | { | 300 | { |
@@ -310,8 +315,8 @@ int RAND_poll(void) | |||
310 | { | 315 | { |
311 | if (gen(hProvider, sizeof(buf), buf) != 0) | 316 | if (gen(hProvider, sizeof(buf), buf) != 0) |
312 | { | 317 | { |
313 | RAND_add(buf, sizeof(buf), sizeof(buf)); | 318 | RAND_add(buf, sizeof(buf), 0); |
314 | #ifdef DEBUG | 319 | #if 0 |
315 | printf("randomness from PROV_RSA_FULL\n"); | 320 | printf("randomness from PROV_RSA_FULL\n"); |
316 | #endif | 321 | #endif |
317 | } | 322 | } |
@@ -324,7 +329,7 @@ int RAND_poll(void) | |||
324 | if (gen(hProvider, sizeof(buf), buf) != 0) | 329 | if (gen(hProvider, sizeof(buf), buf) != 0) |
325 | { | 330 | { |
326 | RAND_add(buf, sizeof(buf), sizeof(buf)); | 331 | RAND_add(buf, sizeof(buf), sizeof(buf)); |
327 | #ifdef DEBUG | 332 | #if 0 |
328 | printf("randomness from PROV_INTEL_SEC\n"); | 333 | printf("randomness from PROV_INTEL_SEC\n"); |
329 | #endif | 334 | #endif |
330 | } | 335 | } |
@@ -461,7 +466,7 @@ int RAND_poll(void) | |||
461 | hlist.th32ProcessID, | 466 | hlist.th32ProcessID, |
462 | hlist.th32HeapID)) | 467 | hlist.th32HeapID)) |
463 | { | 468 | { |
464 | int entrycnt = 50; | 469 | int entrycnt = 80; |
465 | do | 470 | do |
466 | RAND_add(&hentry, | 471 | RAND_add(&hentry, |
467 | hentry.dwSize, 5); | 472 | hentry.dwSize, 5); |
@@ -510,7 +515,7 @@ int RAND_poll(void) | |||
510 | FreeLibrary(kernel); | 515 | FreeLibrary(kernel); |
511 | } | 516 | } |
512 | 517 | ||
513 | #ifdef DEBUG | 518 | #if 0 |
514 | printf("Exiting RAND_poll\n"); | 519 | printf("Exiting RAND_poll\n"); |
515 | #endif | 520 | #endif |
516 | 521 | ||
@@ -570,14 +575,15 @@ static void readtimer(void) | |||
570 | DWORD w; | 575 | DWORD w; |
571 | LARGE_INTEGER l; | 576 | LARGE_INTEGER l; |
572 | static int have_perfc = 1; | 577 | static int have_perfc = 1; |
573 | #ifndef __GNUC__ | 578 | #ifdef _MSC_VER |
574 | static int have_tsc = 1; | 579 | static int have_tsc = 1; |
575 | DWORD cyclecount; | 580 | DWORD cyclecount; |
576 | 581 | ||
577 | if (have_tsc) { | 582 | if (have_tsc) { |
578 | __try { | 583 | __try { |
579 | __asm { | 584 | __asm { |
580 | rdtsc | 585 | _emit 0x0f |
586 | _emit 0x31 | ||
581 | mov cyclecount, eax | 587 | mov cyclecount, eax |
582 | } | 588 | } |
583 | RAND_add(&cyclecount, sizeof(cyclecount), 1); | 589 | RAND_add(&cyclecount, sizeof(cyclecount), 1); |
@@ -684,49 +690,4 @@ static void readscreen(void) | |||
684 | DeleteDC(hScrDC); | 690 | DeleteDC(hScrDC); |
685 | } | 691 | } |
686 | 692 | ||
687 | #else /* Unix version */ | ||
688 | |||
689 | #include <time.h> | ||
690 | |||
691 | int RAND_poll(void) | ||
692 | { | ||
693 | unsigned long l; | ||
694 | pid_t curr_pid = getpid(); | ||
695 | #ifdef DEVRANDOM | ||
696 | FILE *fh; | ||
697 | #endif | ||
698 | |||
699 | #ifdef DEVRANDOM | ||
700 | /* Use a random entropy pool device. Linux, FreeBSD and OpenBSD | ||
701 | * have this. Use /dev/urandom if you can as /dev/random may block | ||
702 | * if it runs out of random entries. */ | ||
703 | |||
704 | if ((fh = fopen(DEVRANDOM, "r")) != NULL) | ||
705 | { | ||
706 | unsigned char tmpbuf[ENTROPY_NEEDED]; | ||
707 | int n; | ||
708 | |||
709 | setvbuf(fh, NULL, _IONBF, 0); | ||
710 | n=fread((unsigned char *)tmpbuf,1,ENTROPY_NEEDED,fh); | ||
711 | fclose(fh); | ||
712 | RAND_add(tmpbuf,sizeof tmpbuf,n); | ||
713 | memset(tmpbuf,0,n); | ||
714 | } | ||
715 | #endif | ||
716 | |||
717 | /* put in some default random data, we need more than just this */ | ||
718 | l=curr_pid; | ||
719 | RAND_add(&l,sizeof(l),0); | ||
720 | l=getuid(); | ||
721 | RAND_add(&l,sizeof(l),0); | ||
722 | |||
723 | l=time(NULL); | ||
724 | RAND_add(&l,sizeof(l),0); | ||
725 | |||
726 | #ifdef DEVRANDOM | ||
727 | return 1; | ||
728 | #endif | ||
729 | return 0; | ||
730 | } | ||
731 | |||
732 | #endif | 693 | #endif |
diff --git a/src/lib/libcrypto/rand/randtest.c b/src/lib/libcrypto/rand/randtest.c index e0ba61e123..b64de616db 100644 --- a/src/lib/libcrypto/rand/randtest.c +++ b/src/lib/libcrypto/rand/randtest.c | |||
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "rand.h" | 61 | #include <openssl/rand.h> |
62 | 62 | ||
63 | /* some FIPS 140-1 random number test */ | 63 | /* some FIPS 140-1 random number test */ |
64 | /* some simple tests */ | 64 | /* some simple tests */ |
@@ -73,7 +73,13 @@ int main() | |||
73 | /*double d; */ | 73 | /*double d; */ |
74 | long d; | 74 | long d; |
75 | 75 | ||
76 | RAND_bytes(buf,2500); | 76 | i = RAND_pseudo_bytes(buf,2500); |
77 | if (i < 0) | ||
78 | { | ||
79 | printf ("init failed, the rand method is not properly installed\n"); | ||
80 | err++; | ||
81 | goto err; | ||
82 | } | ||
77 | 83 | ||
78 | n1=0; | 84 | n1=0; |
79 | for (i=0; i<16; i++) n2[i]=0; | 85 | for (i=0; i<16; i++) n2[i]=0; |
@@ -117,7 +123,7 @@ int main() | |||
117 | /* test 1 */ | 123 | /* test 1 */ |
118 | if (!((9654 < n1) && (n1 < 10346))) | 124 | if (!((9654 < n1) && (n1 < 10346))) |
119 | { | 125 | { |
120 | printf("test 1 failed, X=%ld\n",n1); | 126 | printf("test 1 failed, X=%lu\n",n1); |
121 | err++; | 127 | err++; |
122 | } | 128 | } |
123 | printf("test 1 done\n"); | 129 | printf("test 1 done\n"); |
@@ -150,37 +156,37 @@ int main() | |||
150 | { | 156 | { |
151 | if (!((2267 < runs[i][0]) && (runs[i][0] < 2733))) | 157 | if (!((2267 < runs[i][0]) && (runs[i][0] < 2733))) |
152 | { | 158 | { |
153 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 159 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
154 | i,1,runs[i][0]); | 160 | i,1,runs[i][0]); |
155 | err++; | 161 | err++; |
156 | } | 162 | } |
157 | if (!((1079 < runs[i][1]) && (runs[i][1] < 1421))) | 163 | if (!((1079 < runs[i][1]) && (runs[i][1] < 1421))) |
158 | { | 164 | { |
159 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 165 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
160 | i,2,runs[i][1]); | 166 | i,2,runs[i][1]); |
161 | err++; | 167 | err++; |
162 | } | 168 | } |
163 | if (!(( 502 < runs[i][2]) && (runs[i][2] < 748))) | 169 | if (!(( 502 < runs[i][2]) && (runs[i][2] < 748))) |
164 | { | 170 | { |
165 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 171 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
166 | i,3,runs[i][2]); | 172 | i,3,runs[i][2]); |
167 | err++; | 173 | err++; |
168 | } | 174 | } |
169 | if (!(( 223 < runs[i][3]) && (runs[i][3] < 402))) | 175 | if (!(( 223 < runs[i][3]) && (runs[i][3] < 402))) |
170 | { | 176 | { |
171 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 177 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
172 | i,4,runs[i][3]); | 178 | i,4,runs[i][3]); |
173 | err++; | 179 | err++; |
174 | } | 180 | } |
175 | if (!(( 90 < runs[i][4]) && (runs[i][4] < 223))) | 181 | if (!(( 90 < runs[i][4]) && (runs[i][4] < 223))) |
176 | { | 182 | { |
177 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 183 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
178 | i,5,runs[i][4]); | 184 | i,5,runs[i][4]); |
179 | err++; | 185 | err++; |
180 | } | 186 | } |
181 | if (!(( 90 < runs[i][5]) && (runs[i][5] < 223))) | 187 | if (!(( 90 < runs[i][5]) && (runs[i][5] < 223))) |
182 | { | 188 | { |
183 | printf("test 3 failed, bit=%d run=%d num=%ld\n", | 189 | printf("test 3 failed, bit=%d run=%d num=%lu\n", |
184 | i,6,runs[i][5]); | 190 | i,6,runs[i][5]); |
185 | err++; | 191 | err++; |
186 | } | 192 | } |
@@ -190,17 +196,18 @@ int main() | |||
190 | /* test 4 */ | 196 | /* test 4 */ |
191 | if (runs[0][33] != 0) | 197 | if (runs[0][33] != 0) |
192 | { | 198 | { |
193 | printf("test 4 failed, bit=%d run=%d num=%ld\n", | 199 | printf("test 4 failed, bit=%d run=%d num=%lu\n", |
194 | 0,34,runs[0][33]); | 200 | 0,34,runs[0][33]); |
195 | err++; | 201 | err++; |
196 | } | 202 | } |
197 | if (runs[1][33] != 0) | 203 | if (runs[1][33] != 0) |
198 | { | 204 | { |
199 | printf("test 4 failed, bit=%d run=%d num=%ld\n", | 205 | printf("test 4 failed, bit=%d run=%d num=%lu\n", |
200 | 1,34,runs[1][33]); | 206 | 1,34,runs[1][33]); |
201 | err++; | 207 | err++; |
202 | } | 208 | } |
203 | printf("test 4 done\n"); | 209 | printf("test 4 done\n"); |
210 | err: | ||
204 | err=((err)?1:0); | 211 | err=((err)?1:0); |
205 | exit(err); | 212 | exit(err); |
206 | return(err); | 213 | return(err); |
diff --git a/src/lib/libcrypto/rc2/rc2speed.c b/src/lib/libcrypto/rc2/rc2speed.c index 6cd8ea8f27..47d34b444e 100644 --- a/src/lib/libcrypto/rc2/rc2speed.c +++ b/src/lib/libcrypto/rc2/rc2speed.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,48 +77,40 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "rc2.h" | 99 | #include <openssl/rc2.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | #ifndef CLK_TCK | 103 | #ifndef CLK_TCK |
105 | #ifndef VMS | ||
106 | #define HZ 100.0 | ||
107 | #else /* VMS */ | ||
108 | #define HZ 100.0 | 104 | #define HZ 100.0 |
109 | #endif | 105 | #endif |
110 | #else /* CLK_TCK */ | 106 | #else /* CLK_TCK */ |
111 | #define HZ ((double)CLK_TCK) | 107 | #define HZ ((double)CLK_TCK) |
112 | #endif | 108 | #endif |
113 | #endif | ||
114 | 109 | ||
115 | #define BUFSIZE ((long)1024) | 110 | #define BUFSIZE ((long)1024) |
116 | long run=0; | 111 | long run=0; |
117 | 112 | ||
118 | #ifndef NOPROTO | ||
119 | double Time_F(int s); | 113 | double Time_F(int s); |
120 | #else | ||
121 | double Time_F(); | ||
122 | #endif | ||
123 | |||
124 | #ifdef SIGALRM | 114 | #ifdef SIGALRM |
125 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 115 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
126 | #define SIGRETTYPE void | 116 | #define SIGRETTYPE void |
@@ -128,14 +118,8 @@ double Time_F(); | |||
128 | #define SIGRETTYPE int | 118 | #define SIGRETTYPE int |
129 | #endif | 119 | #endif |
130 | 120 | ||
131 | #ifndef NOPROTO | ||
132 | SIGRETTYPE sig_done(int sig); | 121 | SIGRETTYPE sig_done(int sig); |
133 | #else | 122 | SIGRETTYPE sig_done(int sig) |
134 | SIGRETTYPE sig_done(); | ||
135 | #endif | ||
136 | |||
137 | SIGRETTYPE sig_done(sig) | ||
138 | int sig; | ||
139 | { | 123 | { |
140 | signal(SIGALRM,sig_done); | 124 | signal(SIGALRM,sig_done); |
141 | run=0; | 125 | run=0; |
@@ -148,8 +132,7 @@ int sig; | |||
148 | #define START 0 | 132 | #define START 0 |
149 | #define STOP 1 | 133 | #define STOP 1 |
150 | 134 | ||
151 | double Time_F(s) | 135 | double Time_F(int s) |
152 | int s; | ||
153 | { | 136 | { |
154 | double ret; | 137 | double ret; |
155 | #ifdef TIMES | 138 | #ifdef TIMES |
@@ -185,9 +168,7 @@ int s; | |||
185 | #endif | 168 | #endif |
186 | } | 169 | } |
187 | 170 | ||
188 | int main(argc,argv) | 171 | int main(int argc, char **argv) |
189 | int argc; | ||
190 | char **argv; | ||
191 | { | 172 | { |
192 | long count; | 173 | long count; |
193 | static unsigned char buf[BUFSIZE]; | 174 | static unsigned char buf[BUFSIZE]; |
@@ -202,7 +183,7 @@ char **argv; | |||
202 | #endif | 183 | #endif |
203 | 184 | ||
204 | #ifndef TIMES | 185 | #ifndef TIMES |
205 | printf("To get the most acurate results, try to run this\n"); | 186 | printf("To get the most accurate results, try to run this\n"); |
206 | printf("program when this computer is idle.\n"); | 187 | printf("program when this computer is idle.\n"); |
207 | #endif | 188 | #endif |
208 | 189 | ||
@@ -287,7 +268,7 @@ char **argv; | |||
287 | printf("RC2 raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); | 268 | printf("RC2 raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); |
288 | printf("RC2 cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); | 269 | printf("RC2 cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); |
289 | exit(0); | 270 | exit(0); |
290 | #if defined(LINT) || defined(MSDOS) | 271 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
291 | return(0); | 272 | return(0); |
292 | #endif | 273 | #endif |
293 | } | 274 | } |
diff --git a/src/lib/libcrypto/rc2/rc2test.c b/src/lib/libcrypto/rc2/rc2test.c index 9d0f8016ec..d9a2a0a1cb 100644 --- a/src/lib/libcrypto/rc2/rc2test.c +++ b/src/lib/libcrypto/rc2/rc2test.c | |||
@@ -62,9 +62,17 @@ | |||
62 | #include <stdio.h> | 62 | #include <stdio.h> |
63 | #include <string.h> | 63 | #include <string.h> |
64 | #include <stdlib.h> | 64 | #include <stdlib.h> |
65 | #include "rc2.h" | ||
66 | 65 | ||
67 | unsigned char RC2key[4][16]={ | 66 | #ifdef OPENSSL_NO_RC2 |
67 | int main(int argc, char *argv[]) | ||
68 | { | ||
69 | printf("No RC2 support\n"); | ||
70 | return(0); | ||
71 | } | ||
72 | #else | ||
73 | #include <openssl/rc2.h> | ||
74 | |||
75 | static unsigned char RC2key[4][16]={ | ||
68 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | 76 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
69 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 77 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
70 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | 78 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
@@ -75,14 +83,14 @@ unsigned char RC2key[4][16]={ | |||
75 | 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F}, | 83 | 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F}, |
76 | }; | 84 | }; |
77 | 85 | ||
78 | unsigned char RC2plain[4][8]={ | 86 | static unsigned char RC2plain[4][8]={ |
79 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 87 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
80 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 88 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
81 | {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, | 89 | {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, |
82 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 90 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
83 | }; | 91 | }; |
84 | 92 | ||
85 | unsigned char RC2cipher[4][8]={ | 93 | static unsigned char RC2cipher[4][8]={ |
86 | {0x1C,0x19,0x8A,0x83,0x8D,0xF0,0x28,0xB7}, | 94 | {0x1C,0x19,0x8A,0x83,0x8D,0xF0,0x28,0xB7}, |
87 | {0x21,0x82,0x9C,0x78,0xA9,0xF9,0xC0,0x74}, | 95 | {0x21,0x82,0x9C,0x78,0xA9,0xF9,0xC0,0x74}, |
88 | {0x13,0xDB,0x35,0x17,0xD3,0x21,0x86,0x9E}, | 96 | {0x13,0xDB,0x35,0x17,0xD3,0x21,0x86,0x9E}, |
@@ -125,19 +133,11 @@ static unsigned char cfb_cipher64[CFB_TEST_SIZE]={ | |||
125 | }; | 133 | }; |
126 | 134 | ||
127 | 135 | ||
128 | #ifndef NOPROTO | ||
129 | /*static int cfb64_test(unsigned char *cfb_cipher);*/ | 136 | /*static int cfb64_test(unsigned char *cfb_cipher);*/ |
130 | static char *pt(unsigned char *p); | 137 | static char *pt(unsigned char *p); |
131 | #else | ||
132 | /*static int cfb64_test(); */ | ||
133 | static char *pt(); | ||
134 | #endif | 138 | #endif |
135 | 139 | ||
136 | #endif | 140 | int main(int argc, char *argv[]) |
137 | |||
138 | int main(argc,argv) | ||
139 | int argc; | ||
140 | char *argv[]; | ||
141 | { | 141 | { |
142 | int i,n,err=0; | 142 | int i,n,err=0; |
143 | RC2_KEY key; | 143 | RC2_KEY key; |
@@ -208,8 +208,7 @@ char *argv[]; | |||
208 | } | 208 | } |
209 | 209 | ||
210 | #ifdef undef | 210 | #ifdef undef |
211 | static int cfb64_test(cfb_cipher) | 211 | static int cfb64_test(unsigned char *cfb_cipher) |
212 | unsigned char *cfb_cipher; | ||
213 | { | 212 | { |
214 | IDEA_KEY_SCHEDULE eks,dks; | 213 | IDEA_KEY_SCHEDULE eks,dks; |
215 | int err=0,i,n; | 214 | int err=0,i,n; |
@@ -247,8 +246,7 @@ unsigned char *cfb_cipher; | |||
247 | return(err); | 246 | return(err); |
248 | } | 247 | } |
249 | 248 | ||
250 | static char *pt(p) | 249 | static char *pt(unsigned char *p) |
251 | unsigned char *p; | ||
252 | { | 250 | { |
253 | static char bufs[10][20]; | 251 | static char bufs[10][20]; |
254 | static int bnum=0; | 252 | static int bnum=0; |
@@ -268,3 +266,4 @@ unsigned char *p; | |||
268 | } | 266 | } |
269 | 267 | ||
270 | #endif | 268 | #endif |
269 | #endif | ||
diff --git a/src/lib/libcrypto/rc4/rc4.c b/src/lib/libcrypto/rc4/rc4.c index 127e8a5093..c2165b0b75 100644 --- a/src/lib/libcrypto/rc4/rc4.c +++ b/src/lib/libcrypto/rc4/rc4.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "rc4.h" | 62 | #include <openssl/rc4.h> |
63 | 63 | ||
64 | char *usage[]={ | 64 | char *usage[]={ |
65 | "usage: rc4 args\n", | 65 | "usage: rc4 args\n", |
@@ -70,9 +70,7 @@ char *usage[]={ | |||
70 | NULL | 70 | NULL |
71 | }; | 71 | }; |
72 | 72 | ||
73 | int main(argc, argv) | 73 | int main(int argc, char *argv[]) |
74 | int argc; | ||
75 | char *argv[]; | ||
76 | { | 74 | { |
77 | FILE *in=NULL,*out=NULL; | 75 | FILE *in=NULL,*out=NULL; |
78 | char *infile=NULL,*outfile=NULL,*keystr=NULL; | 76 | char *infile=NULL,*outfile=NULL,*keystr=NULL; |
@@ -115,7 +113,7 @@ char *argv[]; | |||
115 | { | 113 | { |
116 | bad: | 114 | bad: |
117 | for (pp=usage; (*pp != NULL); pp++) | 115 | for (pp=usage; (*pp != NULL); pp++) |
118 | fprintf(stderr,*pp); | 116 | fprintf(stderr,"%s",*pp); |
119 | exit(1); | 117 | exit(1); |
120 | } | 118 | } |
121 | 119 | ||
@@ -143,7 +141,7 @@ bad: | |||
143 | } | 141 | } |
144 | } | 142 | } |
145 | 143 | ||
146 | #ifdef MSDOS | 144 | #ifdef OPENSSL_SYS_MSDOS |
147 | /* This should set the file to binary mode. */ | 145 | /* This should set the file to binary mode. */ |
148 | { | 146 | { |
149 | #include <fcntl.h> | 147 | #include <fcntl.h> |
@@ -164,7 +162,7 @@ bad: | |||
164 | keystr=buf; | 162 | keystr=buf; |
165 | } | 163 | } |
166 | 164 | ||
167 | MD5((unsigned char *)keystr,(unsigned long)strlen(keystr),md); | 165 | EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5()); |
168 | memset(keystr,0,strlen(keystr)); | 166 | memset(keystr,0,strlen(keystr)); |
169 | RC4_set_key(&key,MD5_DIGEST_LENGTH,md); | 167 | RC4_set_key(&key,MD5_DIGEST_LENGTH,md); |
170 | 168 | ||
diff --git a/src/lib/libcrypto/rc4/rc4s.cpp b/src/lib/libcrypto/rc4/rc4s.cpp index 39f1727dd3..3814fde997 100644 --- a/src/lib/libcrypto/rc4/rc4s.cpp +++ b/src/lib/libcrypto/rc4/rc4s.cpp | |||
@@ -32,7 +32,7 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "rc4.h" | 35 | #include <openssl/rc4.h> |
36 | 36 | ||
37 | void main(int argc,char *argv[]) | 37 | void main(int argc,char *argv[]) |
38 | { | 38 | { |
diff --git a/src/lib/libcrypto/rc4/rc4speed.c b/src/lib/libcrypto/rc4/rc4speed.c index 5298dad6d0..ced98c52df 100644 --- a/src/lib/libcrypto/rc4/rc4speed.c +++ b/src/lib/libcrypto/rc4/rc4speed.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,34 +77,31 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "rc4.h" | 99 | #include <openssl/rc4.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | #ifndef CLK_TCK | 103 | #ifndef CLK_TCK |
105 | #ifndef VMS | ||
106 | #define HZ 100.0 | ||
107 | #else /* VMS */ | ||
108 | #define HZ 100.0 | 104 | #define HZ 100.0 |
109 | #endif | ||
110 | #else /* CLK_TCK */ | 105 | #else /* CLK_TCK */ |
111 | #define HZ ((double)CLK_TCK) | 106 | #define HZ ((double)CLK_TCK) |
112 | #endif | 107 | #endif |
@@ -115,12 +110,7 @@ struct tms { | |||
115 | #define BUFSIZE ((long)1024) | 110 | #define BUFSIZE ((long)1024) |
116 | long run=0; | 111 | long run=0; |
117 | 112 | ||
118 | #ifndef NOPROTO | ||
119 | double Time_F(int s); | 113 | double Time_F(int s); |
120 | #else | ||
121 | double Time_F(); | ||
122 | #endif | ||
123 | |||
124 | #ifdef SIGALRM | 114 | #ifdef SIGALRM |
125 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 115 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
126 | #define SIGRETTYPE void | 116 | #define SIGRETTYPE void |
@@ -128,14 +118,8 @@ double Time_F(); | |||
128 | #define SIGRETTYPE int | 118 | #define SIGRETTYPE int |
129 | #endif | 119 | #endif |
130 | 120 | ||
131 | #ifndef NOPROTO | ||
132 | SIGRETTYPE sig_done(int sig); | 121 | SIGRETTYPE sig_done(int sig); |
133 | #else | 122 | SIGRETTYPE sig_done(int sig) |
134 | SIGRETTYPE sig_done(); | ||
135 | #endif | ||
136 | |||
137 | SIGRETTYPE sig_done(sig) | ||
138 | int sig; | ||
139 | { | 123 | { |
140 | signal(SIGALRM,sig_done); | 124 | signal(SIGALRM,sig_done); |
141 | run=0; | 125 | run=0; |
@@ -148,8 +132,7 @@ int sig; | |||
148 | #define START 0 | 132 | #define START 0 |
149 | #define STOP 1 | 133 | #define STOP 1 |
150 | 134 | ||
151 | double Time_F(s) | 135 | double Time_F(int s) |
152 | int s; | ||
153 | { | 136 | { |
154 | double ret; | 137 | double ret; |
155 | #ifdef TIMES | 138 | #ifdef TIMES |
@@ -185,9 +168,7 @@ int s; | |||
185 | #endif | 168 | #endif |
186 | } | 169 | } |
187 | 170 | ||
188 | int main(argc,argv) | 171 | int main(int argc, char **argv) |
189 | int argc; | ||
190 | char **argv; | ||
191 | { | 172 | { |
192 | long count; | 173 | long count; |
193 | static unsigned char buf[BUFSIZE]; | 174 | static unsigned char buf[BUFSIZE]; |
@@ -202,7 +183,7 @@ char **argv; | |||
202 | #endif | 183 | #endif |
203 | 184 | ||
204 | #ifndef TIMES | 185 | #ifndef TIMES |
205 | printf("To get the most acurate results, try to run this\n"); | 186 | printf("To get the most accurate results, try to run this\n"); |
206 | printf("program when this computer is idle.\n"); | 187 | printf("program when this computer is idle.\n"); |
207 | #endif | 188 | #endif |
208 | 189 | ||
@@ -262,7 +243,7 @@ char **argv; | |||
262 | printf("RC4 set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a); | 243 | printf("RC4 set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a); |
263 | printf("RC4 bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); | 244 | printf("RC4 bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); |
264 | exit(0); | 245 | exit(0); |
265 | #if defined(LINT) || defined(MSDOS) | 246 | #if defined(LINT) || defined(OPENSSL_SYS_MSDOS) |
266 | return(0); | 247 | return(0); |
267 | #endif | 248 | #endif |
268 | } | 249 | } |
diff --git a/src/lib/libcrypto/rc4/rc4test.c b/src/lib/libcrypto/rc4/rc4test.c index 041e1aff95..a28d457c8d 100644 --- a/src/lib/libcrypto/rc4/rc4test.c +++ b/src/lib/libcrypto/rc4/rc4test.c | |||
@@ -59,9 +59,17 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "rc4.h" | ||
63 | 62 | ||
64 | unsigned char keys[7][30]={ | 63 | #ifdef OPENSSL_NO_RC4 |
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No RC4 support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/rc4.h> | ||
71 | |||
72 | static unsigned char keys[7][30]={ | ||
65 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, | 73 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, |
66 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, | 74 | {8,0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef}, |
67 | {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, | 75 | {8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
@@ -70,8 +78,8 @@ unsigned char keys[7][30]={ | |||
70 | {4,0xef,0x01,0x23,0x45}, | 78 | {4,0xef,0x01,0x23,0x45}, |
71 | }; | 79 | }; |
72 | 80 | ||
73 | unsigned char data_len[7]={8,8,8,20,28,10}; | 81 | static unsigned char data_len[7]={8,8,8,20,28,10}; |
74 | unsigned char data[7][30]={ | 82 | static unsigned char data[7][30]={ |
75 | {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff}, | 83 | {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef,0xff}, |
76 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, | 84 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, |
77 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, | 85 | {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff}, |
@@ -86,7 +94,7 @@ unsigned char data[7][30]={ | |||
86 | {0}, | 94 | {0}, |
87 | }; | 95 | }; |
88 | 96 | ||
89 | unsigned char output[7][30]={ | 97 | static unsigned char output[7][30]={ |
90 | {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00}, | 98 | {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96,0x00}, |
91 | {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00}, | 99 | {0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79,0x00}, |
92 | {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00}, | 100 | {0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a,0x00}, |
@@ -101,9 +109,7 @@ unsigned char output[7][30]={ | |||
101 | {0}, | 109 | {0}, |
102 | }; | 110 | }; |
103 | 111 | ||
104 | int main(argc,argv) | 112 | int main(int argc, char *argv[]) |
105 | int argc; | ||
106 | char *argv[]; | ||
107 | { | 113 | { |
108 | int i,err=0; | 114 | int i,err=0; |
109 | int j; | 115 | int j; |
@@ -192,4 +198,4 @@ char *argv[]; | |||
192 | exit(err); | 198 | exit(err); |
193 | return(0); | 199 | return(0); |
194 | } | 200 | } |
195 | 201 | #endif | |
diff --git a/src/lib/libcrypto/rc5/rc5.h b/src/lib/libcrypto/rc5/rc5.h index 5fd64e3f10..4adfd2db5a 100644 --- a/src/lib/libcrypto/rc5/rc5.h +++ b/src/lib/libcrypto/rc5/rc5.h | |||
@@ -63,6 +63,10 @@ | |||
63 | extern "C" { | 63 | extern "C" { |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifdef OPENSSL_NO_RC5 | ||
67 | #error RC5 is disabled. | ||
68 | #endif | ||
69 | |||
66 | #define RC5_ENCRYPT 1 | 70 | #define RC5_ENCRYPT 1 |
67 | #define RC5_DECRYPT 0 | 71 | #define RC5_DECRYPT 0 |
68 | 72 | ||
@@ -88,32 +92,22 @@ typedef struct rc5_key_st | |||
88 | RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; | 92 | RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; |
89 | } RC5_32_KEY; | 93 | } RC5_32_KEY; |
90 | 94 | ||
91 | #ifndef NOPROTO | ||
92 | 95 | ||
93 | void RC5_32_set_key(RC5_32_KEY *key, int len, unsigned char *data, | 96 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, |
94 | int rounds); | 97 | int rounds); |
95 | void RC5_32_ecb_encrypt(unsigned char *in,unsigned char *out,RC5_32_KEY *key, | 98 | void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, |
96 | int enc); | 99 | int enc); |
97 | void RC5_32_encrypt(unsigned long *data,RC5_32_KEY *key); | 100 | void RC5_32_encrypt(unsigned long *data,RC5_32_KEY *key); |
98 | void RC5_32_decrypt(unsigned long *data,RC5_32_KEY *key); | 101 | void RC5_32_decrypt(unsigned long *data,RC5_32_KEY *key); |
99 | void RC5_32_cbc_encrypt(unsigned char *in, unsigned char *out, long length, | 102 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, |
100 | RC5_32_KEY *ks, unsigned char *iv, int enc); | 103 | long length, RC5_32_KEY *ks, unsigned char *iv, |
101 | void RC5_32_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | 104 | int enc); |
102 | RC5_32_KEY *schedule, unsigned char *ivec, int *num, int enc); | 105 | void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
103 | void RC5_32_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | 106 | long length, RC5_32_KEY *schedule, |
104 | RC5_32_KEY *schedule, unsigned char *ivec, int *num); | 107 | unsigned char *ivec, int *num, int enc); |
105 | 108 | void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, | |
106 | #else | 109 | long length, RC5_32_KEY *schedule, |
107 | 110 | unsigned char *ivec, int *num); | |
108 | void RC5_32_set_key(); | ||
109 | void RC5_32_ecb_encrypt(); | ||
110 | void RC5_32_encrypt(); | ||
111 | void RC5_32_decrypt(); | ||
112 | void RC5_32_cbc_encrypt(); | ||
113 | void RC5_32_cfb64_encrypt(); | ||
114 | void RC5_32_ofb64_encrypt(); | ||
115 | |||
116 | #endif | ||
117 | 111 | ||
118 | #ifdef __cplusplus | 112 | #ifdef __cplusplus |
119 | } | 113 | } |
diff --git a/src/lib/libcrypto/ripemd/asm/rips.cpp b/src/lib/libcrypto/ripemd/asm/rips.cpp index 78a933c448..f7a13677a9 100644 --- a/src/lib/libcrypto/ripemd/asm/rips.cpp +++ b/src/lib/libcrypto/ripemd/asm/rips.cpp | |||
@@ -32,7 +32,9 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "ripemd.h" | 35 | #include <openssl/ripemd.h> |
36 | |||
37 | #define ripemd160_block_x86 ripemd160_block_asm_host_order | ||
36 | 38 | ||
37 | extern "C" { | 39 | extern "C" { |
38 | void ripemd160_block_x86(RIPEMD160_CTX *ctx, unsigned char *buffer,int num); | 40 | void ripemd160_block_x86(RIPEMD160_CTX *ctx, unsigned char *buffer,int num); |
@@ -55,8 +57,10 @@ void main(int argc,char *argv[]) | |||
55 | if (num == 0) num=16; | 57 | if (num == 0) num=16; |
56 | if (num > 250) num=16; | 58 | if (num > 250) num=16; |
57 | numm=num+2; | 59 | numm=num+2; |
60 | #if 0 | ||
58 | num*=64; | 61 | num*=64; |
59 | numm*=64; | 62 | numm*=64; |
63 | #endif | ||
60 | 64 | ||
61 | for (j=0; j<6; j++) | 65 | for (j=0; j<6; j++) |
62 | { | 66 | { |
@@ -71,7 +75,7 @@ void main(int argc,char *argv[]) | |||
71 | GetTSC(e2); | 75 | GetTSC(e2); |
72 | ripemd160_block_x86(&ctx,buffer,num); | 76 | ripemd160_block_x86(&ctx,buffer,num); |
73 | } | 77 | } |
74 | printf("ripemd160 (%d bytes) %d %d (%.2f)\n",num, | 78 | printf("ripemd160 (%d bytes) %d %d (%.2f)\n",num*64, |
75 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); | 79 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); |
76 | } | 80 | } |
77 | } | 81 | } |
diff --git a/src/lib/libcrypto/ripemd/rmd160.c b/src/lib/libcrypto/ripemd/rmd160.c index 3fa1b8096e..4f8b88a18a 100644 --- a/src/lib/libcrypto/ripemd/rmd160.c +++ b/src/lib/libcrypto/ripemd/rmd160.c | |||
@@ -58,23 +58,17 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "ripemd.h" | 61 | #include <openssl/ripemd.h> |
62 | 62 | ||
63 | #define BUFSIZE 1024*16 | 63 | #define BUFSIZE 1024*16 |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | void do_fp(FILE *f); | 65 | void do_fp(FILE *f); |
67 | void pt(unsigned char *md); | 66 | void pt(unsigned char *md); |
67 | #ifndef _OSD_POSIX | ||
68 | int read(int, void *, unsigned int); | 68 | int read(int, void *, unsigned int); |
69 | #else | ||
70 | void do_fp(); | ||
71 | void pt(); | ||
72 | int read(); | ||
73 | #endif | 69 | #endif |
74 | 70 | ||
75 | int main(argc, argv) | 71 | int main(int argc, char **argv) |
76 | int argc; | ||
77 | char **argv; | ||
78 | { | 72 | { |
79 | int i,err=0; | 73 | int i,err=0; |
80 | FILE *IN; | 74 | FILE *IN; |
@@ -102,8 +96,7 @@ char **argv; | |||
102 | exit(err); | 96 | exit(err); |
103 | } | 97 | } |
104 | 98 | ||
105 | void do_fp(f) | 99 | void do_fp(FILE *f) |
106 | FILE *f; | ||
107 | { | 100 | { |
108 | RIPEMD160_CTX c; | 101 | RIPEMD160_CTX c; |
109 | unsigned char md[RIPEMD160_DIGEST_LENGTH]; | 102 | unsigned char md[RIPEMD160_DIGEST_LENGTH]; |
@@ -123,8 +116,7 @@ FILE *f; | |||
123 | pt(md); | 116 | pt(md); |
124 | } | 117 | } |
125 | 118 | ||
126 | void pt(md) | 119 | void pt(unsigned char *md) |
127 | unsigned char *md; | ||
128 | { | 120 | { |
129 | int i; | 121 | int i; |
130 | 122 | ||
diff --git a/src/lib/libcrypto/ripemd/rmdtest.c b/src/lib/libcrypto/ripemd/rmdtest.c index 6a0297f975..19e9741db2 100644 --- a/src/lib/libcrypto/ripemd/rmdtest.c +++ b/src/lib/libcrypto/ripemd/rmdtest.c | |||
@@ -59,9 +59,22 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "ripemd.h" | 62 | #include <openssl/ripemd.h> |
63 | 63 | ||
64 | char *test[]={ | 64 | #ifdef OPENSSL_NO_RIPEMD |
65 | int main(int argc, char *argv[]) | ||
66 | { | ||
67 | printf("No ripemd support\n"); | ||
68 | return(0); | ||
69 | } | ||
70 | #else | ||
71 | #include <openssl/evp.h> | ||
72 | |||
73 | #ifdef CHARSET_EBCDIC | ||
74 | #include <openssl/ebcdic.h> | ||
75 | #endif | ||
76 | |||
77 | static char *test[]={ | ||
65 | "", | 78 | "", |
66 | "a", | 79 | "a", |
67 | "abc", | 80 | "abc", |
@@ -73,7 +86,7 @@ char *test[]={ | |||
73 | NULL, | 86 | NULL, |
74 | }; | 87 | }; |
75 | 88 | ||
76 | char *ret[]={ | 89 | static char *ret[]={ |
77 | "9c1185a5c5e9fc54612808977ee8f548b2258d31", | 90 | "9c1185a5c5e9fc54612808977ee8f548b2258d31", |
78 | "0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", | 91 | "0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", |
79 | "8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", | 92 | "8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", |
@@ -84,26 +97,24 @@ char *ret[]={ | |||
84 | "9b752e45573d4b39f4dbd3323cab82bf63326bfb", | 97 | "9b752e45573d4b39f4dbd3323cab82bf63326bfb", |
85 | }; | 98 | }; |
86 | 99 | ||
87 | #ifndef NOPROTO | ||
88 | static char *pt(unsigned char *md); | 100 | static char *pt(unsigned char *md); |
89 | #else | 101 | int main(int argc, char *argv[]) |
90 | static char *pt(); | ||
91 | #endif | ||
92 | |||
93 | int main(argc,argv) | ||
94 | int argc; | ||
95 | char *argv[]; | ||
96 | { | 102 | { |
97 | int i,err=0; | 103 | int i,err=0; |
98 | unsigned char **P,**R; | 104 | unsigned char **P,**R; |
99 | char *p; | 105 | char *p; |
106 | unsigned char md[RIPEMD160_DIGEST_LENGTH]; | ||
100 | 107 | ||
101 | P=(unsigned char **)test; | 108 | P=(unsigned char **)test; |
102 | R=(unsigned char **)ret; | 109 | R=(unsigned char **)ret; |
103 | i=1; | 110 | i=1; |
104 | while (*P != NULL) | 111 | while (*P != NULL) |
105 | { | 112 | { |
106 | p=pt(RIPEMD160(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | 113 | #ifdef CHARSET_EBCDIC |
114 | ebcdic2ascii((char *)*P, (char *)*P, strlen((char *)*P)); | ||
115 | #endif | ||
116 | EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_ripemd160(), NULL); | ||
117 | p=pt(md); | ||
107 | if (strcmp(p,(char *)*R) != 0) | 118 | if (strcmp(p,(char *)*R) != 0) |
108 | { | 119 | { |
109 | printf("error calculating RIPEMD160 on '%s'\n",*P); | 120 | printf("error calculating RIPEMD160 on '%s'\n",*P); |
@@ -120,8 +131,7 @@ char *argv[]; | |||
120 | return(0); | 131 | return(0); |
121 | } | 132 | } |
122 | 133 | ||
123 | static char *pt(md) | 134 | static char *pt(unsigned char *md) |
124 | unsigned char *md; | ||
125 | { | 135 | { |
126 | int i; | 136 | int i; |
127 | static char buf[80]; | 137 | static char buf[80]; |
@@ -130,4 +140,4 @@ unsigned char *md; | |||
130 | sprintf(&(buf[i*2]),"%02x",md[i]); | 140 | sprintf(&(buf[i*2]),"%02x",md[i]); |
131 | return(buf); | 141 | return(buf); |
132 | } | 142 | } |
133 | 143 | #endif | |
diff --git a/src/lib/libcrypto/rsa/rsa_null.c b/src/lib/libcrypto/rsa/rsa_null.c index 7b58a0eca3..64057fbdcf 100644 --- a/src/lib/libcrypto/rsa/rsa_null.c +++ b/src/lib/libcrypto/rsa/rsa_null.c | |||
@@ -69,16 +69,16 @@ | |||
69 | * operations (like storing RSA keys) are permitted. | 69 | * operations (like storing RSA keys) are permitted. |
70 | */ | 70 | */ |
71 | 71 | ||
72 | static int RSA_null_public_encrypt(int flen, unsigned char *from, | 72 | static int RSA_null_public_encrypt(int flen, const unsigned char *from, |
73 | unsigned char *to, RSA *rsa,int padding); | 73 | unsigned char *to, RSA *rsa,int padding); |
74 | static int RSA_null_private_encrypt(int flen, unsigned char *from, | 74 | static int RSA_null_private_encrypt(int flen, const unsigned char *from, |
75 | unsigned char *to, RSA *rsa,int padding); | 75 | unsigned char *to, RSA *rsa,int padding); |
76 | static int RSA_null_public_decrypt(int flen, unsigned char *from, | 76 | static int RSA_null_public_decrypt(int flen, const unsigned char *from, |
77 | unsigned char *to, RSA *rsa,int padding); | 77 | unsigned char *to, RSA *rsa,int padding); |
78 | static int RSA_null_private_decrypt(int flen, unsigned char *from, | 78 | static int RSA_null_private_decrypt(int flen, const unsigned char *from, |
79 | unsigned char *to, RSA *rsa,int padding); | 79 | unsigned char *to, RSA *rsa,int padding); |
80 | #if 0 /* not currently used */ | 80 | #if 0 /* not currently used */ |
81 | static int RSA_null_mod_exp(BIGNUM *r0, BIGNUM *i, RSA *rsa); | 81 | static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa); |
82 | #endif | 82 | #endif |
83 | static int RSA_null_init(RSA *rsa); | 83 | static int RSA_null_init(RSA *rsa); |
84 | static int RSA_null_finish(RSA *rsa); | 84 | static int RSA_null_finish(RSA *rsa); |
@@ -88,40 +88,41 @@ static RSA_METHOD rsa_null_meth={ | |||
88 | RSA_null_public_decrypt, | 88 | RSA_null_public_decrypt, |
89 | RSA_null_private_encrypt, | 89 | RSA_null_private_encrypt, |
90 | RSA_null_private_decrypt, | 90 | RSA_null_private_decrypt, |
91 | NULL, NULL, | 91 | NULL, |
92 | NULL, | ||
92 | RSA_null_init, | 93 | RSA_null_init, |
93 | RSA_null_finish, | 94 | RSA_null_finish, |
94 | 0, | 95 | 0, |
95 | NULL, | 96 | NULL, |
96 | }; | 97 | }; |
97 | 98 | ||
98 | RSA_METHOD *RSA_null_method(void) | 99 | const RSA_METHOD *RSA_null_method(void) |
99 | { | 100 | { |
100 | return(&rsa_null_meth); | 101 | return(&rsa_null_meth); |
101 | } | 102 | } |
102 | 103 | ||
103 | static int RSA_null_public_encrypt(int flen, unsigned char *from, | 104 | static int RSA_null_public_encrypt(int flen, const unsigned char *from, |
104 | unsigned char *to, RSA *rsa, int padding) | 105 | unsigned char *to, RSA *rsa, int padding) |
105 | { | 106 | { |
106 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); | 107 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); |
107 | return -1; | 108 | return -1; |
108 | } | 109 | } |
109 | 110 | ||
110 | static int RSA_null_private_encrypt(int flen, unsigned char *from, | 111 | static int RSA_null_private_encrypt(int flen, const unsigned char *from, |
111 | unsigned char *to, RSA *rsa, int padding) | 112 | unsigned char *to, RSA *rsa, int padding) |
112 | { | 113 | { |
113 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); | 114 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); |
114 | return -1; | 115 | return -1; |
115 | } | 116 | } |
116 | 117 | ||
117 | static int RSA_null_private_decrypt(int flen, unsigned char *from, | 118 | static int RSA_null_private_decrypt(int flen, const unsigned char *from, |
118 | unsigned char *to, RSA *rsa, int padding) | 119 | unsigned char *to, RSA *rsa, int padding) |
119 | { | 120 | { |
120 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); | 121 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); |
121 | return -1; | 122 | return -1; |
122 | } | 123 | } |
123 | 124 | ||
124 | static int RSA_null_public_decrypt(int flen, unsigned char *from, | 125 | static int RSA_null_public_decrypt(int flen, const unsigned char *from, |
125 | unsigned char *to, RSA *rsa, int padding) | 126 | unsigned char *to, RSA *rsa, int padding) |
126 | { | 127 | { |
127 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); | 128 | RSAerr(RSA_F_RSA_NULL, RSA_R_RSA_OPERATIONS_NOT_SUPPORTED); |
diff --git a/src/lib/libcrypto/rsa/rsa_test.c b/src/lib/libcrypto/rsa/rsa_test.c index e5ae0c1f69..b8b462d33b 100644 --- a/src/lib/libcrypto/rsa/rsa_test.c +++ b/src/lib/libcrypto/rsa/rsa_test.c | |||
@@ -3,12 +3,12 @@ | |||
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <string.h> | 4 | #include <string.h> |
5 | 5 | ||
6 | #include "openssl/e_os.h" | 6 | #include "e_os.h" |
7 | 7 | ||
8 | #include <openssl/crypto.h> | 8 | #include <openssl/crypto.h> |
9 | #include <openssl/err.h> | 9 | #include <openssl/err.h> |
10 | #include <openssl/rand.h> | 10 | #include <openssl/rand.h> |
11 | #ifdef NO_RSA | 11 | #ifdef OPENSSL_NO_RSA |
12 | int main(int argc, char *argv[]) | 12 | int main(int argc, char *argv[]) |
13 | { | 13 | { |
14 | printf("No RSA support\n"); | 14 | printf("No RSA support\n"); |
@@ -16,6 +16,7 @@ int main(int argc, char *argv[]) | |||
16 | } | 16 | } |
17 | #else | 17 | #else |
18 | #include <openssl/rsa.h> | 18 | #include <openssl/rsa.h> |
19 | #include <openssl/engine.h> | ||
19 | 20 | ||
20 | #define SetKey \ | 21 | #define SetKey \ |
21 | key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \ | 22 | key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \ |
@@ -219,10 +220,12 @@ int main(int argc, char *argv[]) | |||
219 | int clen = 0; | 220 | int clen = 0; |
220 | int num; | 221 | int num; |
221 | 222 | ||
223 | CRYPTO_malloc_debug_init(); | ||
224 | CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); | ||
225 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
226 | |||
222 | RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */ | 227 | RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */ |
223 | 228 | ||
224 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
225 | |||
226 | plen = sizeof(ptext_ex) - 1; | 229 | plen = sizeof(ptext_ex) - 1; |
227 | 230 | ||
228 | for (v = 0; v < 3; v++) | 231 | for (v = 0; v < 3; v++) |
@@ -305,9 +308,10 @@ int main(int argc, char *argv[]) | |||
305 | RSA_free(key); | 308 | RSA_free(key); |
306 | } | 309 | } |
307 | 310 | ||
311 | CRYPTO_cleanup_all_ex_data(); | ||
308 | ERR_remove_state(0); | 312 | ERR_remove_state(0); |
309 | 313 | ||
310 | CRYPTO_mem_leaks_fp(stdout); | 314 | CRYPTO_mem_leaks_fp(stderr); |
311 | 315 | ||
312 | return err; | 316 | return err; |
313 | } | 317 | } |
diff --git a/src/lib/libcrypto/sha/sha.c b/src/lib/libcrypto/sha/sha.c index 713fec3610..42126551d1 100644 --- a/src/lib/libcrypto/sha/sha.c +++ b/src/lib/libcrypto/sha/sha.c | |||
@@ -58,23 +58,14 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "sha.h" | 61 | #include <openssl/sha.h> |
62 | 62 | ||
63 | #define BUFSIZE 1024*16 | 63 | #define BUFSIZE 1024*16 |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | void do_fp(FILE *f); | 65 | void do_fp(FILE *f); |
67 | void pt(unsigned char *md); | 66 | void pt(unsigned char *md); |
68 | int read(int, void *, unsigned int); | 67 | int read(int, void *, unsigned int); |
69 | #else | 68 | int main(int argc, char **argv) |
70 | void do_fp(); | ||
71 | void pt(); | ||
72 | int read(); | ||
73 | #endif | ||
74 | |||
75 | int main(argc, argv) | ||
76 | int argc; | ||
77 | char **argv; | ||
78 | { | 69 | { |
79 | int i,err=0; | 70 | int i,err=0; |
80 | FILE *IN; | 71 | FILE *IN; |
@@ -102,8 +93,7 @@ char **argv; | |||
102 | exit(err); | 93 | exit(err); |
103 | } | 94 | } |
104 | 95 | ||
105 | void do_fp(f) | 96 | void do_fp(FILE *f) |
106 | FILE *f; | ||
107 | { | 97 | { |
108 | SHA_CTX c; | 98 | SHA_CTX c; |
109 | unsigned char md[SHA_DIGEST_LENGTH]; | 99 | unsigned char md[SHA_DIGEST_LENGTH]; |
@@ -123,8 +113,7 @@ FILE *f; | |||
123 | pt(md); | 113 | pt(md); |
124 | } | 114 | } |
125 | 115 | ||
126 | void pt(md) | 116 | void pt(unsigned char *md) |
127 | unsigned char *md; | ||
128 | { | 117 | { |
129 | int i; | 118 | int i; |
130 | 119 | ||
diff --git a/src/lib/libcrypto/sha/sha1.c b/src/lib/libcrypto/sha/sha1.c index a4739ac9fd..d350c88ee4 100644 --- a/src/lib/libcrypto/sha/sha1.c +++ b/src/lib/libcrypto/sha/sha1.c | |||
@@ -58,23 +58,17 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "sha.h" | 61 | #include <openssl/sha.h> |
62 | 62 | ||
63 | #define BUFSIZE 1024*16 | 63 | #define BUFSIZE 1024*16 |
64 | 64 | ||
65 | #ifndef NOPROTO | ||
66 | void do_fp(FILE *f); | 65 | void do_fp(FILE *f); |
67 | void pt(unsigned char *md); | 66 | void pt(unsigned char *md); |
67 | #ifndef _OSD_POSIX | ||
68 | int read(int, void *, unsigned int); | 68 | int read(int, void *, unsigned int); |
69 | #else | ||
70 | void do_fp(); | ||
71 | void pt(); | ||
72 | int read(); | ||
73 | #endif | 69 | #endif |
74 | 70 | ||
75 | int main(argc, argv) | 71 | int main(int argc, char **argv) |
76 | int argc; | ||
77 | char **argv; | ||
78 | { | 72 | { |
79 | int i,err=0; | 73 | int i,err=0; |
80 | FILE *IN; | 74 | FILE *IN; |
@@ -102,8 +96,7 @@ char **argv; | |||
102 | exit(err); | 96 | exit(err); |
103 | } | 97 | } |
104 | 98 | ||
105 | void do_fp(f) | 99 | void do_fp(FILE *f) |
106 | FILE *f; | ||
107 | { | 100 | { |
108 | SHA_CTX c; | 101 | SHA_CTX c; |
109 | unsigned char md[SHA_DIGEST_LENGTH]; | 102 | unsigned char md[SHA_DIGEST_LENGTH]; |
@@ -123,8 +116,7 @@ FILE *f; | |||
123 | pt(md); | 116 | pt(md); |
124 | } | 117 | } |
125 | 118 | ||
126 | void pt(md) | 119 | void pt(unsigned char *md) |
127 | unsigned char *md; | ||
128 | { | 120 | { |
129 | int i; | 121 | int i; |
130 | 122 | ||
diff --git a/src/lib/libcrypto/sha/sha1s.cpp b/src/lib/libcrypto/sha/sha1s.cpp index 0163377de6..af23d1e0f2 100644 --- a/src/lib/libcrypto/sha/sha1s.cpp +++ b/src/lib/libcrypto/sha/sha1s.cpp | |||
@@ -32,8 +32,9 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "sha.h" | 35 | #include <openssl/sha.h> |
36 | 36 | ||
37 | #define sha1_block_x86 sha1_block_asm_data_order | ||
37 | extern "C" { | 38 | extern "C" { |
38 | void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num); | 39 | void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num); |
39 | } | 40 | } |
@@ -55,8 +56,10 @@ void main(int argc,char *argv[]) | |||
55 | if (num == 0) num=16; | 56 | if (num == 0) num=16; |
56 | if (num > 250) num=16; | 57 | if (num > 250) num=16; |
57 | numm=num+2; | 58 | numm=num+2; |
59 | #if 0 | ||
58 | num*=64; | 60 | num*=64; |
59 | numm*=64; | 61 | numm*=64; |
62 | #endif | ||
60 | 63 | ||
61 | for (j=0; j<6; j++) | 64 | for (j=0; j<6; j++) |
62 | { | 65 | { |
@@ -72,7 +75,7 @@ void main(int argc,char *argv[]) | |||
72 | sha1_block_x86(&ctx,buffer,num); | 75 | sha1_block_x86(&ctx,buffer,num); |
73 | } | 76 | } |
74 | 77 | ||
75 | printf("sha1 (%d bytes) %d %d (%.2f)\n",num, | 78 | printf("sha1 (%d bytes) %d %d (%.2f)\n",num*64, |
76 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); | 79 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); |
77 | } | 80 | } |
78 | } | 81 | } |
diff --git a/src/lib/libcrypto/sha/sha1test.c b/src/lib/libcrypto/sha/sha1test.c index 3c62a218b4..499a1cf5af 100644 --- a/src/lib/libcrypto/sha/sha1test.c +++ b/src/lib/libcrypto/sha/sha1test.c | |||
@@ -59,57 +59,70 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "sha.h" | 62 | |
63 | #ifdef OPENSSL_NO_SHA | ||
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No SHA support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/evp.h> | ||
71 | #include <openssl/sha.h> | ||
72 | |||
73 | #ifdef CHARSET_EBCDIC | ||
74 | #include <openssl/ebcdic.h> | ||
75 | #endif | ||
63 | 76 | ||
64 | #undef SHA_0 /* FIPS 180 */ | 77 | #undef SHA_0 /* FIPS 180 */ |
65 | #define SHA_1 /* FIPS 180-1 */ | 78 | #define SHA_1 /* FIPS 180-1 */ |
66 | 79 | ||
67 | char *test[]={ | 80 | static char *test[]={ |
68 | "abc", | 81 | "abc", |
69 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", | 82 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
70 | NULL, | 83 | NULL, |
71 | }; | 84 | }; |
72 | 85 | ||
73 | #ifdef SHA_0 | 86 | #ifdef SHA_0 |
74 | char *ret[]={ | 87 | static char *ret[]={ |
75 | "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880", | 88 | "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880", |
76 | "d2516ee1acfa5baf33dfc1c471e438449ef134c8", | 89 | "d2516ee1acfa5baf33dfc1c471e438449ef134c8", |
77 | }; | 90 | }; |
78 | char *bigret= | 91 | static char *bigret= |
79 | "3232affa48628a26653b5aaa44541fd90d690603"; | 92 | "3232affa48628a26653b5aaa44541fd90d690603"; |
80 | #endif | 93 | #endif |
81 | #ifdef SHA_1 | 94 | #ifdef SHA_1 |
82 | char *ret[]={ | 95 | static char *ret[]={ |
83 | "a9993e364706816aba3e25717850c26c9cd0d89d", | 96 | "a9993e364706816aba3e25717850c26c9cd0d89d", |
84 | "84983e441c3bd26ebaae4aa1f95129e5e54670f1", | 97 | "84983e441c3bd26ebaae4aa1f95129e5e54670f1", |
85 | }; | 98 | }; |
86 | char *bigret= | 99 | static char *bigret= |
87 | "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; | 100 | "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; |
88 | #endif | 101 | #endif |
89 | 102 | ||
90 | #ifndef NOPROTO | ||
91 | static char *pt(unsigned char *md); | 103 | static char *pt(unsigned char *md); |
92 | #else | 104 | int main(int argc, char *argv[]) |
93 | static char *pt(); | ||
94 | #endif | ||
95 | |||
96 | int main(argc,argv) | ||
97 | int argc; | ||
98 | char *argv[]; | ||
99 | { | 105 | { |
100 | int i,err=0; | 106 | int i,err=0; |
101 | unsigned char **P,**R; | 107 | unsigned char **P,**R; |
102 | static unsigned char buf[1000]; | 108 | static unsigned char buf[1000]; |
103 | char *p,*r; | 109 | char *p,*r; |
104 | SHA_CTX c; | 110 | EVP_MD_CTX c; |
105 | unsigned char md[SHA_DIGEST_LENGTH]; | 111 | unsigned char md[SHA_DIGEST_LENGTH]; |
106 | 112 | ||
113 | #ifdef CHARSET_EBCDIC | ||
114 | ebcdic2ascii(test[0], test[0], strlen(test[0])); | ||
115 | ebcdic2ascii(test[1], test[1], strlen(test[1])); | ||
116 | #endif | ||
117 | |||
118 | EVP_MD_CTX_init(&c); | ||
107 | P=(unsigned char **)test; | 119 | P=(unsigned char **)test; |
108 | R=(unsigned char **)ret; | 120 | R=(unsigned char **)ret; |
109 | i=1; | 121 | i=1; |
110 | while (*P != NULL) | 122 | while (*P != NULL) |
111 | { | 123 | { |
112 | p=pt(SHA1(*P,(unsigned long)strlen((char *)*P),NULL)); | 124 | EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha1(), NULL); |
125 | p=pt(md); | ||
113 | if (strcmp(p,(char *)*R) != 0) | 126 | if (strcmp(p,(char *)*R) != 0) |
114 | { | 127 | { |
115 | printf("error calculating SHA1 on '%s'\n",*P); | 128 | printf("error calculating SHA1 on '%s'\n",*P); |
@@ -124,10 +137,13 @@ char *argv[]; | |||
124 | } | 137 | } |
125 | 138 | ||
126 | memset(buf,'a',1000); | 139 | memset(buf,'a',1000); |
127 | SHA1_Init(&c); | 140 | #ifdef CHARSET_EBCDIC |
141 | ebcdic2ascii(buf, buf, 1000); | ||
142 | #endif /*CHARSET_EBCDIC*/ | ||
143 | EVP_DigestInit_ex(&c,EVP_sha1(), NULL); | ||
128 | for (i=0; i<1000; i++) | 144 | for (i=0; i<1000; i++) |
129 | SHA1_Update(&c,buf,1000); | 145 | EVP_DigestUpdate(&c,buf,1000); |
130 | SHA1_Final(md,&c); | 146 | EVP_DigestFinal_ex(&c,md,NULL); |
131 | p=pt(md); | 147 | p=pt(md); |
132 | 148 | ||
133 | r=bigret; | 149 | r=bigret; |
@@ -140,11 +156,11 @@ char *argv[]; | |||
140 | else | 156 | else |
141 | printf("test 3 ok\n"); | 157 | printf("test 3 ok\n"); |
142 | exit(err); | 158 | exit(err); |
159 | EVP_MD_CTX_cleanup(&c); | ||
143 | return(0); | 160 | return(0); |
144 | } | 161 | } |
145 | 162 | ||
146 | static char *pt(md) | 163 | static char *pt(unsigned char *md) |
147 | unsigned char *md; | ||
148 | { | 164 | { |
149 | int i; | 165 | int i; |
150 | static char buf[80]; | 166 | static char buf[80]; |
@@ -153,3 +169,4 @@ unsigned char *md; | |||
153 | sprintf(&(buf[i*2]),"%02x",md[i]); | 169 | sprintf(&(buf[i*2]),"%02x",md[i]); |
154 | return(buf); | 170 | return(buf); |
155 | } | 171 | } |
172 | #endif | ||
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c index 8ed533ea26..5a4b3ab204 100644 --- a/src/lib/libcrypto/sha/sha_dgst.c +++ b/src/lib/libcrypto/sha/sha_dgst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* crypto/sha/sha_dgst.c */ | 1 | /* crypto/sha/sha1dgst.c */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -56,387 +56,18 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) |
60 | #include <string.h> | ||
61 | #define SHA_0 | ||
62 | #undef SHA_1 | ||
63 | #include "sha.h" | ||
64 | #include "sha_locl.h" | ||
65 | |||
66 | char *SHA_version="SHA part of SSLeay 0.9.0b 29-Jun-1998"; | ||
67 | |||
68 | /* Implemented from SHA-0 document - The Secure Hash Algorithm | ||
69 | */ | ||
70 | |||
71 | #define INIT_DATA_h0 (unsigned long)0x67452301L | ||
72 | #define INIT_DATA_h1 (unsigned long)0xefcdab89L | ||
73 | #define INIT_DATA_h2 (unsigned long)0x98badcfeL | ||
74 | #define INIT_DATA_h3 (unsigned long)0x10325476L | ||
75 | #define INIT_DATA_h4 (unsigned long)0xc3d2e1f0L | ||
76 | |||
77 | #define K_00_19 0x5a827999L | ||
78 | #define K_20_39 0x6ed9eba1L | ||
79 | #define K_40_59 0x8f1bbcdcL | ||
80 | #define K_60_79 0xca62c1d6L | ||
81 | |||
82 | #ifndef NOPROTO | ||
83 | void sha_block(SHA_CTX *c, register unsigned long *p, int num); | ||
84 | #else | ||
85 | void sha_block(); | ||
86 | #endif | ||
87 | |||
88 | #define M_c2nl c2nl | ||
89 | #define M_p_c2nl p_c2nl | ||
90 | #define M_c2nl_p c2nl_p | ||
91 | #define M_p_c2nl_p p_c2nl_p | ||
92 | #define M_nl2c nl2c | ||
93 | |||
94 | void SHA_Init(c) | ||
95 | SHA_CTX *c; | ||
96 | { | ||
97 | c->h0=INIT_DATA_h0; | ||
98 | c->h1=INIT_DATA_h1; | ||
99 | c->h2=INIT_DATA_h2; | ||
100 | c->h3=INIT_DATA_h3; | ||
101 | c->h4=INIT_DATA_h4; | ||
102 | c->Nl=0; | ||
103 | c->Nh=0; | ||
104 | c->num=0; | ||
105 | } | ||
106 | |||
107 | void SHA_Update(c, data, len) | ||
108 | SHA_CTX *c; | ||
109 | register unsigned char *data; | ||
110 | unsigned long len; | ||
111 | { | ||
112 | register ULONG *p; | ||
113 | int ew,ec,sw,sc; | ||
114 | ULONG l; | ||
115 | |||
116 | if (len == 0) return; | ||
117 | |||
118 | l=(c->Nl+(len<<3))&0xffffffffL; | ||
119 | if (l < c->Nl) /* overflow */ | ||
120 | c->Nh++; | ||
121 | c->Nh+=(len>>29); | ||
122 | c->Nl=l; | ||
123 | |||
124 | if (c->num != 0) | ||
125 | { | ||
126 | p=c->data; | ||
127 | sw=c->num>>2; | ||
128 | sc=c->num&0x03; | ||
129 | |||
130 | if ((c->num+len) >= SHA_CBLOCK) | ||
131 | { | ||
132 | l= p[sw]; | ||
133 | M_p_c2nl(data,l,sc); | ||
134 | p[sw++]=l; | ||
135 | for (; sw<SHA_LBLOCK; sw++) | ||
136 | { | ||
137 | M_c2nl(data,l); | ||
138 | p[sw]=l; | ||
139 | } | ||
140 | len-=(SHA_CBLOCK-c->num); | ||
141 | |||
142 | sha_block(c,p,64); | ||
143 | c->num=0; | ||
144 | /* drop through and do the rest */ | ||
145 | } | ||
146 | else | ||
147 | { | ||
148 | c->num+=(int)len; | ||
149 | if ((sc+len) < 4) /* ugly, add char's to a word */ | ||
150 | { | ||
151 | l= p[sw]; | ||
152 | M_p_c2nl_p(data,l,sc,len); | ||
153 | p[sw]=l; | ||
154 | } | ||
155 | else | ||
156 | { | ||
157 | ew=(c->num>>2); | ||
158 | ec=(c->num&0x03); | ||
159 | l= p[sw]; | ||
160 | M_p_c2nl(data,l,sc); | ||
161 | p[sw++]=l; | ||
162 | for (; sw < ew; sw++) | ||
163 | { M_c2nl(data,l); p[sw]=l; } | ||
164 | if (ec) | ||
165 | { | ||
166 | M_c2nl_p(data,l,ec); | ||
167 | p[sw]=l; | ||
168 | } | ||
169 | } | ||
170 | return; | ||
171 | } | ||
172 | } | ||
173 | /* We can only do the following code for assember, the reason | ||
174 | * being that the sha_block 'C' version changes the values | ||
175 | * in the 'data' array. The assember code avoids this and | ||
176 | * copies it to a local array. I should be able to do this for | ||
177 | * the C version as well.... | ||
178 | */ | ||
179 | #if 1 | ||
180 | #if defined(B_ENDIAN) || defined(SHA_ASM) | ||
181 | if ((((unsigned int)data)%sizeof(ULONG)) == 0) | ||
182 | { | ||
183 | sw=len/SHA_CBLOCK; | ||
184 | if (sw) | ||
185 | { | ||
186 | sw*=SHA_CBLOCK; | ||
187 | sha_block(c,(ULONG *)data,sw); | ||
188 | data+=sw; | ||
189 | len-=sw; | ||
190 | } | ||
191 | } | ||
192 | #endif | ||
193 | #endif | ||
194 | /* we now can process the input data in blocks of SHA_CBLOCK | ||
195 | * chars and save the leftovers to c->data. */ | ||
196 | p=c->data; | ||
197 | while (len >= SHA_CBLOCK) | ||
198 | { | ||
199 | #if defined(B_ENDIAN) || defined(L_ENDIAN) | ||
200 | if (p != (unsigned long *)data) | ||
201 | memcpy(p,data,SHA_CBLOCK); | ||
202 | data+=SHA_CBLOCK; | ||
203 | # ifdef L_ENDIAN | ||
204 | # ifndef SHA_ASM /* Will not happen */ | ||
205 | for (sw=(SHA_LBLOCK/4); sw; sw--) | ||
206 | { | ||
207 | Endian_Reverse32(p[0]); | ||
208 | Endian_Reverse32(p[1]); | ||
209 | Endian_Reverse32(p[2]); | ||
210 | Endian_Reverse32(p[3]); | ||
211 | p+=4; | ||
212 | } | ||
213 | p=c->data; | ||
214 | # endif | ||
215 | # endif | ||
216 | #else | ||
217 | for (sw=(SHA_BLOCK/4); sw; sw--) | ||
218 | { | ||
219 | M_c2nl(data,l); *(p++)=l; | ||
220 | M_c2nl(data,l); *(p++)=l; | ||
221 | M_c2nl(data,l); *(p++)=l; | ||
222 | M_c2nl(data,l); *(p++)=l; | ||
223 | } | ||
224 | p=c->data; | ||
225 | #endif | ||
226 | sha_block(c,p,64); | ||
227 | len-=SHA_CBLOCK; | ||
228 | } | ||
229 | ec=(int)len; | ||
230 | c->num=ec; | ||
231 | ew=(ec>>2); | ||
232 | ec&=0x03; | ||
233 | |||
234 | for (sw=0; sw < ew; sw++) | ||
235 | { M_c2nl(data,l); p[sw]=l; } | ||
236 | M_c2nl_p(data,l,ec); | ||
237 | p[sw]=l; | ||
238 | } | ||
239 | |||
240 | void SHA_Transform(c,b) | ||
241 | SHA_CTX *c; | ||
242 | unsigned char *b; | ||
243 | { | ||
244 | ULONG p[16]; | ||
245 | #if !defined(B_ENDIAN) | ||
246 | ULONG *q; | ||
247 | int i; | ||
248 | #endif | ||
249 | |||
250 | #if defined(B_ENDIAN) || defined(L_ENDIAN) | ||
251 | memcpy(p,b,64); | ||
252 | #ifdef L_ENDIAN | ||
253 | q=p; | ||
254 | for (i=(SHA_LBLOCK/4); i; i--) | ||
255 | { | ||
256 | Endian_Reverse32(q[0]); | ||
257 | Endian_Reverse32(q[1]); | ||
258 | Endian_Reverse32(q[2]); | ||
259 | Endian_Reverse32(q[3]); | ||
260 | q+=4; | ||
261 | } | ||
262 | #endif | ||
263 | #else | ||
264 | q=p; | ||
265 | for (i=(SHA_LBLOCK/4); i; i--) | ||
266 | { | ||
267 | ULONG l; | ||
268 | c2nl(b,l); *(q++)=l; | ||
269 | c2nl(b,l); *(q++)=l; | ||
270 | c2nl(b,l); *(q++)=l; | ||
271 | c2nl(b,l); *(q++)=l; | ||
272 | } | ||
273 | #endif | ||
274 | sha_block(c,p,64); | ||
275 | } | ||
276 | |||
277 | void sha_block(c, W, num) | ||
278 | SHA_CTX *c; | ||
279 | register unsigned long *W; | ||
280 | int num; | ||
281 | { | ||
282 | register ULONG A,B,C,D,E,T; | ||
283 | ULONG X[16]; | ||
284 | |||
285 | A=c->h0; | ||
286 | B=c->h1; | ||
287 | C=c->h2; | ||
288 | D=c->h3; | ||
289 | E=c->h4; | ||
290 | |||
291 | for (;;) | ||
292 | { | ||
293 | BODY_00_15( 0,A,B,C,D,E,T,W); | ||
294 | BODY_00_15( 1,T,A,B,C,D,E,W); | ||
295 | BODY_00_15( 2,E,T,A,B,C,D,W); | ||
296 | BODY_00_15( 3,D,E,T,A,B,C,W); | ||
297 | BODY_00_15( 4,C,D,E,T,A,B,W); | ||
298 | BODY_00_15( 5,B,C,D,E,T,A,W); | ||
299 | BODY_00_15( 6,A,B,C,D,E,T,W); | ||
300 | BODY_00_15( 7,T,A,B,C,D,E,W); | ||
301 | BODY_00_15( 8,E,T,A,B,C,D,W); | ||
302 | BODY_00_15( 9,D,E,T,A,B,C,W); | ||
303 | BODY_00_15(10,C,D,E,T,A,B,W); | ||
304 | BODY_00_15(11,B,C,D,E,T,A,W); | ||
305 | BODY_00_15(12,A,B,C,D,E,T,W); | ||
306 | BODY_00_15(13,T,A,B,C,D,E,W); | ||
307 | BODY_00_15(14,E,T,A,B,C,D,W); | ||
308 | BODY_00_15(15,D,E,T,A,B,C,W); | ||
309 | BODY_16_19(16,C,D,E,T,A,B,W,W,W,W); | ||
310 | BODY_16_19(17,B,C,D,E,T,A,W,W,W,W); | ||
311 | BODY_16_19(18,A,B,C,D,E,T,W,W,W,W); | ||
312 | BODY_16_19(19,T,A,B,C,D,E,W,W,W,X); | ||
313 | 60 | ||
314 | BODY_20_31(20,E,T,A,B,C,D,W,W,W,X); | 61 | #undef SHA_1 |
315 | BODY_20_31(21,D,E,T,A,B,C,W,W,W,X); | 62 | #define SHA_0 |
316 | BODY_20_31(22,C,D,E,T,A,B,W,W,W,X); | ||
317 | BODY_20_31(23,B,C,D,E,T,A,W,W,W,X); | ||
318 | BODY_20_31(24,A,B,C,D,E,T,W,W,X,X); | ||
319 | BODY_20_31(25,T,A,B,C,D,E,W,W,X,X); | ||
320 | BODY_20_31(26,E,T,A,B,C,D,W,W,X,X); | ||
321 | BODY_20_31(27,D,E,T,A,B,C,W,W,X,X); | ||
322 | BODY_20_31(28,C,D,E,T,A,B,W,W,X,X); | ||
323 | BODY_20_31(29,B,C,D,E,T,A,W,W,X,X); | ||
324 | BODY_20_31(30,A,B,C,D,E,T,W,X,X,X); | ||
325 | BODY_20_31(31,T,A,B,C,D,E,W,X,X,X); | ||
326 | BODY_32_39(32,E,T,A,B,C,D,X); | ||
327 | BODY_32_39(33,D,E,T,A,B,C,X); | ||
328 | BODY_32_39(34,C,D,E,T,A,B,X); | ||
329 | BODY_32_39(35,B,C,D,E,T,A,X); | ||
330 | BODY_32_39(36,A,B,C,D,E,T,X); | ||
331 | BODY_32_39(37,T,A,B,C,D,E,X); | ||
332 | BODY_32_39(38,E,T,A,B,C,D,X); | ||
333 | BODY_32_39(39,D,E,T,A,B,C,X); | ||
334 | 63 | ||
335 | BODY_40_59(40,C,D,E,T,A,B,X); | 64 | #include <openssl/opensslv.h> |
336 | BODY_40_59(41,B,C,D,E,T,A,X); | ||
337 | BODY_40_59(42,A,B,C,D,E,T,X); | ||
338 | BODY_40_59(43,T,A,B,C,D,E,X); | ||
339 | BODY_40_59(44,E,T,A,B,C,D,X); | ||
340 | BODY_40_59(45,D,E,T,A,B,C,X); | ||
341 | BODY_40_59(46,C,D,E,T,A,B,X); | ||
342 | BODY_40_59(47,B,C,D,E,T,A,X); | ||
343 | BODY_40_59(48,A,B,C,D,E,T,X); | ||
344 | BODY_40_59(49,T,A,B,C,D,E,X); | ||
345 | BODY_40_59(50,E,T,A,B,C,D,X); | ||
346 | BODY_40_59(51,D,E,T,A,B,C,X); | ||
347 | BODY_40_59(52,C,D,E,T,A,B,X); | ||
348 | BODY_40_59(53,B,C,D,E,T,A,X); | ||
349 | BODY_40_59(54,A,B,C,D,E,T,X); | ||
350 | BODY_40_59(55,T,A,B,C,D,E,X); | ||
351 | BODY_40_59(56,E,T,A,B,C,D,X); | ||
352 | BODY_40_59(57,D,E,T,A,B,C,X); | ||
353 | BODY_40_59(58,C,D,E,T,A,B,X); | ||
354 | BODY_40_59(59,B,C,D,E,T,A,X); | ||
355 | 65 | ||
356 | BODY_60_79(60,A,B,C,D,E,T,X); | 66 | const char *SHA_version="SHA" OPENSSL_VERSION_PTEXT; |
357 | BODY_60_79(61,T,A,B,C,D,E,X); | ||
358 | BODY_60_79(62,E,T,A,B,C,D,X); | ||
359 | BODY_60_79(63,D,E,T,A,B,C,X); | ||
360 | BODY_60_79(64,C,D,E,T,A,B,X); | ||
361 | BODY_60_79(65,B,C,D,E,T,A,X); | ||
362 | BODY_60_79(66,A,B,C,D,E,T,X); | ||
363 | BODY_60_79(67,T,A,B,C,D,E,X); | ||
364 | BODY_60_79(68,E,T,A,B,C,D,X); | ||
365 | BODY_60_79(69,D,E,T,A,B,C,X); | ||
366 | BODY_60_79(70,C,D,E,T,A,B,X); | ||
367 | BODY_60_79(71,B,C,D,E,T,A,X); | ||
368 | BODY_60_79(72,A,B,C,D,E,T,X); | ||
369 | BODY_60_79(73,T,A,B,C,D,E,X); | ||
370 | BODY_60_79(74,E,T,A,B,C,D,X); | ||
371 | BODY_60_79(75,D,E,T,A,B,C,X); | ||
372 | BODY_60_79(76,C,D,E,T,A,B,X); | ||
373 | BODY_60_79(77,B,C,D,E,T,A,X); | ||
374 | BODY_60_79(78,A,B,C,D,E,T,X); | ||
375 | BODY_60_79(79,T,A,B,C,D,E,X); | ||
376 | |||
377 | c->h0=(c->h0+E)&0xffffffffL; | ||
378 | c->h1=(c->h1+T)&0xffffffffL; | ||
379 | c->h2=(c->h2+A)&0xffffffffL; | ||
380 | c->h3=(c->h3+B)&0xffffffffL; | ||
381 | c->h4=(c->h4+C)&0xffffffffL; | ||
382 | 67 | ||
383 | num-=64; | 68 | /* The implementation is in ../md32_common.h */ |
384 | if (num <= 0) break; | ||
385 | 69 | ||
386 | A=c->h0; | 70 | #include "sha_locl.h" |
387 | B=c->h1; | ||
388 | C=c->h2; | ||
389 | D=c->h3; | ||
390 | E=c->h4; | ||
391 | |||
392 | W+=16; | ||
393 | } | ||
394 | } | ||
395 | |||
396 | void SHA_Final(md, c) | ||
397 | unsigned char *md; | ||
398 | SHA_CTX *c; | ||
399 | { | ||
400 | register int i,j; | ||
401 | register ULONG l; | ||
402 | register ULONG *p; | ||
403 | static unsigned char end[4]={0x80,0x00,0x00,0x00}; | ||
404 | unsigned char *cp=end; | ||
405 | 71 | ||
406 | /* c->num should definitly have room for at least one more byte. */ | ||
407 | p=c->data; | ||
408 | j=c->num; | ||
409 | i=j>>2; | ||
410 | #ifdef PURIFY | ||
411 | if ((j&0x03) == 0) p[i]=0; | ||
412 | #endif | 72 | #endif |
413 | l=p[i]; | ||
414 | M_p_c2nl(cp,l,j&0x03); | ||
415 | p[i]=l; | ||
416 | i++; | ||
417 | /* i is the next 'undefined word' */ | ||
418 | if (c->num >= SHA_LAST_BLOCK) | ||
419 | { | ||
420 | for (; i<SHA_LBLOCK; i++) | ||
421 | p[i]=0; | ||
422 | sha_block(c,p,64); | ||
423 | i=0; | ||
424 | } | ||
425 | for (; i<(SHA_LBLOCK-2); i++) | ||
426 | p[i]=0; | ||
427 | p[SHA_LBLOCK-2]=c->Nh; | ||
428 | p[SHA_LBLOCK-1]=c->Nl; | ||
429 | sha_block(c,p,64); | ||
430 | cp=md; | ||
431 | l=c->h0; nl2c(l,cp); | ||
432 | l=c->h1; nl2c(l,cp); | ||
433 | l=c->h2; nl2c(l,cp); | ||
434 | l=c->h3; nl2c(l,cp); | ||
435 | l=c->h4; nl2c(l,cp); | ||
436 | |||
437 | /* clear stuff, sha_block may be leaving some stuff on the stack | ||
438 | * but I'm not worried :-) */ | ||
439 | c->num=0; | ||
440 | /* memset((char *)&c,0,sizeof(c));*/ | ||
441 | } | ||
442 | 73 | ||
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c index 18ab7f61bc..5426faae4a 100644 --- a/src/lib/libcrypto/sha/sha_one.c +++ b/src/lib/libcrypto/sha/sha_one.c | |||
@@ -58,12 +58,10 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include "sha.h" | 61 | #include <openssl/sha.h> |
62 | 62 | ||
63 | unsigned char *SHA(d, n, md) | 63 | #ifndef OPENSSL_NO_SHA0 |
64 | unsigned char *d; | 64 | unsigned char *SHA(const unsigned char *d, unsigned long n, unsigned char *md) |
65 | unsigned long n; | ||
66 | unsigned char *md; | ||
67 | { | 65 | { |
68 | SHA_CTX c; | 66 | SHA_CTX c; |
69 | static unsigned char m[SHA_DIGEST_LENGTH]; | 67 | static unsigned char m[SHA_DIGEST_LENGTH]; |
@@ -75,3 +73,4 @@ unsigned char *md; | |||
75 | memset(&c,0,sizeof(c)); | 73 | memset(&c,0,sizeof(c)); |
76 | return(md); | 74 | return(md); |
77 | } | 75 | } |
76 | #endif | ||
diff --git a/src/lib/libcrypto/sha/shatest.c b/src/lib/libcrypto/sha/shatest.c index 03816e9b39..331294a74f 100644 --- a/src/lib/libcrypto/sha/shatest.c +++ b/src/lib/libcrypto/sha/shatest.c | |||
@@ -59,57 +59,70 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include "sha.h" | 62 | |
63 | #ifdef OPENSSL_NO_SHA | ||
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No SHA support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/evp.h> | ||
71 | #include <openssl/sha.h> | ||
72 | |||
73 | #ifdef CHARSET_EBCDIC | ||
74 | #include <openssl/ebcdic.h> | ||
75 | #endif | ||
63 | 76 | ||
64 | #define SHA_0 /* FIPS 180 */ | 77 | #define SHA_0 /* FIPS 180 */ |
65 | #undef SHA_1 /* FIPS 180-1 */ | 78 | #undef SHA_1 /* FIPS 180-1 */ |
66 | 79 | ||
67 | char *test[]={ | 80 | static char *test[]={ |
68 | "abc", | 81 | "abc", |
69 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", | 82 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
70 | NULL, | 83 | NULL, |
71 | }; | 84 | }; |
72 | 85 | ||
73 | #ifdef SHA_0 | 86 | #ifdef SHA_0 |
74 | char *ret[]={ | 87 | static char *ret[]={ |
75 | "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880", | 88 | "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880", |
76 | "d2516ee1acfa5baf33dfc1c471e438449ef134c8", | 89 | "d2516ee1acfa5baf33dfc1c471e438449ef134c8", |
77 | }; | 90 | }; |
78 | char *bigret= | 91 | static char *bigret= |
79 | "3232affa48628a26653b5aaa44541fd90d690603"; | 92 | "3232affa48628a26653b5aaa44541fd90d690603"; |
80 | #endif | 93 | #endif |
81 | #ifdef SHA_1 | 94 | #ifdef SHA_1 |
82 | char *ret[]={ | 95 | static char *ret[]={ |
83 | "a9993e364706816aba3e25717850c26c9cd0d89d", | 96 | "a9993e364706816aba3e25717850c26c9cd0d89d", |
84 | "84983e441c3bd26ebaae4aa1f95129e5e54670f1", | 97 | "84983e441c3bd26ebaae4aa1f95129e5e54670f1", |
85 | }; | 98 | }; |
86 | char *bigret= | 99 | static char *bigret= |
87 | "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; | 100 | "34aa973cd4c4daa4f61eeb2bdbad27316534016f"; |
88 | #endif | 101 | #endif |
89 | 102 | ||
90 | #ifndef NOPROTO | ||
91 | static char *pt(unsigned char *md); | 103 | static char *pt(unsigned char *md); |
92 | #else | 104 | int main(int argc, char *argv[]) |
93 | static char *pt(); | ||
94 | #endif | ||
95 | |||
96 | int main(argc,argv) | ||
97 | int argc; | ||
98 | char *argv[]; | ||
99 | { | 105 | { |
100 | int i,err=0; | 106 | int i,err=0; |
101 | unsigned char **P,**R; | 107 | unsigned char **P,**R; |
102 | static unsigned char buf[1000]; | 108 | static unsigned char buf[1000]; |
103 | char *p,*r; | 109 | char *p,*r; |
104 | SHA_CTX c; | 110 | EVP_MD_CTX c; |
105 | unsigned char md[SHA_DIGEST_LENGTH]; | 111 | unsigned char md[SHA_DIGEST_LENGTH]; |
106 | 112 | ||
113 | #ifdef CHARSET_EBCDIC | ||
114 | ebcdic2ascii(test[0], test[0], strlen(test[0])); | ||
115 | ebcdic2ascii(test[1], test[1], strlen(test[1])); | ||
116 | #endif | ||
117 | |||
118 | EVP_MD_CTX_init(&c); | ||
107 | P=(unsigned char **)test; | 119 | P=(unsigned char **)test; |
108 | R=(unsigned char **)ret; | 120 | R=(unsigned char **)ret; |
109 | i=1; | 121 | i=1; |
110 | while (*P != NULL) | 122 | while (*P != NULL) |
111 | { | 123 | { |
112 | p=pt(SHA(*P,(unsigned long)strlen((char *)*P),NULL)); | 124 | EVP_Digest(*P,(unsigned long)strlen((char *)*P),md,NULL,EVP_sha(), NULL); |
125 | p=pt(md); | ||
113 | if (strcmp(p,(char *)*R) != 0) | 126 | if (strcmp(p,(char *)*R) != 0) |
114 | { | 127 | { |
115 | printf("error calculating SHA on '%s'\n",*P); | 128 | printf("error calculating SHA on '%s'\n",*P); |
@@ -124,10 +137,13 @@ char *argv[]; | |||
124 | } | 137 | } |
125 | 138 | ||
126 | memset(buf,'a',1000); | 139 | memset(buf,'a',1000); |
127 | SHA_Init(&c); | 140 | #ifdef CHARSET_EBCDIC |
141 | ebcdic2ascii(buf, buf, 1000); | ||
142 | #endif /*CHARSET_EBCDIC*/ | ||
143 | EVP_DigestInit_ex(&c,EVP_sha(), NULL); | ||
128 | for (i=0; i<1000; i++) | 144 | for (i=0; i<1000; i++) |
129 | SHA_Update(&c,buf,1000); | 145 | EVP_DigestUpdate(&c,buf,1000); |
130 | SHA_Final(md,&c); | 146 | EVP_DigestFinal_ex(&c,md,NULL); |
131 | p=pt(md); | 147 | p=pt(md); |
132 | 148 | ||
133 | r=bigret; | 149 | r=bigret; |
@@ -139,12 +155,12 @@ char *argv[]; | |||
139 | } | 155 | } |
140 | else | 156 | else |
141 | printf("test 3 ok\n"); | 157 | printf("test 3 ok\n"); |
158 | EVP_MD_CTX_cleanup(&c); | ||
142 | exit(err); | 159 | exit(err); |
143 | return(0); | 160 | return(0); |
144 | } | 161 | } |
145 | 162 | ||
146 | static char *pt(md) | 163 | static char *pt(unsigned char *md) |
147 | unsigned char *md; | ||
148 | { | 164 | { |
149 | int i; | 165 | int i; |
150 | static char buf[80]; | 166 | static char buf[80]; |
@@ -153,3 +169,4 @@ unsigned char *md; | |||
153 | sprintf(&(buf[i*2]),"%02x",md[i]); | 169 | sprintf(&(buf[i*2]),"%02x",md[i]); |
154 | return(buf); | 170 | return(buf); |
155 | } | 171 | } |
172 | #endif | ||
diff --git a/src/lib/libcrypto/symhacks.h b/src/lib/libcrypto/symhacks.h index 358ad355bb..de0f452b47 100644 --- a/src/lib/libcrypto/symhacks.h +++ b/src/lib/libcrypto/symhacks.h | |||
@@ -55,10 +55,18 @@ | |||
55 | #ifndef HEADER_SYMHACKS_H | 55 | #ifndef HEADER_SYMHACKS_H |
56 | #define HEADER_SYMHACKS_H | 56 | #define HEADER_SYMHACKS_H |
57 | 57 | ||
58 | #include <openssl/e_os2.h> | ||
59 | |||
58 | /* Hacks to solve the problem with linkers incapable of handling very long | 60 | /* Hacks to solve the problem with linkers incapable of handling very long |
59 | symbol names. In the case of VMS, the limit is 31 characters on VMS for | 61 | symbol names. In the case of VMS, the limit is 31 characters on VMS for |
60 | VAX. */ | 62 | VAX. */ |
61 | #ifdef VMS | 63 | #ifdef OPENSSL_SYS_VMS |
64 | |||
65 | /* Hack a long name in crypto/ex_data.c */ | ||
66 | #undef CRYPTO_get_ex_data_implementation | ||
67 | #define CRYPTO_get_ex_data_implementation CRYPTO_get_ex_data_impl | ||
68 | #undef CRYPTO_set_ex_data_implementation | ||
69 | #define CRYPTO_set_ex_data_implementation CRYPTO_set_ex_data_impl | ||
62 | 70 | ||
63 | /* Hack a long name in crypto/asn1/a_mbstr.c */ | 71 | /* Hack a long name in crypto/asn1/a_mbstr.c */ |
64 | #undef ASN1_STRING_set_default_mask_asc | 72 | #undef ASN1_STRING_set_default_mask_asc |
@@ -121,33 +129,146 @@ | |||
121 | #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic | 129 | #define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic |
122 | 130 | ||
123 | /* Hack some long CRYPTO names */ | 131 | /* Hack some long CRYPTO names */ |
132 | #undef CRYPTO_set_dynlock_destroy_callback | ||
124 | #define CRYPTO_set_dynlock_destroy_callback CRYPTO_set_dynlock_destroy_cb | 133 | #define CRYPTO_set_dynlock_destroy_callback CRYPTO_set_dynlock_destroy_cb |
134 | #undef CRYPTO_set_dynlock_create_callback | ||
125 | #define CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_create_cb | 135 | #define CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_create_cb |
136 | #undef CRYPTO_set_dynlock_lock_callback | ||
126 | #define CRYPTO_set_dynlock_lock_callback CRYPTO_set_dynlock_lock_cb | 137 | #define CRYPTO_set_dynlock_lock_callback CRYPTO_set_dynlock_lock_cb |
138 | #undef CRYPTO_get_dynlock_lock_callback | ||
127 | #define CRYPTO_get_dynlock_lock_callback CRYPTO_get_dynlock_lock_cb | 139 | #define CRYPTO_get_dynlock_lock_callback CRYPTO_get_dynlock_lock_cb |
140 | #undef CRYPTO_get_dynlock_destroy_callback | ||
128 | #define CRYPTO_get_dynlock_destroy_callback CRYPTO_get_dynlock_destroy_cb | 141 | #define CRYPTO_get_dynlock_destroy_callback CRYPTO_get_dynlock_destroy_cb |
142 | #undef CRYPTO_get_dynlock_create_callback | ||
129 | #define CRYPTO_get_dynlock_create_callback CRYPTO_get_dynlock_create_cb | 143 | #define CRYPTO_get_dynlock_create_callback CRYPTO_get_dynlock_create_cb |
144 | #undef CRYPTO_set_locked_mem_ex_functions | ||
145 | #define CRYPTO_set_locked_mem_ex_functions CRYPTO_set_locked_mem_ex_funcs | ||
146 | #undef CRYPTO_get_locked_mem_ex_functions | ||
147 | #define CRYPTO_get_locked_mem_ex_functions CRYPTO_get_locked_mem_ex_funcs | ||
130 | 148 | ||
131 | /* Hack some long SSL names */ | 149 | /* Hack some long SSL names */ |
150 | #undef SSL_CTX_set_default_verify_paths | ||
132 | #define SSL_CTX_set_default_verify_paths SSL_CTX_set_def_verify_paths | 151 | #define SSL_CTX_set_default_verify_paths SSL_CTX_set_def_verify_paths |
152 | #undef SSL_get_ex_data_X509_STORE_CTX_idx | ||
133 | #define SSL_get_ex_data_X509_STORE_CTX_idx SSL_get_ex_d_X509_STORE_CTX_idx | 153 | #define SSL_get_ex_data_X509_STORE_CTX_idx SSL_get_ex_d_X509_STORE_CTX_idx |
154 | #undef SSL_add_file_cert_subjects_to_stack | ||
134 | #define SSL_add_file_cert_subjects_to_stack SSL_add_file_cert_subjs_to_stk | 155 | #define SSL_add_file_cert_subjects_to_stack SSL_add_file_cert_subjs_to_stk |
156 | #if 0 /* This function is not defined i VMS. */ | ||
157 | #undef SSL_add_dir_cert_subjects_to_stack | ||
135 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_subjs_to_stk | 158 | #define SSL_add_dir_cert_subjects_to_stack SSL_add_dir_cert_subjs_to_stk |
159 | #endif | ||
160 | #undef SSL_CTX_use_certificate_chain_file | ||
136 | #define SSL_CTX_use_certificate_chain_file SSL_CTX_use_cert_chain_file | 161 | #define SSL_CTX_use_certificate_chain_file SSL_CTX_use_cert_chain_file |
162 | #undef SSL_CTX_set_cert_verify_callback | ||
137 | #define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb | 163 | #define SSL_CTX_set_cert_verify_callback SSL_CTX_set_cert_verify_cb |
164 | #undef SSL_CTX_set_default_passwd_cb_userdata | ||
138 | #define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud | 165 | #define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud |
139 | 166 | ||
140 | /* Hack some long ENGINE names */ | 167 | /* Hack some long ENGINE names */ |
141 | #define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt | 168 | #undef ENGINE_get_default_BN_mod_exp_crt |
142 | #define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt | 169 | #define ENGINE_get_default_BN_mod_exp_crt ENGINE_get_def_BN_mod_exp_crt |
170 | #undef ENGINE_set_default_BN_mod_exp_crt | ||
171 | #define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_BN_mod_exp_crt | ||
172 | #undef ENGINE_set_load_privkey_function | ||
173 | #define ENGINE_set_load_privkey_function ENGINE_set_load_privkey_fn | ||
174 | #undef ENGINE_get_load_privkey_function | ||
175 | #define ENGINE_get_load_privkey_function ENGINE_get_load_privkey_fn | ||
176 | |||
177 | /* Hack some long OCSP names */ | ||
178 | #undef OCSP_REQUEST_get_ext_by_critical | ||
179 | #define OCSP_REQUEST_get_ext_by_critical OCSP_REQUEST_get_ext_by_crit | ||
180 | #undef OCSP_BASICRESP_get_ext_by_critical | ||
181 | #define OCSP_BASICRESP_get_ext_by_critical OCSP_BASICRESP_get_ext_by_crit | ||
182 | #undef OCSP_SINGLERESP_get_ext_by_critical | ||
183 | #define OCSP_SINGLERESP_get_ext_by_critical OCSP_SINGLERESP_get_ext_by_crit | ||
184 | |||
185 | /* Hack some long DES names */ | ||
186 | #undef _ossl_old_des_ede3_cfb64_encrypt | ||
187 | #define _ossl_old_des_ede3_cfb64_encrypt _ossl_odes_ede3_cfb64_encrypt | ||
188 | #undef _ossl_old_des_ede3_ofb64_encrypt | ||
189 | #define _ossl_old_des_ede3_ofb64_encrypt _ossl_odes_ede3_ofb64_encrypt | ||
143 | 190 | ||
144 | #endif /* defined VMS */ | 191 | /* Hack some long EVP names */ |
192 | #undef OPENSSL_add_all_algorithms_noconf | ||
193 | #define OPENSSL_add_all_algorithms_noconf OPENSSL_add_all_algo_noconf | ||
194 | #undef OPENSSL_add_all_algorithms_conf | ||
195 | #define OPENSSL_add_all_algorithms_conf OPENSSL_add_all_algo_conf | ||
196 | |||
197 | /* Hack some long EC names */ | ||
198 | #undef EC_POINT_set_Jprojective_coordinates_GFp | ||
199 | #define EC_POINT_set_Jprojective_coordinates_GFp \ | ||
200 | EC_POINT_set_Jproj_coords_GFp | ||
201 | #undef EC_POINT_get_Jprojective_coordinates_GFp | ||
202 | #define EC_POINT_get_Jprojective_coordinates_GFp \ | ||
203 | EC_POINT_get_Jproj_coords_GFp | ||
204 | #undef EC_POINT_set_affine_coordinates_GFp | ||
205 | #define EC_POINT_set_affine_coordinates_GFp EC_POINT_set_affine_coords_GFp | ||
206 | #undef EC_POINT_get_affine_coordinates_GFp | ||
207 | #define EC_POINT_get_affine_coordinates_GFp EC_POINT_get_affine_coords_GFp | ||
208 | #undef EC_POINT_set_compressed_coordinates_GFp | ||
209 | #define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp | ||
210 | #undef ec_GFp_simple_group_set_curve_GFp | ||
211 | #define ec_GFp_simple_group_set_curve_GFp ec_GFp_simple_grp_set_curve_GFp | ||
212 | #undef ec_GFp_simple_group_get_curve_GFp | ||
213 | #define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp | ||
214 | #undef ec_GFp_simple_group_clear_finish | ||
215 | #define ec_GFp_simple_group_clear_finish ec_GFp_simple_grp_clear_finish | ||
216 | #undef ec_GFp_simple_group_set_generator | ||
217 | #define ec_GFp_simple_group_set_generator ec_GFp_simple_grp_set_generator | ||
218 | #undef ec_GFp_simple_group_get0_generator | ||
219 | #define ec_GFp_simple_group_get0_generator ec_GFp_simple_grp_gt0_generator | ||
220 | #undef ec_GFp_simple_group_get_cofactor | ||
221 | #define ec_GFp_simple_group_get_cofactor ec_GFp_simple_grp_get_cofactor | ||
222 | #undef ec_GFp_simple_point_clear_finish | ||
223 | #define ec_GFp_simple_point_clear_finish ec_GFp_simple_pt_clear_finish | ||
224 | #undef ec_GFp_simple_point_set_to_infinity | ||
225 | #define ec_GFp_simple_point_set_to_infinity ec_GFp_simple_pt_set_to_inf | ||
226 | #undef ec_GFp_simple_points_make_affine | ||
227 | #define ec_GFp_simple_points_make_affine ec_GFp_simple_pts_make_affine | ||
228 | #undef ec_GFp_simple_group_get_curve_GFp | ||
229 | #define ec_GFp_simple_group_get_curve_GFp ec_GFp_simple_grp_get_curve_GFp | ||
230 | #undef ec_GFp_simple_set_Jprojective_coordinates_GFp | ||
231 | #define ec_GFp_simple_set_Jprojective_coordinates_GFp \ | ||
232 | ec_GFp_smp_set_Jproj_coords_GFp | ||
233 | #undef ec_GFp_simple_get_Jprojective_coordinates_GFp | ||
234 | #define ec_GFp_simple_get_Jprojective_coordinates_GFp \ | ||
235 | ec_GFp_smp_get_Jproj_coords_GFp | ||
236 | #undef ec_GFp_simple_point_set_affine_coordinates_GFp | ||
237 | #define ec_GFp_simple_point_set_affine_coordinates_GFp \ | ||
238 | ec_GFp_smp_pt_set_af_coords_GFp | ||
239 | #undef ec_GFp_simple_point_get_affine_coordinates_GFp | ||
240 | #define ec_GFp_simple_point_get_affine_coordinates_GFp \ | ||
241 | ec_GFp_smp_pt_get_af_coords_GFp | ||
242 | #undef ec_GFp_simple_set_compressed_coordinates_GFp | ||
243 | #define ec_GFp_simple_set_compressed_coordinates_GFp \ | ||
244 | ec_GFp_smp_set_compr_coords_GFp | ||
245 | |||
246 | #endif /* defined OPENSSL_SYS_VMS */ | ||
145 | 247 | ||
146 | 248 | ||
147 | /* Case insensiteve linking causes problems.... */ | 249 | /* Case insensiteve linking causes problems.... */ |
148 | #if defined(WIN16) || defined(VMS) | 250 | #if defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_VMS) |
149 | #undef ERR_load_CRYPTO_strings | 251 | #undef ERR_load_CRYPTO_strings |
150 | #define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings | 252 | #define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings |
253 | #undef OCSP_crlID_new | ||
254 | #define OCSP_crlID_new OCSP_crlID2_new | ||
255 | |||
256 | /* These functions do not seem to exist! However, I'm paranoid... | ||
257 | Original command in x509v3.h: | ||
258 | These functions are being redefined in another directory, | ||
259 | and clash when the linker is case-insensitive, so let's | ||
260 | hide them a little, by giving them an extra 'o' at the | ||
261 | beginning of the name... */ | ||
262 | #undef X509v3_cleanup_extensions | ||
263 | #define X509v3_cleanup_extensions oX509v3_cleanup_extensions | ||
264 | #undef X509v3_add_extension | ||
265 | #define X509v3_add_extension oX509v3_add_extension | ||
266 | #undef X509v3_add_netscape_extensions | ||
267 | #define X509v3_add_netscape_extensions oX509v3_add_netscape_extensions | ||
268 | #undef X509v3_add_standard_extensions | ||
269 | #define X509v3_add_standard_extensions oX509v3_add_standard_extensions | ||
270 | |||
271 | |||
151 | #endif | 272 | #endif |
152 | 273 | ||
153 | 274 | ||
diff --git a/src/lib/libcrypto/threads/mttest.c b/src/lib/libcrypto/threads/mttest.c index be395f2bc4..7142e4edc7 100644 --- a/src/lib/libcrypto/threads/mttest.c +++ b/src/lib/libcrypto/threads/mttest.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #ifdef LINUX | 63 | #ifdef LINUX |
64 | #include <typedefs.h> | 64 | #include <typedefs.h> |
65 | #endif | 65 | #endif |
66 | #ifdef WIN32 | 66 | #ifdef OPENSSL_SYS_WIN32 |
67 | #include <windows.h> | 67 | #include <windows.h> |
68 | #endif | 68 | #endif |
69 | #ifdef SOLARIS | 69 | #ifdef SOLARIS |
@@ -74,27 +74,29 @@ | |||
74 | #include <ulocks.h> | 74 | #include <ulocks.h> |
75 | #include <sys/prctl.h> | 75 | #include <sys/prctl.h> |
76 | #endif | 76 | #endif |
77 | #include "lhash.h" | 77 | #ifdef PTHREADS |
78 | #include "crypto.h" | 78 | #include <pthread.h> |
79 | #include "buffer.h" | 79 | #endif |
80 | #include "../e_os.h" | 80 | #include <openssl/lhash.h> |
81 | #include "x509.h" | 81 | #include <openssl/crypto.h> |
82 | #include "ssl.h" | 82 | #include <openssl/buffer.h> |
83 | #include "err.h" | 83 | #include "../../e_os.h" |
84 | 84 | #include <openssl/x509.h> | |
85 | #ifdef NO_FP_API | 85 | #include <openssl/ssl.h> |
86 | #include <openssl/err.h> | ||
87 | #include <openssl/rand.h> | ||
88 | |||
89 | #ifdef OPENSSL_NO_FP_API | ||
86 | #define APPS_WIN16 | 90 | #define APPS_WIN16 |
87 | #include "../crypto/buffer/bss_file.c" | 91 | #include "../buffer/bss_file.c" |
88 | #endif | 92 | #endif |
89 | 93 | ||
90 | #define TEST_SERVER_CERT "../apps/server.pem" | 94 | #define TEST_SERVER_CERT "../../apps/server.pem" |
91 | #define TEST_CLIENT_CERT "../apps/client.pem" | 95 | #define TEST_CLIENT_CERT "../../apps/client.pem" |
92 | 96 | ||
93 | #define MAX_THREAD_NUMBER 100 | 97 | #define MAX_THREAD_NUMBER 100 |
94 | 98 | ||
95 | #ifndef NOPROTO | 99 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *xs); |
96 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, | ||
97 | int error,char *arg); | ||
98 | void thread_setup(void); | 100 | void thread_setup(void); |
99 | void thread_cleanup(void); | 101 | void thread_cleanup(void); |
100 | void do_threads(SSL_CTX *s_ctx,SSL_CTX *c_ctx); | 102 | void do_threads(SSL_CTX *s_ctx,SSL_CTX *c_ctx); |
@@ -108,23 +110,6 @@ unsigned long irix_thread_id(void ); | |||
108 | unsigned long solaris_thread_id(void ); | 110 | unsigned long solaris_thread_id(void ); |
109 | unsigned long pthreads_thread_id(void ); | 111 | unsigned long pthreads_thread_id(void ); |
110 | 112 | ||
111 | #else | ||
112 | int MS_CALLBACK verify_callback(); | ||
113 | void thread_setup(); | ||
114 | void thread_cleanup(); | ||
115 | void do_threads(); | ||
116 | |||
117 | void irix_locking_callback(); | ||
118 | void solaris_locking_callback(); | ||
119 | void win32_locking_callback(); | ||
120 | void pthreads_locking_callback(); | ||
121 | |||
122 | unsigned long irix_thread_id(); | ||
123 | unsigned long solaris_thread_id(); | ||
124 | unsigned long pthreads_thread_id(); | ||
125 | |||
126 | #endif | ||
127 | |||
128 | BIO *bio_err=NULL; | 113 | BIO *bio_err=NULL; |
129 | BIO *bio_stdout=NULL; | 114 | BIO *bio_stdout=NULL; |
130 | 115 | ||
@@ -139,15 +124,10 @@ int number_of_loops=10; | |||
139 | int reconnect=0; | 124 | int reconnect=0; |
140 | int cache_stats=0; | 125 | int cache_stats=0; |
141 | 126 | ||
142 | #ifndef NOPROTO | 127 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; |
143 | int doit(char *ctx[4]); | ||
144 | #else | ||
145 | int doit(); | ||
146 | #endif | ||
147 | 128 | ||
148 | static void print_stats(fp,ctx) | 129 | int doit(char *ctx[4]); |
149 | FILE *fp; | 130 | static void print_stats(FILE *fp, SSL_CTX *ctx) |
150 | SSL_CTX *ctx; | ||
151 | { | 131 | { |
152 | fprintf(fp,"%4ld items in the session cache\n", | 132 | fprintf(fp,"%4ld items in the session cache\n", |
153 | SSL_CTX_sess_number(ctx)); | 133 | SSL_CTX_sess_number(ctx)); |
@@ -164,7 +144,7 @@ SSL_CTX *ctx; | |||
164 | fprintf(fp,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ctx)); | 144 | fprintf(fp,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ctx)); |
165 | } | 145 | } |
166 | 146 | ||
167 | static void sv_usage() | 147 | static void sv_usage(void) |
168 | { | 148 | { |
169 | fprintf(stderr,"usage: ssltest [args ...]\n"); | 149 | fprintf(stderr,"usage: ssltest [args ...]\n"); |
170 | fprintf(stderr,"\n"); | 150 | fprintf(stderr,"\n"); |
@@ -182,9 +162,7 @@ static void sv_usage() | |||
182 | fprintf(stderr," -ssl3 - just SSLv3n\n"); | 162 | fprintf(stderr," -ssl3 - just SSLv3n\n"); |
183 | } | 163 | } |
184 | 164 | ||
185 | int main(argc, argv) | 165 | int main(int argc, char *argv[]) |
186 | int argc; | ||
187 | char *argv[]; | ||
188 | { | 166 | { |
189 | char *CApath=NULL,*CAfile=NULL; | 167 | char *CApath=NULL,*CAfile=NULL; |
190 | int badop=0; | 168 | int badop=0; |
@@ -197,6 +175,8 @@ char *argv[]; | |||
197 | char *ccert=TEST_CLIENT_CERT; | 175 | char *ccert=TEST_CLIENT_CERT; |
198 | SSL_METHOD *ssl_method=SSLv23_method(); | 176 | SSL_METHOD *ssl_method=SSLv23_method(); |
199 | 177 | ||
178 | RAND_seed(rnd_seed, sizeof rnd_seed); | ||
179 | |||
200 | if (bio_err == NULL) | 180 | if (bio_err == NULL) |
201 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 181 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
202 | if (bio_stdout == NULL) | 182 | if (bio_stdout == NULL) |
@@ -271,7 +251,7 @@ bad: | |||
271 | if (cipher == NULL) cipher=getenv("SSL_CIPHER"); | 251 | if (cipher == NULL) cipher=getenv("SSL_CIPHER"); |
272 | 252 | ||
273 | SSL_load_error_strings(); | 253 | SSL_load_error_strings(); |
274 | SSLeay_add_ssl_algorithms(); | 254 | OpenSSL_add_ssl_algorithms(); |
275 | 255 | ||
276 | c_ctx=SSL_CTX_new(ssl_method); | 256 | c_ctx=SSL_CTX_new(ssl_method); |
277 | s_ctx=SSL_CTX_new(ssl_method); | 257 | s_ctx=SSL_CTX_new(ssl_method); |
@@ -286,8 +266,15 @@ bad: | |||
286 | SSL_CTX_set_session_cache_mode(c_ctx, | 266 | SSL_CTX_set_session_cache_mode(c_ctx, |
287 | SSL_SESS_CACHE_NO_AUTO_CLEAR|SSL_SESS_CACHE_SERVER); | 267 | SSL_SESS_CACHE_NO_AUTO_CLEAR|SSL_SESS_CACHE_SERVER); |
288 | 268 | ||
289 | SSL_CTX_use_certificate_file(s_ctx,scert,SSL_FILETYPE_PEM); | 269 | if (!SSL_CTX_use_certificate_file(s_ctx,scert,SSL_FILETYPE_PEM)) |
290 | SSL_CTX_use_RSAPrivateKey_file(s_ctx,scert,SSL_FILETYPE_PEM); | 270 | { |
271 | ERR_print_errors(bio_err); | ||
272 | } | ||
273 | else if (!SSL_CTX_use_RSAPrivateKey_file(s_ctx,scert,SSL_FILETYPE_PEM)) | ||
274 | { | ||
275 | ERR_print_errors(bio_err); | ||
276 | goto end; | ||
277 | } | ||
291 | 278 | ||
292 | if (client_auth) | 279 | if (client_auth) |
293 | { | 280 | { |
@@ -358,8 +345,7 @@ end: | |||
358 | #define C_DONE 1 | 345 | #define C_DONE 1 |
359 | #define S_DONE 2 | 346 | #define S_DONE 2 |
360 | 347 | ||
361 | int ndoit(ssl_ctx) | 348 | int ndoit(SSL_CTX *ssl_ctx[2]) |
362 | SSL_CTX *ssl_ctx[2]; | ||
363 | { | 349 | { |
364 | int i; | 350 | int i; |
365 | int ret; | 351 | int ret; |
@@ -405,8 +391,7 @@ SSL_CTX *ssl_ctx[2]; | |||
405 | return(0); | 391 | return(0); |
406 | } | 392 | } |
407 | 393 | ||
408 | int doit(ctx) | 394 | int doit(char *ctx[4]) |
409 | char *ctx[4]; | ||
410 | { | 395 | { |
411 | SSL_CTX *s_ctx,*c_ctx; | 396 | SSL_CTX *s_ctx,*c_ctx; |
412 | static char cbuf[200],sbuf[200]; | 397 | static char cbuf[200],sbuf[200]; |
@@ -518,6 +503,7 @@ char *ctx[4]; | |||
518 | else | 503 | else |
519 | { | 504 | { |
520 | fprintf(stderr,"ERROR in CLIENT\n"); | 505 | fprintf(stderr,"ERROR in CLIENT\n"); |
506 | ERR_print_errors_fp(stderr); | ||
521 | return(1); | 507 | return(1); |
522 | } | 508 | } |
523 | } | 509 | } |
@@ -549,6 +535,7 @@ char *ctx[4]; | |||
549 | else | 535 | else |
550 | { | 536 | { |
551 | fprintf(stderr,"ERROR in CLIENT\n"); | 537 | fprintf(stderr,"ERROR in CLIENT\n"); |
538 | ERR_print_errors_fp(stderr); | ||
552 | return(1); | 539 | return(1); |
553 | } | 540 | } |
554 | } | 541 | } |
@@ -681,38 +668,39 @@ err: | |||
681 | return(0); | 668 | return(0); |
682 | } | 669 | } |
683 | 670 | ||
684 | int MS_CALLBACK verify_callback(ok, xs, xi, depth, error, arg) | 671 | int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx) |
685 | int ok; | ||
686 | X509 *xs; | ||
687 | X509 *xi; | ||
688 | int depth; | ||
689 | int error; | ||
690 | char *arg; | ||
691 | { | 672 | { |
692 | char buf[256]; | 673 | char *s, buf[256]; |
693 | 674 | ||
694 | if (verbose) | 675 | if (verbose) |
695 | { | 676 | { |
696 | X509_NAME_oneline(X509_get_subject_name(xs),buf,256); | 677 | s=X509_NAME_oneline(X509_get_subject_name(ctx->current_cert), |
697 | if (ok) | 678 | buf,256); |
698 | fprintf(stderr,"depth=%d %s\n",depth,buf); | 679 | if (s != NULL) |
699 | else | 680 | { |
700 | fprintf(stderr,"depth=%d error=%d %s\n",depth,error,buf); | 681 | if (ok) |
682 | fprintf(stderr,"depth=%d %s\n", | ||
683 | ctx->error_depth,buf); | ||
684 | else | ||
685 | fprintf(stderr,"depth=%d error=%d %s\n", | ||
686 | ctx->error_depth,ctx->error,buf); | ||
687 | } | ||
701 | } | 688 | } |
702 | return(ok); | 689 | return(ok); |
703 | } | 690 | } |
704 | 691 | ||
705 | #define THREAD_STACK_SIZE (16*1024) | 692 | #define THREAD_STACK_SIZE (16*1024) |
706 | 693 | ||
707 | #ifdef WIN32 | 694 | #ifdef OPENSSL_SYS_WIN32 |
708 | 695 | ||
709 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; | 696 | static HANDLE *lock_cs; |
710 | 697 | ||
711 | void thread_setup() | 698 | void thread_setup(void) |
712 | { | 699 | { |
713 | int i; | 700 | int i; |
714 | 701 | ||
715 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 702 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE)); |
703 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
716 | { | 704 | { |
717 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); | 705 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); |
718 | } | 706 | } |
@@ -721,20 +709,17 @@ void thread_setup() | |||
721 | /* id callback defined */ | 709 | /* id callback defined */ |
722 | } | 710 | } |
723 | 711 | ||
724 | void thread_cleanup() | 712 | void thread_cleanup(void) |
725 | { | 713 | { |
726 | int i; | 714 | int i; |
727 | 715 | ||
728 | CRYPTO_set_locking_callback(NULL); | 716 | CRYPTO_set_locking_callback(NULL); |
729 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 717 | for (i=0; i<CRYPTO_num_locks(); i++) |
730 | CloseHandle(lock_cs[i]); | 718 | CloseHandle(lock_cs[i]); |
719 | OPENSSL_free(lock_cs); | ||
731 | } | 720 | } |
732 | 721 | ||
733 | void win32_locking_callback(mode,type,file,line) | 722 | void win32_locking_callback(int mode, int type, char *file, int line) |
734 | int mode; | ||
735 | int type; | ||
736 | char *file; | ||
737 | int line; | ||
738 | { | 723 | { |
739 | if (mode & CRYPTO_LOCK) | 724 | if (mode & CRYPTO_LOCK) |
740 | { | 725 | { |
@@ -746,8 +731,7 @@ int line; | |||
746 | } | 731 | } |
747 | } | 732 | } |
748 | 733 | ||
749 | void do_threads(s_ctx,c_ctx) | 734 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
750 | SSL_CTX *s_ctx,*c_ctx; | ||
751 | { | 735 | { |
752 | double ret; | 736 | double ret; |
753 | SSL_CTX *ssl_ctx[2]; | 737 | SSL_CTX *ssl_ctx[2]; |
@@ -798,19 +782,21 @@ SSL_CTX *s_ctx,*c_ctx; | |||
798 | printf("win32 threads done - %.3f seconds\n",ret); | 782 | printf("win32 threads done - %.3f seconds\n",ret); |
799 | } | 783 | } |
800 | 784 | ||
801 | #endif /* WIN32 */ | 785 | #endif /* OPENSSL_SYS_WIN32 */ |
802 | 786 | ||
803 | #ifdef SOLARIS | 787 | #ifdef SOLARIS |
804 | 788 | ||
805 | static mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | 789 | static mutex_t *lock_cs; |
806 | /*static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; */ | 790 | /*static rwlock_t *lock_cs; */ |
807 | static long lock_count[CRYPTO_NUM_LOCKS]; | 791 | static long *lock_count; |
808 | 792 | ||
809 | void thread_setup() | 793 | void thread_setup(void) |
810 | { | 794 | { |
811 | int i; | 795 | int i; |
812 | 796 | ||
813 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 797 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t)); |
798 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); | ||
799 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
814 | { | 800 | { |
815 | lock_count[i]=0; | 801 | lock_count[i]=0; |
816 | /* rwlock_init(&(lock_cs[i]),USYNC_THREAD,NULL); */ | 802 | /* rwlock_init(&(lock_cs[i]),USYNC_THREAD,NULL); */ |
@@ -821,40 +807,42 @@ void thread_setup() | |||
821 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | 807 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); |
822 | } | 808 | } |
823 | 809 | ||
824 | void thread_cleanup() | 810 | void thread_cleanup(void) |
825 | { | 811 | { |
826 | int i; | 812 | int i; |
827 | 813 | ||
828 | CRYPTO_set_locking_callback(NULL); | 814 | CRYPTO_set_locking_callback(NULL); |
829 | fprintf(stderr,"cleanup\n"); | 815 | |
830 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 816 | fprintf(stderr,"cleanup\n"); |
817 | |||
818 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
831 | { | 819 | { |
832 | /* rwlock_destroy(&(lock_cs[i])); */ | 820 | /* rwlock_destroy(&(lock_cs[i])); */ |
833 | mutex_destroy(&(lock_cs[i])); | 821 | mutex_destroy(&(lock_cs[i])); |
834 | fprintf(stderr,"%8ld:%s\n",lock_count[i],CRYPTO_get_lock_name(i)); | 822 | fprintf(stderr,"%8ld:%s\n",lock_count[i],CRYPTO_get_lock_name(i)); |
835 | } | 823 | } |
836 | fprintf(stderr,"done cleanup\n"); | 824 | OPENSSL_free(lock_cs); |
825 | OPENSSL_free(lock_count); | ||
826 | |||
827 | fprintf(stderr,"done cleanup\n"); | ||
828 | |||
837 | } | 829 | } |
838 | 830 | ||
839 | void solaris_locking_callback(mode,type,file,line) | 831 | void solaris_locking_callback(int mode, int type, char *file, int line) |
840 | int mode; | ||
841 | int type; | ||
842 | char *file; | ||
843 | int line; | ||
844 | { | 832 | { |
845 | #ifdef undef | 833 | #ifdef undef |
846 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 834 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
847 | CRYPTO_thread_id(), | 835 | CRYPTO_thread_id(), |
848 | (mode&CRYPTO_LOCK)?"l":"u", | 836 | (mode&CRYPTO_LOCK)?"l":"u", |
849 | (type&CRYPTO_READ)?"r":"w",file,line); | 837 | (type&CRYPTO_READ)?"r":"w",file,line); |
850 | #endif | 838 | #endif |
851 | 839 | ||
852 | /* | 840 | /* |
853 | if (CRYPTO_LOCK_SSL_CERT == type) | 841 | if (CRYPTO_LOCK_SSL_CERT == type) |
854 | fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", | 842 | fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", |
855 | CRYPTO_thread_id(), | 843 | CRYPTO_thread_id(), |
856 | mode,file,line); | 844 | mode,file,line); |
857 | */ | 845 | */ |
858 | if (mode & CRYPTO_LOCK) | 846 | if (mode & CRYPTO_LOCK) |
859 | { | 847 | { |
860 | /* if (mode & CRYPTO_READ) | 848 | /* if (mode & CRYPTO_READ) |
@@ -872,8 +860,7 @@ if (CRYPTO_LOCK_SSL_CERT == type) | |||
872 | } | 860 | } |
873 | } | 861 | } |
874 | 862 | ||
875 | void do_threads(s_ctx,c_ctx) | 863 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
876 | SSL_CTX *s_ctx,*c_ctx; | ||
877 | { | 864 | { |
878 | SSL_CTX *ssl_ctx[2]; | 865 | SSL_CTX *ssl_ctx[2]; |
879 | thread_t thread_ctx[MAX_THREAD_NUMBER]; | 866 | thread_t thread_ctx[MAX_THREAD_NUMBER]; |
@@ -902,7 +889,7 @@ SSL_CTX *s_ctx,*c_ctx; | |||
902 | s_ctx->references,c_ctx->references); | 889 | s_ctx->references,c_ctx->references); |
903 | } | 890 | } |
904 | 891 | ||
905 | unsigned long solaris_thread_id() | 892 | unsigned long solaris_thread_id(void) |
906 | { | 893 | { |
907 | unsigned long ret; | 894 | unsigned long ret; |
908 | 895 | ||
@@ -915,9 +902,9 @@ unsigned long solaris_thread_id() | |||
915 | 902 | ||
916 | 903 | ||
917 | static usptr_t *arena; | 904 | static usptr_t *arena; |
918 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; | 905 | static usema_t **lock_cs; |
919 | 906 | ||
920 | void thread_setup() | 907 | void thread_setup(void) |
921 | { | 908 | { |
922 | int i; | 909 | int i; |
923 | char filename[20]; | 910 | char filename[20]; |
@@ -932,7 +919,8 @@ void thread_setup() | |||
932 | arena=usinit(filename); | 919 | arena=usinit(filename); |
933 | unlink(filename); | 920 | unlink(filename); |
934 | 921 | ||
935 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 922 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *)); |
923 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
936 | { | 924 | { |
937 | lock_cs[i]=usnewsema(arena,1); | 925 | lock_cs[i]=usnewsema(arena,1); |
938 | } | 926 | } |
@@ -941,12 +929,12 @@ void thread_setup() | |||
941 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); | 929 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); |
942 | } | 930 | } |
943 | 931 | ||
944 | void thread_cleanup() | 932 | void thread_cleanup(void) |
945 | { | 933 | { |
946 | int i; | 934 | int i; |
947 | 935 | ||
948 | CRYPTO_set_locking_callback(NULL); | 936 | CRYPTO_set_locking_callback(NULL); |
949 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 937 | for (i=0; i<CRYPTO_num_locks(); i++) |
950 | { | 938 | { |
951 | char buf[10]; | 939 | char buf[10]; |
952 | 940 | ||
@@ -954,13 +942,10 @@ void thread_cleanup() | |||
954 | usdumpsema(lock_cs[i],stdout,buf); | 942 | usdumpsema(lock_cs[i],stdout,buf); |
955 | usfreesema(lock_cs[i],arena); | 943 | usfreesema(lock_cs[i],arena); |
956 | } | 944 | } |
945 | OPENSSL_free(lock_cs); | ||
957 | } | 946 | } |
958 | 947 | ||
959 | void irix_locking_callback(mode,type,file,line) | 948 | void irix_locking_callback(int mode, int type, char *file, int line) |
960 | int mode; | ||
961 | int type; | ||
962 | char *file; | ||
963 | int line; | ||
964 | { | 949 | { |
965 | if (mode & CRYPTO_LOCK) | 950 | if (mode & CRYPTO_LOCK) |
966 | { | 951 | { |
@@ -974,8 +959,7 @@ int line; | |||
974 | } | 959 | } |
975 | } | 960 | } |
976 | 961 | ||
977 | void do_threads(s_ctx,c_ctx) | 962 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
978 | SSL_CTX *s_ctx,*c_ctx; | ||
979 | { | 963 | { |
980 | SSL_CTX *ssl_ctx[2]; | 964 | SSL_CTX *ssl_ctx[2]; |
981 | int thread_ctx[MAX_THREAD_NUMBER]; | 965 | int thread_ctx[MAX_THREAD_NUMBER]; |
@@ -1000,7 +984,7 @@ SSL_CTX *s_ctx,*c_ctx; | |||
1000 | s_ctx->references,c_ctx->references); | 984 | s_ctx->references,c_ctx->references); |
1001 | } | 985 | } |
1002 | 986 | ||
1003 | unsigned long irix_thread_id() | 987 | unsigned long irix_thread_id(void) |
1004 | { | 988 | { |
1005 | unsigned long ret; | 989 | unsigned long ret; |
1006 | 990 | ||
@@ -1011,14 +995,16 @@ unsigned long irix_thread_id() | |||
1011 | 995 | ||
1012 | #ifdef PTHREADS | 996 | #ifdef PTHREADS |
1013 | 997 | ||
1014 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | 998 | static pthread_mutex_t *lock_cs; |
1015 | static long lock_count[CRYPTO_NUM_LOCKS]; | 999 | static long *lock_count; |
1016 | 1000 | ||
1017 | void thread_setup() | 1001 | void thread_setup(void) |
1018 | { | 1002 | { |
1019 | int i; | 1003 | int i; |
1020 | 1004 | ||
1021 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 1005 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); |
1006 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); | ||
1007 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
1022 | { | 1008 | { |
1023 | lock_count[i]=0; | 1009 | lock_count[i]=0; |
1024 | pthread_mutex_init(&(lock_cs[i]),NULL); | 1010 | pthread_mutex_init(&(lock_cs[i]),NULL); |
@@ -1028,26 +1014,26 @@ void thread_setup() | |||
1028 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); | 1014 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); |
1029 | } | 1015 | } |
1030 | 1016 | ||
1031 | void thread_cleanup() | 1017 | void thread_cleanup(void) |
1032 | { | 1018 | { |
1033 | int i; | 1019 | int i; |
1034 | 1020 | ||
1035 | CRYPTO_set_locking_callback(NULL); | 1021 | CRYPTO_set_locking_callback(NULL); |
1036 | fprintf(stderr,"cleanup\n"); | 1022 | fprintf(stderr,"cleanup\n"); |
1037 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 1023 | for (i=0; i<CRYPTO_num_locks(); i++) |
1038 | { | 1024 | { |
1039 | pthread_mutex_destroy(&(lock_cs[i])); | 1025 | pthread_mutex_destroy(&(lock_cs[i])); |
1040 | fprintf(stderr,"%8ld:%s\n",lock_count[i], | 1026 | fprintf(stderr,"%8ld:%s\n",lock_count[i], |
1041 | CRYPTO_get_lock_name(i)); | 1027 | CRYPTO_get_lock_name(i)); |
1042 | } | 1028 | } |
1029 | OPENSSL_free(lock_cs); | ||
1030 | OPENSSL_free(lock_count); | ||
1031 | |||
1043 | fprintf(stderr,"done cleanup\n"); | 1032 | fprintf(stderr,"done cleanup\n"); |
1044 | } | 1033 | } |
1045 | 1034 | ||
1046 | void pthreads_locking_callback(mode,type,file,line) | 1035 | void pthreads_locking_callback(int mode, int type, char *file, |
1047 | int mode; | 1036 | int line) |
1048 | int type; | ||
1049 | char *file; | ||
1050 | int line; | ||
1051 | { | 1037 | { |
1052 | #ifdef undef | 1038 | #ifdef undef |
1053 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 1039 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -1072,8 +1058,7 @@ int line; | |||
1072 | } | 1058 | } |
1073 | } | 1059 | } |
1074 | 1060 | ||
1075 | void do_threads(s_ctx,c_ctx) | 1061 | void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx) |
1076 | SSL_CTX *s_ctx,*c_ctx; | ||
1077 | { | 1062 | { |
1078 | SSL_CTX *ssl_ctx[2]; | 1063 | SSL_CTX *ssl_ctx[2]; |
1079 | pthread_t thread_ctx[MAX_THREAD_NUMBER]; | 1064 | pthread_t thread_ctx[MAX_THREAD_NUMBER]; |
@@ -1098,10 +1083,10 @@ SSL_CTX *s_ctx,*c_ctx; | |||
1098 | } | 1083 | } |
1099 | 1084 | ||
1100 | printf("pthreads threads done (%d,%d)\n", | 1085 | printf("pthreads threads done (%d,%d)\n", |
1101 | s_ctx->references,c_ctx->references); | 1086 | s_ctx->references,c_ctx->references); |
1102 | } | 1087 | } |
1103 | 1088 | ||
1104 | unsigned long pthreads_thread_id() | 1089 | unsigned long pthreads_thread_id(void) |
1105 | { | 1090 | { |
1106 | unsigned long ret; | 1091 | unsigned long ret; |
1107 | 1092 | ||
diff --git a/src/lib/libcrypto/threads/th-lock.c b/src/lib/libcrypto/threads/th-lock.c index 039022446d..a6a79b9f45 100644 --- a/src/lib/libcrypto/threads/th-lock.c +++ b/src/lib/libcrypto/threads/th-lock.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #ifdef LINUX | 63 | #ifdef LINUX |
64 | #include <typedefs.h> | 64 | #include <typedefs.h> |
65 | #endif | 65 | #endif |
66 | #ifdef WIN32 | 66 | #ifdef OPENSSL_SYS_WIN32 |
67 | #include <windows.h> | 67 | #include <windows.h> |
68 | #endif | 68 | #endif |
69 | #ifdef SOLARIS | 69 | #ifdef SOLARIS |
@@ -74,16 +74,18 @@ | |||
74 | #include <ulocks.h> | 74 | #include <ulocks.h> |
75 | #include <sys/prctl.h> | 75 | #include <sys/prctl.h> |
76 | #endif | 76 | #endif |
77 | #include "lhash.h" | 77 | #ifdef PTHREADS |
78 | #include "crypto.h" | 78 | #include <pthread.h> |
79 | #include "buffer.h" | 79 | #endif |
80 | #include "e_os.h" | 80 | #include <openssl/lhash.h> |
81 | #include "x509.h" | 81 | #include <openssl/crypto.h> |
82 | #include "ssl.h" | 82 | #include <openssl/buffer.h> |
83 | #include "err.h" | 83 | #include <openssl/e_os.h> |
84 | 84 | #include <openssl/x509.h> | |
85 | #ifndef NOPROTO | 85 | #include <openssl/ssl.h> |
86 | int CRYPTO_thread_setup(void); | 86 | #include <openssl/err.h> |
87 | |||
88 | void CRYPTO_thread_setup(void); | ||
87 | void CRYPTO_thread_cleanup(void); | 89 | void CRYPTO_thread_cleanup(void); |
88 | 90 | ||
89 | static void irix_locking_callback(int mode,int type,char *file,int line); | 91 | static void irix_locking_callback(int mode,int type,char *file,int line); |
@@ -95,38 +97,24 @@ static unsigned long irix_thread_id(void ); | |||
95 | static unsigned long solaris_thread_id(void ); | 97 | static unsigned long solaris_thread_id(void ); |
96 | static unsigned long pthreads_thread_id(void ); | 98 | static unsigned long pthreads_thread_id(void ); |
97 | 99 | ||
98 | #else | ||
99 | int CRYPOTO_thread_setup(); | ||
100 | void CRYPTO_cleanup(); | ||
101 | |||
102 | static void irix_locking_callback(); | ||
103 | static void solaris_locking_callback(); | ||
104 | static void win32_locking_callback(); | ||
105 | static void pthreads_locking_callback(); | ||
106 | |||
107 | static unsigned long irix_thread_id(); | ||
108 | static unsigned long solaris_thread_id(); | ||
109 | static unsigned long pthreads_thread_id(); | ||
110 | |||
111 | #endif | ||
112 | |||
113 | /* usage: | 100 | /* usage: |
114 | * CRYPTO_thread_setup(); | 101 | * CRYPTO_thread_setup(); |
115 | * applicaion code | 102 | * application code |
116 | * CRYPTO_thread_cleanup(); | 103 | * CRYPTO_thread_cleanup(); |
117 | */ | 104 | */ |
118 | 105 | ||
119 | #define THREAD_STACK_SIZE (16*1024) | 106 | #define THREAD_STACK_SIZE (16*1024) |
120 | 107 | ||
121 | #ifdef WIN32 | 108 | #ifdef OPENSSL_SYS_WIN32 |
122 | 109 | ||
123 | static HANDLE lock_cs[CRYPTO_NUM_LOCKS]; | 110 | static HANDLE *lock_cs; |
124 | 111 | ||
125 | int CRYPTO_thread_setup() | 112 | void CRYPTO_thread_setup(void) |
126 | { | 113 | { |
127 | int i; | 114 | int i; |
128 | 115 | ||
129 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 116 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(HANDLE)); |
117 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
130 | { | 118 | { |
131 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); | 119 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); |
132 | } | 120 | } |
@@ -136,20 +124,17 @@ int CRYPTO_thread_setup() | |||
136 | return(1); | 124 | return(1); |
137 | } | 125 | } |
138 | 126 | ||
139 | static void CRYPTO_thread_cleanup() | 127 | static void CRYPTO_thread_cleanup(void) |
140 | { | 128 | { |
141 | int i; | 129 | int i; |
142 | 130 | ||
143 | CRYPTO_set_locking_callback(NULL); | 131 | CRYPTO_set_locking_callback(NULL); |
144 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 132 | for (i=0; i<CRYPTO_num_locks(); i++) |
145 | CloseHandle(lock_cs[i]); | 133 | CloseHandle(lock_cs[i]); |
134 | OPENSSL_free(lock_cs); | ||
146 | } | 135 | } |
147 | 136 | ||
148 | void win32_locking_callback(mode,type,file,line) | 137 | void win32_locking_callback(int mode, int type, char *file, int line) |
149 | int mode; | ||
150 | int type; | ||
151 | char *file; | ||
152 | int line; | ||
153 | { | 138 | { |
154 | if (mode & CRYPTO_LOCK) | 139 | if (mode & CRYPTO_LOCK) |
155 | { | 140 | { |
@@ -161,24 +146,30 @@ int line; | |||
161 | } | 146 | } |
162 | } | 147 | } |
163 | 148 | ||
164 | #endif /* WIN32 */ | 149 | #endif /* OPENSSL_SYS_WIN32 */ |
165 | 150 | ||
166 | #ifdef SOLARIS | 151 | #ifdef SOLARIS |
167 | 152 | ||
168 | #define USE_MUTEX | 153 | #define USE_MUTEX |
169 | 154 | ||
170 | static mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | ||
171 | #ifdef USE_MUTEX | 155 | #ifdef USE_MUTEX |
172 | static long lock_count[CRYPTO_NUM_LOCKS]; | 156 | static mutex_t *lock_cs; |
173 | #else | 157 | #else |
174 | static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; | 158 | static rwlock_t *lock_cs; |
175 | #endif | 159 | #endif |
160 | static long *lock_count; | ||
176 | 161 | ||
177 | void CRYPTO_thread_setup() | 162 | void CRYPTO_thread_setup(void) |
178 | { | 163 | { |
179 | int i; | 164 | int i; |
180 | 165 | ||
181 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 166 | #ifdef USE_MUTEX |
167 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(mutex_t)); | ||
168 | #else | ||
169 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(rwlock_t)); | ||
170 | #endif | ||
171 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); | ||
172 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
182 | { | 173 | { |
183 | lock_count[i]=0; | 174 | lock_count[i]=0; |
184 | #ifdef USE_MUTEX | 175 | #ifdef USE_MUTEX |
@@ -192,12 +183,12 @@ void CRYPTO_thread_setup() | |||
192 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | 183 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); |
193 | } | 184 | } |
194 | 185 | ||
195 | void CRYPTO_thread_cleanup() | 186 | void CRYPTO_thread_cleanup(void) |
196 | { | 187 | { |
197 | int i; | 188 | int i; |
198 | 189 | ||
199 | CRYPTO_set_locking_callback(NULL); | 190 | CRYPTO_set_locking_callback(NULL); |
200 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 191 | for (i=0; i<CRYPTO_num_locks(); i++) |
201 | { | 192 | { |
202 | #ifdef USE_MUTEX | 193 | #ifdef USE_MUTEX |
203 | mutex_destroy(&(lock_cs[i])); | 194 | mutex_destroy(&(lock_cs[i])); |
@@ -205,13 +196,11 @@ void CRYPTO_thread_cleanup() | |||
205 | rwlock_destroy(&(lock_cs[i])); | 196 | rwlock_destroy(&(lock_cs[i])); |
206 | #endif | 197 | #endif |
207 | } | 198 | } |
199 | OPENSSL_free(lock_cs); | ||
200 | OPENSSL_free(lock_count); | ||
208 | } | 201 | } |
209 | 202 | ||
210 | void solaris_locking_callback(mode,type,file,line) | 203 | void solaris_locking_callback(int mode, int type, char *file, int line) |
211 | int mode; | ||
212 | int type; | ||
213 | char *file; | ||
214 | int line; | ||
215 | { | 204 | { |
216 | #if 0 | 205 | #if 0 |
217 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 206 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -248,7 +237,7 @@ int line; | |||
248 | } | 237 | } |
249 | } | 238 | } |
250 | 239 | ||
251 | unsigned long solaris_thread_id() | 240 | unsigned long solaris_thread_id(void) |
252 | { | 241 | { |
253 | unsigned long ret; | 242 | unsigned long ret; |
254 | 243 | ||
@@ -261,9 +250,9 @@ unsigned long solaris_thread_id() | |||
261 | /* I don't think this works..... */ | 250 | /* I don't think this works..... */ |
262 | 251 | ||
263 | static usptr_t *arena; | 252 | static usptr_t *arena; |
264 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; | 253 | static usema_t **lock_cs; |
265 | 254 | ||
266 | void CRYPTO_thread_setup() | 255 | void CRYPTO_thread_setup(void) |
267 | { | 256 | { |
268 | int i; | 257 | int i; |
269 | char filename[20]; | 258 | char filename[20]; |
@@ -278,7 +267,8 @@ void CRYPTO_thread_setup() | |||
278 | arena=usinit(filename); | 267 | arena=usinit(filename); |
279 | unlink(filename); | 268 | unlink(filename); |
280 | 269 | ||
281 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 270 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(usema_t *)); |
271 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
282 | { | 272 | { |
283 | lock_cs[i]=usnewsema(arena,1); | 273 | lock_cs[i]=usnewsema(arena,1); |
284 | } | 274 | } |
@@ -287,12 +277,12 @@ void CRYPTO_thread_setup() | |||
287 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); | 277 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); |
288 | } | 278 | } |
289 | 279 | ||
290 | void CRYPTO_thread_cleanup() | 280 | void CRYPTO_thread_cleanup(void) |
291 | { | 281 | { |
292 | int i; | 282 | int i; |
293 | 283 | ||
294 | CRYPTO_set_locking_callback(NULL); | 284 | CRYPTO_set_locking_callback(NULL); |
295 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 285 | for (i=0; i<CRYPTO_num_locks(); i++) |
296 | { | 286 | { |
297 | char buf[10]; | 287 | char buf[10]; |
298 | 288 | ||
@@ -300,13 +290,10 @@ void CRYPTO_thread_cleanup() | |||
300 | usdumpsema(lock_cs[i],stdout,buf); | 290 | usdumpsema(lock_cs[i],stdout,buf); |
301 | usfreesema(lock_cs[i],arena); | 291 | usfreesema(lock_cs[i],arena); |
302 | } | 292 | } |
293 | OPENSSL_free(lock_cs); | ||
303 | } | 294 | } |
304 | 295 | ||
305 | void irix_locking_callback(mode,type,file,line) | 296 | void irix_locking_callback(int mode, int type, char *file, int line) |
306 | int mode; | ||
307 | int type; | ||
308 | char *file; | ||
309 | int line; | ||
310 | { | 297 | { |
311 | if (mode & CRYPTO_LOCK) | 298 | if (mode & CRYPTO_LOCK) |
312 | { | 299 | { |
@@ -318,7 +305,7 @@ int line; | |||
318 | } | 305 | } |
319 | } | 306 | } |
320 | 307 | ||
321 | unsigned long irix_thread_id() | 308 | unsigned long irix_thread_id(void) |
322 | { | 309 | { |
323 | unsigned long ret; | 310 | unsigned long ret; |
324 | 311 | ||
@@ -330,14 +317,16 @@ unsigned long irix_thread_id() | |||
330 | /* Linux and a few others */ | 317 | /* Linux and a few others */ |
331 | #ifdef PTHREADS | 318 | #ifdef PTHREADS |
332 | 319 | ||
333 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | 320 | static pthread_mutex_t *lock_cs; |
334 | static long lock_count[CRYPTO_NUM_LOCKS]; | 321 | static long *lock_count; |
335 | 322 | ||
336 | void CRYPTO_thread_setup() | 323 | void CRYPTO_thread_setup(void) |
337 | { | 324 | { |
338 | int i; | 325 | int i; |
339 | 326 | ||
340 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 327 | lock_cs=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t)); |
328 | lock_count=OPENSSL_malloc(CRYPTO_num_locks() * sizeof(long)); | ||
329 | for (i=0; i<CRYPTO_num_locks(); i++) | ||
341 | { | 330 | { |
342 | lock_count[i]=0; | 331 | lock_count[i]=0; |
343 | pthread_mutex_init(&(lock_cs[i]),NULL); | 332 | pthread_mutex_init(&(lock_cs[i]),NULL); |
@@ -347,22 +336,21 @@ void CRYPTO_thread_setup() | |||
347 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); | 336 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); |
348 | } | 337 | } |
349 | 338 | ||
350 | void thread_cleanup() | 339 | void thread_cleanup(void) |
351 | { | 340 | { |
352 | int i; | 341 | int i; |
353 | 342 | ||
354 | CRYPTO_set_locking_callback(NULL); | 343 | CRYPTO_set_locking_callback(NULL); |
355 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | 344 | for (i=0; i<CRYPTO_num_locks(); i++) |
356 | { | 345 | { |
357 | pthread_mutex_destroy(&(lock_cs[i])); | 346 | pthread_mutex_destroy(&(lock_cs[i])); |
358 | } | 347 | } |
348 | OPENSSL_free(lock_cs); | ||
349 | OPENSSL_free(lock_count); | ||
359 | } | 350 | } |
360 | 351 | ||
361 | void pthreads_locking_callback(mode,type,file,line) | 352 | void pthreads_locking_callback(int mode, int type, char *file, |
362 | int mode; | 353 | int line) |
363 | int type; | ||
364 | char *file; | ||
365 | int line; | ||
366 | { | 354 | { |
367 | #if 0 | 355 | #if 0 |
368 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | 356 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", |
@@ -387,7 +375,7 @@ int line; | |||
387 | } | 375 | } |
388 | } | 376 | } |
389 | 377 | ||
390 | unsigned long pthreads_thread_id() | 378 | unsigned long pthreads_thread_id(void) |
391 | { | 379 | { |
392 | unsigned long ret; | 380 | unsigned long ret; |
393 | 381 | ||
diff --git a/src/lib/libcrypto/tmdiff.c b/src/lib/libcrypto/tmdiff.c index b93799fc03..7ebf2b202a 100644 --- a/src/lib/libcrypto/tmdiff.c +++ b/src/lib/libcrypto/tmdiff.c | |||
@@ -57,41 +57,45 @@ | |||
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
60 | #include "cryptlib.h" | ||
61 | #include <openssl/tmdiff.h> | ||
60 | 62 | ||
61 | #ifndef MSDOS | 63 | #ifdef TIMEB |
62 | # ifndef WIN32 | 64 | #undef OPENSSL_SYS_WIN32 |
63 | # define TIMES | 65 | #undef TIMES |
64 | # endif | ||
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | #ifndef VMS | 68 | #if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS) || defined(__DECC) && !defined(OPENSSL_SYS_MACOSX) && !defined(OPENSSL_SYS_VXWORKS) |
68 | # ifndef _IRIX | 69 | # define TIMES |
69 | # include <time.h> | 70 | #endif |
70 | # endif | 71 | |
71 | # ifdef TIMES | 72 | #ifndef _IRIX |
72 | # include <sys/types.h> | 73 | # include <time.h> |
73 | # include <sys/times.h> | 74 | #endif |
74 | # endif | 75 | #ifdef TIMES |
75 | #else /* VMS */ | 76 | # include <sys/types.h> |
76 | # include <types.h> | 77 | # include <sys/times.h> |
77 | struct tms { | 78 | #endif |
78 | time_t tms_utime; | 79 | |
79 | time_t tms_stime; | 80 | /* Depending on the VMS version, the tms structure is perhaps defined. |
80 | time_t tms_uchild; /* I dunno... */ | 81 | The __TMS macro will show if it was. If it wasn't defined, we should |
81 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 82 | undefine TIMES, since that tells the rest of the program how things |
82 | } | 83 | should be handled. -- Richard Levitte */ |
83 | #endif /* VMS */ | 84 | #if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) |
84 | 85 | #undef TIMES | |
85 | #ifdef sun | 86 | #endif |
87 | |||
88 | #if defined(sun) || defined(__ultrix) | ||
89 | #define _POSIX_SOURCE | ||
86 | #include <limits.h> | 90 | #include <limits.h> |
87 | #include <sys/param.h> | 91 | #include <sys/param.h> |
88 | #endif | 92 | #endif |
89 | 93 | ||
90 | #ifndef TIMES | 94 | #if !defined(TIMES) && !defined(OPENSSL_SYS_VXWORKS) |
91 | #include <sys/timeb.h> | 95 | #include <sys/timeb.h> |
92 | #endif | 96 | #endif |
93 | 97 | ||
94 | #ifdef WIN32 | 98 | #ifdef OPENSSL_SYS_WIN32 |
95 | #include <windows.h> | 99 | #include <windows.h> |
96 | #endif | 100 | #endif |
97 | 101 | ||
@@ -99,11 +103,7 @@ | |||
99 | #ifndef HZ | 103 | #ifndef HZ |
100 | # ifndef CLK_TCK | 104 | # ifndef CLK_TCK |
101 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ | 105 | # ifndef _BSD_CLK_TCK_ /* FreeBSD hack */ |
102 | # ifndef VMS | 106 | # define HZ 100.0 |
103 | # define HZ 100.0 | ||
104 | # else /* VMS */ | ||
105 | # define HZ 100.0 | ||
106 | # endif | ||
107 | # else /* _BSD_CLK_TCK_ */ | 107 | # else /* _BSD_CLK_TCK_ */ |
108 | # define HZ ((double)_BSD_CLK_TCK_) | 108 | # define HZ ((double)_BSD_CLK_TCK_) |
109 | # endif | 109 | # endif |
@@ -117,57 +117,62 @@ typedef struct ms_tm | |||
117 | #ifdef TIMES | 117 | #ifdef TIMES |
118 | struct tms ms_tms; | 118 | struct tms ms_tms; |
119 | #else | 119 | #else |
120 | # ifdef WIN32 | 120 | # ifdef OPENSSL_SYS_WIN32 |
121 | HANDLE thread_id; | 121 | HANDLE thread_id; |
122 | FILETIME ms_win32; | 122 | FILETIME ms_win32; |
123 | # else | 123 | # else |
124 | # ifdef OPENSSL_SYS_VSWORKS | ||
125 | unsigned long ticks; | ||
126 | # else | ||
124 | struct timeb ms_timeb; | 127 | struct timeb ms_timeb; |
128 | # endif | ||
125 | # endif | 129 | # endif |
126 | #endif | 130 | #endif |
127 | } MS_TM; | 131 | } MS_TM; |
128 | 132 | ||
129 | char *ms_time_init() | 133 | char *ms_time_new(void) |
130 | { | 134 | { |
131 | MS_TM *ret; | 135 | MS_TM *ret; |
132 | 136 | ||
133 | ret=malloc(sizeof(MS_TM)); | 137 | ret=(MS_TM *)OPENSSL_malloc(sizeof(MS_TM)); |
134 | if (ret == NULL) | 138 | if (ret == NULL) |
135 | return(NULL); | 139 | return(NULL); |
136 | memset(ret,0,sizeof(MS_TM)); | 140 | memset(ret,0,sizeof(MS_TM)); |
137 | #ifdef WIN32 | 141 | #ifdef OPENSSL_SYS_WIN32 |
138 | ret->thread_id=GetCurrentThread(); | 142 | ret->thread_id=GetCurrentThread(); |
139 | #endif | 143 | #endif |
140 | return((char *)ret); | 144 | return((char *)ret); |
141 | } | 145 | } |
142 | 146 | ||
143 | void ms_time_final(a) | 147 | void ms_time_free(char *a) |
144 | char *a; | ||
145 | { | 148 | { |
146 | if (a != NULL) | 149 | if (a != NULL) |
147 | free(a); | 150 | OPENSSL_free(a); |
148 | } | 151 | } |
149 | 152 | ||
150 | void ms_time_get(a) | 153 | void ms_time_get(char *a) |
151 | char *a; | ||
152 | { | 154 | { |
153 | MS_TM *tm=(MS_TM *)a; | 155 | MS_TM *tm=(MS_TM *)a; |
154 | FILETIME tmpa,tmpb,tmpc; | 156 | #ifdef OPENSSL_SYS_WIN32 |
157 | FILETIME tmpa,tmpb,tmpc; | ||
158 | #endif | ||
155 | 159 | ||
156 | #ifdef TIMES | 160 | #ifdef TIMES |
157 | printf("AAA\n"); | ||
158 | times(&tm->ms_tms); | 161 | times(&tm->ms_tms); |
159 | #else | 162 | #else |
160 | # ifdef WIN32 | 163 | # ifdef OPENSSL_SYS_WIN32 |
161 | GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32)); | 164 | GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32)); |
162 | # else | 165 | # else |
163 | printf("CCC\n"); | 166 | # ifdef OPENSSL_SYS_VSWORKS |
164 | ftime(tm->ms_timeb); | 167 | tm->ticks = tickGet(); |
168 | # else | ||
169 | ftime(&tm->ms_timeb); | ||
170 | # endif | ||
165 | # endif | 171 | # endif |
166 | #endif | 172 | #endif |
167 | } | 173 | } |
168 | 174 | ||
169 | double ms_time_diff(ap,bp) | 175 | double ms_time_diff(char *ap, char *bp) |
170 | char *ap,*bp; | ||
171 | { | 176 | { |
172 | MS_TM *a=(MS_TM *)ap; | 177 | MS_TM *a=(MS_TM *)ap; |
173 | MS_TM *b=(MS_TM *)bp; | 178 | MS_TM *b=(MS_TM *)bp; |
@@ -176,20 +181,35 @@ char *ap,*bp; | |||
176 | #ifdef TIMES | 181 | #ifdef TIMES |
177 | ret=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ; | 182 | ret=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ; |
178 | #else | 183 | #else |
179 | # ifdef WIN32 | 184 | # ifdef OPENSSL_SYS_WIN32 |
180 | ret =(double)(b->ms_win32.dwHighDateTime&0x000fffff)*10+ | 185 | { |
181 | b->ms_win32.dwLowDateTime/1e7; | 186 | #ifdef __GNUC__ |
182 | ret-=(double)(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7; | 187 | signed long long la,lb; |
188 | #else | ||
189 | signed _int64 la,lb; | ||
190 | #endif | ||
191 | la=a->ms_win32.dwHighDateTime; | ||
192 | lb=b->ms_win32.dwHighDateTime; | ||
193 | la<<=32; | ||
194 | lb<<=32; | ||
195 | la+=a->ms_win32.dwLowDateTime; | ||
196 | lb+=b->ms_win32.dwLowDateTime; | ||
197 | ret=((double)(lb-la))/1e7; | ||
198 | } | ||
183 | # else | 199 | # else |
184 | ret= (double)(b->time-a->time)+ | 200 | # ifdef OPENSSL_SYS_VSWORKS |
185 | ((double)((unsigned long)b->mullitm-(unsigned long)))/1000.0; | 201 | ret = (double)(b->ticks - a->ticks) / (double)sysClkRateGet(); |
202 | # else | ||
203 | ret= (double)(b->ms_timeb.time-a->ms_timeb.time)+ | ||
204 | (((double)b->ms_timeb.millitm)- | ||
205 | ((double)a->ms_timeb.millitm))/1000.0; | ||
186 | # endif | 206 | # endif |
207 | # endif | ||
187 | #endif | 208 | #endif |
188 | return((ret < 0.0000001)?0.0000001:ret); | 209 | return((ret < 0.0000001)?0.0000001:ret); |
189 | } | 210 | } |
190 | 211 | ||
191 | int ms_time_cmp(ap,bp) | 212 | int ms_time_cmp(char *ap, char *bp) |
192 | char *ap,*bp; | ||
193 | { | 213 | { |
194 | MS_TM *a=(MS_TM *)ap,*b=(MS_TM *)bp; | 214 | MS_TM *a=(MS_TM *)ap,*b=(MS_TM *)bp; |
195 | double d; | 215 | double d; |
@@ -198,13 +218,17 @@ char *ap,*bp; | |||
198 | #ifdef TIMES | 218 | #ifdef TIMES |
199 | d=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ; | 219 | d=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ; |
200 | #else | 220 | #else |
201 | # ifdef WIN32 | 221 | # ifdef OPENSSL_SYS_WIN32 |
202 | d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7; | 222 | d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7; |
203 | d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7; | 223 | d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7; |
204 | # else | 224 | # else |
205 | d= (double)(b->time-a->time)+ | 225 | # ifdef OPENSSL_SYS_VSWORKS |
206 | ((double)((unsigned long)b->mullitm-(unsigned long)))/1000.0; | 226 | d = (b->ticks - a->ticks); |
227 | # else | ||
228 | d= (double)(b->ms_timeb.time-a->ms_timeb.time)+ | ||
229 | (((double)b->ms_timeb.millitm)-(double)a->ms_timeb.millitm)/1000.0; | ||
207 | # endif | 230 | # endif |
231 | # endif | ||
208 | #endif | 232 | #endif |
209 | if (d == 0.0) | 233 | if (d == 0.0) |
210 | ret=0; | 234 | ret=0; |
diff --git a/src/lib/libcrypto/uid.c b/src/lib/libcrypto/uid.c index b5b61b76d4..d3d249c36f 100644 --- a/src/lib/libcrypto/uid.c +++ b/src/lib/libcrypto/uid.c | |||
@@ -54,17 +54,18 @@ | |||
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <openssl/crypto.h> | 56 | #include <openssl/crypto.h> |
57 | #include <openssl/opensslconf.h> | ||
57 | 58 | ||
58 | #if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) | 59 | #if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) |
59 | 60 | ||
60 | #include <unistd.h> | 61 | #include OPENSSL_UNISTD |
61 | 62 | ||
62 | int OPENSSL_issetugid(void) | 63 | int OPENSSL_issetugid(void) |
63 | { | 64 | { |
64 | return issetugid(); | 65 | return issetugid(); |
65 | } | 66 | } |
66 | 67 | ||
67 | #elif defined(WIN32) | 68 | #elif defined(OPENSSL_SYS_WIN32) |
68 | 69 | ||
69 | int OPENSSL_issetugid(void) | 70 | int OPENSSL_issetugid(void) |
70 | { | 71 | { |
@@ -73,7 +74,7 @@ int OPENSSL_issetugid(void) | |||
73 | 74 | ||
74 | #else | 75 | #else |
75 | 76 | ||
76 | #include <unistd.h> | 77 | #include OPENSSL_UNISTD |
77 | #include <sys/types.h> | 78 | #include <sys/types.h> |
78 | 79 | ||
79 | int OPENSSL_issetugid(void) | 80 | int OPENSSL_issetugid(void) |
diff --git a/src/lib/libcrypto/util/add_cr.pl b/src/lib/libcrypto/util/add_cr.pl index ddd6d61e2d..c7b62c11ec 100644 --- a/src/lib/libcrypto/util/add_cr.pl +++ b/src/lib/libcrypto/util/add_cr.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # This adds a copyright message to a souce code file. | 3 | # This adds a copyright message to a souce code file. |
4 | # It also gets the file name correct. | 4 | # It also gets the file name correct. |
diff --git a/src/lib/libcrypto/util/ck_errf.pl b/src/lib/libcrypto/util/ck_errf.pl index c5764e40df..7a24d6c5a2 100644 --- a/src/lib/libcrypto/util/ck_errf.pl +++ b/src/lib/libcrypto/util/ck_errf.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # This is just a quick script to scan for cases where the 'error' | 3 | # This is just a quick script to scan for cases where the 'error' |
4 | # function name in a XXXerr() macro is wrong. | 4 | # function name in a XXXerr() macro is wrong. |
@@ -40,5 +40,6 @@ foreach $file (@ARGV) | |||
40 | # print "$func:$1\n"; | 40 | # print "$func:$1\n"; |
41 | } | 41 | } |
42 | } | 42 | } |
43 | close(IN); | ||
43 | } | 44 | } |
44 | 45 | ||
diff --git a/src/lib/libcrypto/util/clean-depend.pl b/src/lib/libcrypto/util/clean-depend.pl index af676af751..6c485d1e2f 100644 --- a/src/lib/libcrypto/util/clean-depend.pl +++ b/src/lib/libcrypto/util/clean-depend.pl | |||
@@ -11,20 +11,36 @@ while(<STDIN>) { | |||
11 | 11 | ||
12 | my %files; | 12 | my %files; |
13 | 13 | ||
14 | my $thisfile=""; | ||
14 | while(<STDIN>) { | 15 | while(<STDIN>) { |
15 | my ($file,$deps)=/^(.*): (.*)$/; | 16 | my ($dummy, $file,$deps)=/^((.*):)? (.*)$/; |
17 | my $origfile=""; | ||
18 | $thisfile=$file if defined $file; | ||
16 | next if !defined $deps; | 19 | next if !defined $deps; |
20 | $origfile=$thisfile; | ||
21 | $origfile=~s/\.o$/.c/; | ||
17 | my @deps=split ' ',$deps; | 22 | my @deps=split ' ',$deps; |
18 | @deps=grep(!/^\/usr\/include/,@deps); | 23 | @deps=grep(!/^\//,@deps); |
19 | @deps=grep(!/^\/usr\/lib\/gcc-lib/,@deps); | 24 | @deps=grep(!/^\\$/,@deps); |
20 | push @{$files{$file}},@deps; | 25 | @deps=grep(!/^$origfile$/,@deps); |
26 | # pull out the kludged kerberos header (if present). | ||
27 | @deps=grep(!/^[.\/]+\/krb5.h/,@deps); | ||
28 | push @{$files{$thisfile}},@deps; | ||
21 | } | 29 | } |
22 | 30 | ||
23 | my $file; | 31 | my $file; |
24 | foreach $file (sort keys %files) { | 32 | foreach $file (sort keys %files) { |
25 | my $len=0; | 33 | my $len=0; |
26 | my $dep; | 34 | my $dep; |
35 | my $origfile=$file; | ||
36 | $origfile=~s/\.o$/.c/; | ||
37 | $file=~s/^\.\///; | ||
38 | push @{$files{$file}},$origfile; | ||
39 | my $prevdep=""; | ||
27 | foreach $dep (sort @{$files{$file}}) { | 40 | foreach $dep (sort @{$files{$file}}) { |
41 | $dep=~s/^\.\///; | ||
42 | next if $prevdep eq $dep; # to exterminate duplicates... | ||
43 | $prevdep = $dep; | ||
28 | $len=0 if $len+length($dep)+1 >= 80; | 44 | $len=0 if $len+length($dep)+1 >= 80; |
29 | if($len == 0) { | 45 | if($len == 0) { |
30 | print "\n$file:"; | 46 | print "\n$file:"; |
diff --git a/src/lib/libcrypto/util/deleof.pl b/src/lib/libcrypto/util/deleof.pl index 04f30f0e47..155acd88ff 100644 --- a/src/lib/libcrypto/util/deleof.pl +++ b/src/lib/libcrypto/util/deleof.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | while (<>) | 3 | while (<>) |
4 | { | 4 | { |
diff --git a/src/lib/libcrypto/util/do_ms.sh b/src/lib/libcrypto/util/do_ms.sh index f498d842b7..515b074cff 100644 --- a/src/lib/libcrypto/util/do_ms.sh +++ b/src/lib/libcrypto/util/do_ms.sh | |||
@@ -5,11 +5,13 @@ | |||
5 | 5 | ||
6 | PATH=util:../util:$PATH | 6 | PATH=util:../util:$PATH |
7 | 7 | ||
8 | # perl util/mk1mf.pl VC-MSDOS no-sock >ms/msdos.mak | 8 | # perl util/mk1mf.pl no-sock VC-MSDOS >ms/msdos.mak |
9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak | 9 | # perl util/mk1mf.pl VC-W31-32 >ms/w31.mak |
10 | perl util/mk1mf.pl VC-WIN16 dll >ms/w31dll.mak | 10 | perl util/mk1mf.pl dll VC-WIN16 >ms/w31dll.mak |
11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak | 11 | # perl util/mk1mf.pl VC-WIN32 >ms/nt.mak |
12 | perl util/mk1mf.pl VC-WIN32 dll >ms/ntdll.mak | 12 | perl util/mk1mf.pl dll VC-WIN32 >ms/ntdll.mak |
13 | perl util/mk1mf.pl Mingw32 >ms/mingw32.mak | ||
14 | perl util/mk1mf.pl Mingw32-files >ms/mingw32f.mak | ||
13 | 15 | ||
14 | perl util/mkdef.pl 16 libeay > ms/libeay16.def | 16 | perl util/mkdef.pl 16 libeay > ms/libeay16.def |
15 | perl util/mkdef.pl 32 libeay > ms/libeay32.def | 17 | perl util/mkdef.pl 32 libeay > ms/libeay32.def |
diff --git a/src/lib/libcrypto/util/domd b/src/lib/libcrypto/util/domd index 324051f60b..aa99cb0523 100644 --- a/src/lib/libcrypto/util/domd +++ b/src/lib/libcrypto/util/domd | |||
@@ -4,8 +4,26 @@ | |||
4 | 4 | ||
5 | TOP=$1 | 5 | TOP=$1 |
6 | shift | 6 | shift |
7 | if [ "$1" = "-MD" ]; then | ||
8 | shift | ||
9 | MAKEDEPEND=$1 | ||
10 | shift | ||
11 | fi | ||
12 | if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi | ||
7 | 13 | ||
8 | cp Makefile.ssl Makefile.save | 14 | cp Makefile.ssl Makefile.save |
9 | makedepend -f Makefile.ssl $@ | 15 | # fake the presence of Kerberos |
10 | $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new | 16 | touch $TOP/krb5.h |
17 | if [ "$MAKEDEPEND" = "gcc" ]; then | ||
18 | sed -e '/^# DO NOT DELETE.*/,$d' < Makefile.ssl > Makefile.tmp | ||
19 | echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp | ||
20 | gcc -D OPENSSL_DOING_MAKEDEPEND -M $@ >> Makefile.tmp | ||
21 | perl $TOP/util/clean-depend.pl < Makefile.tmp > Makefile.new | ||
22 | rm -f Makefile.tmp | ||
23 | else | ||
24 | ${MAKEDEPEND} -D OPENSSL_DOING_MAKEDEPEND -f Makefile.ssl $@ | ||
25 | perl $TOP/util/clean-depend.pl < Makefile.ssl > Makefile.new | ||
26 | fi | ||
11 | mv Makefile.new Makefile.ssl | 27 | mv Makefile.new Makefile.ssl |
28 | # unfake the presence of Kerberos | ||
29 | rm $TOP/krb5.h | ||
diff --git a/src/lib/libcrypto/util/err-ins.pl b/src/lib/libcrypto/util/err-ins.pl index db1bb48275..31b70df8d0 100644 --- a/src/lib/libcrypto/util/err-ins.pl +++ b/src/lib/libcrypto/util/err-ins.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # tack error codes onto the end of a file | 3 | # tack error codes onto the end of a file |
4 | # | 4 | # |
diff --git a/src/lib/libcrypto/util/files.pl b/src/lib/libcrypto/util/files.pl index bf3b7effdc..41f033e3b9 100644 --- a/src/lib/libcrypto/util/files.pl +++ b/src/lib/libcrypto/util/files.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # used to generate the file MINFO for use by util/mk1mf.pl | 3 | # used to generate the file MINFO for use by util/mk1mf.pl |
4 | # It is basically a list of all variables from the passed makefile | 4 | # It is basically a list of all variables from the passed makefile |
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num index fcaf254287..b74749e5de 100644 --- a/src/lib/libcrypto/util/libeay.num +++ b/src/lib/libcrypto/util/libeay.num | |||
@@ -1,1065 +1,2776 @@ | |||
1 | SSLeay 1 | 1 | SSLeay 1 EXIST::FUNCTION: |
2 | SSLeay_version 2 | 2 | SSLeay_version 2 EXIST::FUNCTION: |
3 | ASN1_BIT_STRING_asn1_meth 3 | 3 | ASN1_BIT_STRING_asn1_meth 3 EXIST::FUNCTION: |
4 | ASN1_HEADER_free 4 | 4 | ASN1_HEADER_free 4 EXIST::FUNCTION: |
5 | ASN1_HEADER_new 5 | 5 | ASN1_HEADER_new 5 EXIST::FUNCTION: |
6 | ASN1_IA5STRING_asn1_meth 6 | 6 | ASN1_IA5STRING_asn1_meth 6 EXIST::FUNCTION: |
7 | ASN1_INTEGER_get 7 | 7 | ASN1_INTEGER_get 7 EXIST::FUNCTION: |
8 | ASN1_INTEGER_set 8 | 8 | ASN1_INTEGER_set 8 EXIST::FUNCTION: |
9 | ASN1_INTEGER_to_BN 9 | 9 | ASN1_INTEGER_to_BN 9 EXIST::FUNCTION: |
10 | ASN1_OBJECT_create 10 | 10 | ASN1_OBJECT_create 10 EXIST::FUNCTION: |
11 | ASN1_OBJECT_free 11 | 11 | ASN1_OBJECT_free 11 EXIST::FUNCTION: |
12 | ASN1_OBJECT_new 12 | 12 | ASN1_OBJECT_new 12 EXIST::FUNCTION: |
13 | ASN1_PRINTABLE_type 13 | 13 | ASN1_PRINTABLE_type 13 EXIST::FUNCTION: |
14 | ASN1_STRING_cmp 14 | 14 | ASN1_STRING_cmp 14 EXIST::FUNCTION: |
15 | ASN1_STRING_dup 15 | 15 | ASN1_STRING_dup 15 EXIST::FUNCTION: |
16 | ASN1_STRING_free 16 | 16 | ASN1_STRING_free 16 EXIST::FUNCTION: |
17 | ASN1_STRING_new 17 | 17 | ASN1_STRING_new 17 EXIST::FUNCTION: |
18 | ASN1_STRING_print 18 | 18 | ASN1_STRING_print 18 EXIST::FUNCTION:BIO |
19 | ASN1_STRING_set 19 | 19 | ASN1_STRING_set 19 EXIST::FUNCTION: |
20 | ASN1_STRING_type_new 20 | 20 | ASN1_STRING_type_new 20 EXIST::FUNCTION: |
21 | ASN1_TYPE_free 21 | 21 | ASN1_TYPE_free 21 EXIST::FUNCTION: |
22 | ASN1_TYPE_new 22 | 22 | ASN1_TYPE_new 22 EXIST::FUNCTION: |
23 | ASN1_UNIVERSALSTRING_to_string 23 | 23 | ASN1_UNIVERSALSTRING_to_string 23 EXIST::FUNCTION: |
24 | ASN1_UTCTIME_check 24 | 24 | ASN1_UTCTIME_check 24 EXIST::FUNCTION: |
25 | ASN1_UTCTIME_print 25 | 25 | ASN1_UTCTIME_print 25 EXIST::FUNCTION:BIO |
26 | ASN1_UTCTIME_set 26 | 26 | ASN1_UTCTIME_set 26 EXIST::FUNCTION: |
27 | ASN1_check_infinite_end 27 | 27 | ASN1_check_infinite_end 27 EXIST::FUNCTION: |
28 | ASN1_d2i_bio 28 | 28 | ASN1_d2i_bio 28 EXIST::FUNCTION:BIO |
29 | ASN1_d2i_fp 29 | 29 | ASN1_d2i_fp 29 EXIST::FUNCTION:FP_API |
30 | ASN1_digest 30 | 30 | ASN1_digest 30 EXIST::FUNCTION:EVP |
31 | ASN1_dup 31 | 31 | ASN1_dup 31 EXIST::FUNCTION: |
32 | ASN1_get_object 32 | 32 | ASN1_get_object 32 EXIST::FUNCTION: |
33 | ASN1_i2d_bio 33 | 33 | ASN1_i2d_bio 33 EXIST::FUNCTION:BIO |
34 | ASN1_i2d_fp 34 | 34 | ASN1_i2d_fp 34 EXIST::FUNCTION:FP_API |
35 | ASN1_object_size 35 | 35 | ASN1_object_size 35 EXIST::FUNCTION: |
36 | ASN1_parse 36 | 36 | ASN1_parse 36 EXIST::FUNCTION:BIO |
37 | ASN1_put_object 37 | 37 | ASN1_put_object 37 EXIST::FUNCTION: |
38 | ASN1_sign 38 | 38 | ASN1_sign 38 EXIST::FUNCTION:EVP |
39 | ASN1_verify 39 | 39 | ASN1_verify 39 EXIST::FUNCTION:EVP |
40 | BF_cbc_encrypt 40 | 40 | BF_cbc_encrypt 40 EXIST::FUNCTION:BF |
41 | BF_cfb64_encrypt 41 | 41 | BF_cfb64_encrypt 41 EXIST::FUNCTION:BF |
42 | BF_ecb_encrypt 42 | 42 | BF_ecb_encrypt 42 EXIST::FUNCTION:BF |
43 | BF_encrypt 43 | 43 | BF_encrypt 43 EXIST::FUNCTION:BF |
44 | BF_ofb64_encrypt 44 | 44 | BF_ofb64_encrypt 44 EXIST::FUNCTION:BF |
45 | BF_options 45 | 45 | BF_options 45 EXIST::FUNCTION:BF |
46 | BF_set_key 46 | 46 | BF_set_key 46 EXIST::FUNCTION:BF |
47 | BIO_CONNECT_free 47 | 47 | BIO_CONNECT_free 47 NOEXIST::FUNCTION: |
48 | BIO_CONNECT_new 48 | 48 | BIO_CONNECT_new 48 NOEXIST::FUNCTION: |
49 | BIO_accept 51 | 49 | BIO_accept 51 EXIST::FUNCTION: |
50 | BIO_ctrl 52 | 50 | BIO_ctrl 52 EXIST::FUNCTION: |
51 | BIO_int_ctrl 53 | 51 | BIO_int_ctrl 53 EXIST::FUNCTION: |
52 | BIO_debug_callback 54 | 52 | BIO_debug_callback 54 EXIST::FUNCTION: |
53 | BIO_dump 55 | 53 | BIO_dump 55 EXIST::FUNCTION: |
54 | BIO_dup_chain 56 | 54 | BIO_dup_chain 56 EXIST::FUNCTION: |
55 | BIO_f_base64 57 | 55 | BIO_f_base64 57 EXIST::FUNCTION:BIO |
56 | BIO_f_buffer 58 | 56 | BIO_f_buffer 58 EXIST::FUNCTION: |
57 | BIO_f_cipher 59 | 57 | BIO_f_cipher 59 EXIST::FUNCTION:BIO |
58 | BIO_f_md 60 | 58 | BIO_f_md 60 EXIST::FUNCTION:BIO |
59 | BIO_f_null 61 | 59 | BIO_f_null 61 EXIST::FUNCTION: |
60 | BIO_f_proxy_server 62 | 60 | BIO_f_proxy_server 62 NOEXIST::FUNCTION: |
61 | BIO_fd_non_fatal_error 63 | 61 | BIO_fd_non_fatal_error 63 EXIST::FUNCTION: |
62 | BIO_fd_should_retry 64 | 62 | BIO_fd_should_retry 64 EXIST::FUNCTION: |
63 | BIO_find_type 65 | 63 | BIO_find_type 65 EXIST::FUNCTION: |
64 | BIO_free 66 | 64 | BIO_free 66 EXIST::FUNCTION: |
65 | BIO_free_all 67 | 65 | BIO_free_all 67 EXIST::FUNCTION: |
66 | BIO_get_accept_socket 69 | 66 | BIO_get_accept_socket 69 EXIST::FUNCTION: |
67 | BIO_get_filter_bio 70 | 67 | BIO_get_filter_bio 70 NOEXIST::FUNCTION: |
68 | BIO_get_host_ip 71 | 68 | BIO_get_host_ip 71 EXIST::FUNCTION: |
69 | BIO_get_port 72 | 69 | BIO_get_port 72 EXIST::FUNCTION: |
70 | BIO_get_retry_BIO 73 | 70 | BIO_get_retry_BIO 73 EXIST::FUNCTION: |
71 | BIO_get_retry_reason 74 | 71 | BIO_get_retry_reason 74 EXIST::FUNCTION: |
72 | BIO_gethostbyname 75 | 72 | BIO_gethostbyname 75 EXIST::FUNCTION: |
73 | BIO_gets 76 | 73 | BIO_gets 76 EXIST::FUNCTION: |
74 | BIO_new 78 | 74 | BIO_new 78 EXIST::FUNCTION: |
75 | BIO_new_accept 79 | 75 | BIO_new_accept 79 EXIST::FUNCTION: |
76 | BIO_new_connect 80 | 76 | BIO_new_connect 80 EXIST::FUNCTION: |
77 | BIO_new_fd 81 | 77 | BIO_new_fd 81 EXIST::FUNCTION: |
78 | BIO_new_file 82 | 78 | BIO_new_file 82 EXIST:!WIN16:FUNCTION:FP_API |
79 | BIO_new_fp 83 | 79 | BIO_new_fp 83 EXIST:!WIN16:FUNCTION:FP_API |
80 | BIO_new_socket 84 | 80 | BIO_new_socket 84 EXIST::FUNCTION: |
81 | BIO_pop 85 | 81 | BIO_pop 85 EXIST::FUNCTION: |
82 | BIO_printf 86 | 82 | BIO_printf 86 EXIST::FUNCTION: |
83 | BIO_push 87 | 83 | BIO_push 87 EXIST::FUNCTION: |
84 | BIO_puts 88 | 84 | BIO_puts 88 EXIST::FUNCTION: |
85 | BIO_read 89 | 85 | BIO_read 89 EXIST::FUNCTION: |
86 | BIO_s_accept 90 | 86 | BIO_s_accept 90 EXIST::FUNCTION: |
87 | BIO_s_connect 91 | 87 | BIO_s_connect 91 EXIST::FUNCTION: |
88 | BIO_s_fd 92 | 88 | BIO_s_fd 92 EXIST::FUNCTION: |
89 | BIO_s_file 93 | 89 | BIO_s_file 93 EXIST:!WIN16:FUNCTION:FP_API |
90 | BIO_s_mem 95 | 90 | BIO_s_mem 95 EXIST::FUNCTION: |
91 | BIO_s_null 96 | 91 | BIO_s_null 96 EXIST::FUNCTION: |
92 | BIO_s_proxy_client 97 | 92 | BIO_s_proxy_client 97 NOEXIST::FUNCTION: |
93 | BIO_s_socket 98 | 93 | BIO_s_socket 98 EXIST::FUNCTION: |
94 | BIO_set 100 | 94 | BIO_set 100 EXIST::FUNCTION: |
95 | BIO_set_cipher 101 | 95 | BIO_set_cipher 101 EXIST::FUNCTION:BIO |
96 | BIO_set_tcp_ndelay 102 | 96 | BIO_set_tcp_ndelay 102 EXIST::FUNCTION: |
97 | BIO_sock_cleanup 103 | 97 | BIO_sock_cleanup 103 EXIST::FUNCTION: |
98 | BIO_sock_error 104 | 98 | BIO_sock_error 104 EXIST::FUNCTION: |
99 | BIO_sock_init 105 | 99 | BIO_sock_init 105 EXIST::FUNCTION: |
100 | BIO_sock_non_fatal_error 106 | 100 | BIO_sock_non_fatal_error 106 EXIST::FUNCTION: |
101 | BIO_sock_should_retry 107 | 101 | BIO_sock_should_retry 107 EXIST::FUNCTION: |
102 | BIO_socket_ioctl 108 | 102 | BIO_socket_ioctl 108 EXIST::FUNCTION: |
103 | BIO_write 109 | 103 | BIO_write 109 EXIST::FUNCTION: |
104 | BN_CTX_free 110 | 104 | BN_CTX_free 110 EXIST::FUNCTION: |
105 | BN_CTX_new 111 | 105 | BN_CTX_new 111 EXIST::FUNCTION: |
106 | BN_MONT_CTX_free 112 | 106 | BN_MONT_CTX_free 112 EXIST::FUNCTION: |
107 | BN_MONT_CTX_new 113 | 107 | BN_MONT_CTX_new 113 EXIST::FUNCTION: |
108 | BN_MONT_CTX_set 114 | 108 | BN_MONT_CTX_set 114 EXIST::FUNCTION: |
109 | BN_add 115 | 109 | BN_add 115 EXIST::FUNCTION: |
110 | BN_add_word 116 | 110 | BN_add_word 116 EXIST::FUNCTION: |
111 | BN_hex2bn 117 | 111 | BN_hex2bn 117 EXIST::FUNCTION: |
112 | BN_bin2bn 118 | 112 | BN_bin2bn 118 EXIST::FUNCTION: |
113 | BN_bn2hex 119 | 113 | BN_bn2hex 119 EXIST::FUNCTION: |
114 | BN_bn2bin 120 | 114 | BN_bn2bin 120 EXIST::FUNCTION: |
115 | BN_clear 121 | 115 | BN_clear 121 EXIST::FUNCTION: |
116 | BN_clear_bit 122 | 116 | BN_clear_bit 122 EXIST::FUNCTION: |
117 | BN_clear_free 123 | 117 | BN_clear_free 123 EXIST::FUNCTION: |
118 | BN_cmp 124 | 118 | BN_cmp 124 EXIST::FUNCTION: |
119 | BN_copy 125 | 119 | BN_copy 125 EXIST::FUNCTION: |
120 | BN_div 126 | 120 | BN_div 126 EXIST::FUNCTION: |
121 | BN_div_word 127 | 121 | BN_div_word 127 EXIST::FUNCTION: |
122 | BN_dup 128 | 122 | BN_dup 128 EXIST::FUNCTION: |
123 | BN_free 129 | 123 | BN_free 129 EXIST::FUNCTION: |
124 | BN_from_montgomery 130 | 124 | BN_from_montgomery 130 EXIST::FUNCTION: |
125 | BN_gcd 131 | 125 | BN_gcd 131 EXIST::FUNCTION: |
126 | BN_generate_prime 132 | 126 | BN_generate_prime 132 EXIST::FUNCTION: |
127 | BN_get_word 133 | 127 | BN_get_word 133 EXIST::FUNCTION: |
128 | BN_is_bit_set 134 | 128 | BN_is_bit_set 134 EXIST::FUNCTION: |
129 | BN_is_prime 135 | 129 | BN_is_prime 135 EXIST::FUNCTION: |
130 | BN_lshift 136 | 130 | BN_lshift 136 EXIST::FUNCTION: |
131 | BN_lshift1 137 | 131 | BN_lshift1 137 EXIST::FUNCTION: |
132 | BN_mask_bits 138 | 132 | BN_mask_bits 138 EXIST::FUNCTION: |
133 | BN_mod 139 | 133 | BN_mod 139 NOEXIST::FUNCTION: |
134 | BN_mod_exp 140 | 134 | BN_mod_exp 140 EXIST::FUNCTION: |
135 | BN_mod_exp_mont 141 | 135 | BN_mod_exp_mont 141 EXIST::FUNCTION: |
136 | BN_mod_exp_recp 142 | 136 | BN_mod_exp_simple 143 EXIST::FUNCTION: |
137 | BN_mod_exp_simple 143 | 137 | BN_mod_inverse 144 EXIST::FUNCTION: |
138 | BN_mod_inverse 144 | 138 | BN_mod_mul 145 EXIST::FUNCTION: |
139 | BN_mod_mul 145 | 139 | BN_mod_mul_montgomery 146 EXIST::FUNCTION: |
140 | BN_mod_mul_montgomery 146 | 140 | BN_mod_word 148 EXIST::FUNCTION: |
141 | BN_mod_mul_reciprocal 147 | 141 | BN_mul 149 EXIST::FUNCTION: |
142 | BN_mod_word 148 | 142 | BN_new 150 EXIST::FUNCTION: |
143 | BN_mul 149 | 143 | BN_num_bits 151 EXIST::FUNCTION: |
144 | BN_new 150 | 144 | BN_num_bits_word 152 EXIST::FUNCTION: |
145 | BN_num_bits 151 | 145 | BN_options 153 EXIST::FUNCTION: |
146 | BN_num_bits_word 152 | 146 | BN_print 154 EXIST::FUNCTION: |
147 | BN_options 153 | 147 | BN_print_fp 155 EXIST::FUNCTION:FP_API |
148 | BN_print 154 | 148 | BN_rand 156 EXIST::FUNCTION: |
149 | BN_print_fp 155 | 149 | BN_reciprocal 157 EXIST::FUNCTION: |
150 | BN_rand 156 | 150 | BN_rshift 158 EXIST::FUNCTION: |
151 | BN_reciprocal 157 | 151 | BN_rshift1 159 EXIST::FUNCTION: |
152 | BN_rshift 158 | 152 | BN_set_bit 160 EXIST::FUNCTION: |
153 | BN_rshift1 159 | 153 | BN_set_word 161 EXIST::FUNCTION: |
154 | BN_set_bit 160 | 154 | BN_sqr 162 EXIST::FUNCTION: |
155 | BN_set_word 161 | 155 | BN_sub 163 EXIST::FUNCTION: |
156 | BN_sqr 162 | 156 | BN_to_ASN1_INTEGER 164 EXIST::FUNCTION: |
157 | BN_sub 163 | 157 | BN_ucmp 165 EXIST::FUNCTION: |
158 | BN_to_ASN1_INTEGER 164 | 158 | BN_value_one 166 EXIST::FUNCTION: |
159 | BN_ucmp 165 | 159 | BUF_MEM_free 167 EXIST::FUNCTION: |
160 | BN_value_one 166 | 160 | BUF_MEM_grow 168 EXIST::FUNCTION: |
161 | BUF_MEM_free 167 | 161 | BUF_MEM_new 169 EXIST::FUNCTION: |
162 | BUF_MEM_grow 168 | 162 | BUF_strdup 170 EXIST::FUNCTION: |
163 | BUF_MEM_new 169 | 163 | CONF_free 171 EXIST::FUNCTION: |
164 | BUF_strdup 170 | 164 | CONF_get_number 172 EXIST::FUNCTION: |
165 | CONF_free 171 | 165 | CONF_get_section 173 EXIST::FUNCTION: |
166 | CONF_get_number 172 | 166 | CONF_get_string 174 EXIST::FUNCTION: |
167 | CONF_get_section 173 | 167 | CONF_load 175 EXIST::FUNCTION: |
168 | CONF_get_string 174 | 168 | CRYPTO_add_lock 176 EXIST::FUNCTION: |
169 | CONF_load 175 | 169 | CRYPTO_dbg_free 177 EXIST::FUNCTION: |
170 | CRYPTO_add_lock 176 | 170 | CRYPTO_dbg_malloc 178 EXIST::FUNCTION: |
171 | CRYPTO_dbg_free 177 | 171 | CRYPTO_dbg_realloc 179 EXIST::FUNCTION: |
172 | CRYPTO_dbg_malloc 178 | 172 | CRYPTO_dbg_remalloc 180 NOEXIST::FUNCTION: |
173 | CRYPTO_dbg_realloc 179 | 173 | CRYPTO_free 181 EXIST::FUNCTION: |
174 | CRYPTO_dbg_remalloc 180 | 174 | CRYPTO_get_add_lock_callback 182 EXIST::FUNCTION: |
175 | CRYPTO_free 181 | 175 | CRYPTO_get_id_callback 183 EXIST::FUNCTION: |
176 | CRYPTO_get_add_lock_callback 182 | 176 | CRYPTO_get_lock_name 184 EXIST::FUNCTION: |
177 | CRYPTO_get_id_callback 183 | 177 | CRYPTO_get_locking_callback 185 EXIST::FUNCTION: |
178 | CRYPTO_get_lock_name 184 | 178 | CRYPTO_get_mem_functions 186 EXIST::FUNCTION: |
179 | CRYPTO_get_locking_callback 185 | 179 | CRYPTO_lock 187 EXIST::FUNCTION: |
180 | CRYPTO_get_mem_functions 186 | 180 | CRYPTO_malloc 188 EXIST::FUNCTION: |
181 | CRYPTO_lock 187 | 181 | CRYPTO_mem_ctrl 189 EXIST::FUNCTION: |
182 | CRYPTO_malloc 188 | 182 | CRYPTO_mem_leaks 190 EXIST::FUNCTION: |
183 | CRYPTO_mem_ctrl 189 | 183 | CRYPTO_mem_leaks_cb 191 EXIST::FUNCTION: |
184 | CRYPTO_mem_leaks 190 | 184 | CRYPTO_mem_leaks_fp 192 EXIST::FUNCTION:FP_API |
185 | CRYPTO_mem_leaks_cb 191 | 185 | CRYPTO_realloc 193 EXIST::FUNCTION: |
186 | CRYPTO_mem_leaks_fp 192 | 186 | CRYPTO_remalloc 194 EXIST::FUNCTION: |
187 | CRYPTO_realloc 193 | 187 | CRYPTO_set_add_lock_callback 195 EXIST::FUNCTION: |
188 | CRYPTO_remalloc 194 | 188 | CRYPTO_set_id_callback 196 EXIST::FUNCTION: |
189 | CRYPTO_set_add_lock_callback 195 | 189 | CRYPTO_set_locking_callback 197 EXIST::FUNCTION: |
190 | CRYPTO_set_id_callback 196 | 190 | CRYPTO_set_mem_functions 198 EXIST::FUNCTION: |
191 | CRYPTO_set_locking_callback 197 | 191 | CRYPTO_thread_id 199 EXIST::FUNCTION: |
192 | CRYPTO_set_mem_functions 198 | 192 | DH_check 200 EXIST::FUNCTION:DH |
193 | CRYPTO_thread_id 199 | 193 | DH_compute_key 201 EXIST::FUNCTION:DH |
194 | DH_check 200 | 194 | DH_free 202 EXIST::FUNCTION:DH |
195 | DH_compute_key 201 | 195 | DH_generate_key 203 EXIST::FUNCTION:DH |
196 | DH_free 202 | 196 | DH_generate_parameters 204 EXIST::FUNCTION:DH |
197 | DH_generate_key 203 | 197 | DH_new 205 EXIST::FUNCTION:DH |
198 | DH_generate_parameters 204 | 198 | DH_size 206 EXIST::FUNCTION:DH |
199 | DH_new 205 | 199 | DHparams_print 207 EXIST::FUNCTION:BIO,DH |
200 | DH_size 206 | 200 | DHparams_print_fp 208 EXIST::FUNCTION:DH,FP_API |
201 | DHparams_print 207 | 201 | DSA_free 209 EXIST::FUNCTION:DSA |
202 | DHparams_print_fp 208 | 202 | DSA_generate_key 210 EXIST::FUNCTION:DSA |
203 | DSA_free 209 | 203 | DSA_generate_parameters 211 EXIST::FUNCTION:DSA |
204 | DSA_generate_key 210 | 204 | DSA_is_prime 212 NOEXIST::FUNCTION: |
205 | DSA_generate_parameters 211 | 205 | DSA_new 213 EXIST::FUNCTION:DSA |
206 | DSA_is_prime 212 | 206 | DSA_print 214 EXIST::FUNCTION:BIO,DSA |
207 | DSA_new 213 | 207 | DSA_print_fp 215 EXIST::FUNCTION:DSA,FP_API |
208 | DSA_print 214 | 208 | DSA_sign 216 EXIST::FUNCTION:DSA |
209 | DSA_print_fp 215 | 209 | DSA_sign_setup 217 EXIST::FUNCTION:DSA |
210 | DSA_sign 216 | 210 | DSA_size 218 EXIST::FUNCTION:DSA |
211 | DSA_sign_setup 217 | 211 | DSA_verify 219 EXIST::FUNCTION:DSA |
212 | DSA_size 218 | 212 | DSAparams_print 220 EXIST::FUNCTION:BIO,DSA |
213 | DSA_verify 219 | 213 | DSAparams_print_fp 221 EXIST::FUNCTION:DSA,FP_API |
214 | DSAparams_print 220 | 214 | ERR_clear_error 222 EXIST::FUNCTION: |
215 | DSAparams_print_fp 221 | 215 | ERR_error_string 223 EXIST::FUNCTION: |
216 | ERR_clear_error 222 | 216 | ERR_free_strings 224 EXIST::FUNCTION: |
217 | ERR_error_string 223 | 217 | ERR_func_error_string 225 EXIST::FUNCTION: |
218 | ERR_free_strings 224 | 218 | ERR_get_err_state_table 226 EXIST::FUNCTION:LHASH |
219 | ERR_func_error_string 225 | 219 | ERR_get_error 227 EXIST::FUNCTION: |
220 | ERR_get_err_state_table 226 | 220 | ERR_get_error_line 228 EXIST::FUNCTION: |
221 | ERR_get_error 227 | 221 | ERR_get_state 229 EXIST::FUNCTION: |
222 | ERR_get_error_line 228 | 222 | ERR_get_string_table 230 EXIST::FUNCTION:LHASH |
223 | ERR_get_state 229 | 223 | ERR_lib_error_string 231 EXIST::FUNCTION: |
224 | ERR_get_string_table 230 | 224 | ERR_load_ASN1_strings 232 EXIST::FUNCTION: |
225 | ERR_lib_error_string 231 | 225 | ERR_load_BIO_strings 233 EXIST::FUNCTION: |
226 | ERR_load_ASN1_strings 232 | 226 | ERR_load_BN_strings 234 EXIST::FUNCTION: |
227 | ERR_load_BIO_strings 233 | 227 | ERR_load_BUF_strings 235 EXIST::FUNCTION: |
228 | ERR_load_BN_strings 234 | 228 | ERR_load_CONF_strings 236 EXIST::FUNCTION: |
229 | ERR_load_BUF_strings 235 | 229 | ERR_load_DH_strings 237 EXIST::FUNCTION:DH |
230 | ERR_load_CONF_strings 236 | 230 | ERR_load_DSA_strings 238 EXIST::FUNCTION:DSA |
231 | ERR_load_DH_strings 237 | 231 | ERR_load_ERR_strings 239 EXIST::FUNCTION: |
232 | ERR_load_DSA_strings 238 | 232 | ERR_load_EVP_strings 240 EXIST::FUNCTION: |
233 | ERR_load_ERR_strings 239 | 233 | ERR_load_OBJ_strings 241 EXIST::FUNCTION: |
234 | ERR_load_EVP_strings 240 | 234 | ERR_load_PEM_strings 242 EXIST::FUNCTION: |
235 | ERR_load_OBJ_strings 241 | 235 | ERR_load_PROXY_strings 243 NOEXIST::FUNCTION: |
236 | ERR_load_PEM_strings 242 | 236 | ERR_load_RSA_strings 244 EXIST::FUNCTION:RSA |
237 | ERR_load_PROXY_strings 243 | 237 | ERR_load_X509_strings 245 EXIST::FUNCTION: |
238 | ERR_load_RSA_strings 244 | 238 | ERR_load_crypto_strings 246 EXIST::FUNCTION: |
239 | ERR_load_X509_strings 245 | 239 | ERR_load_strings 247 EXIST::FUNCTION: |
240 | ERR_load_crypto_strings 246 | 240 | ERR_peek_error 248 EXIST::FUNCTION: |
241 | ERR_load_strings 247 | 241 | ERR_peek_error_line 249 EXIST::FUNCTION: |
242 | ERR_peek_error 248 | 242 | ERR_print_errors 250 EXIST::FUNCTION:BIO |
243 | ERR_peek_error_line 249 | 243 | ERR_print_errors_fp 251 EXIST::FUNCTION:FP_API |
244 | ERR_print_errors 250 | 244 | ERR_put_error 252 EXIST::FUNCTION: |
245 | ERR_print_errors_fp 251 | 245 | ERR_reason_error_string 253 EXIST::FUNCTION: |
246 | ERR_put_error 252 | 246 | ERR_remove_state 254 EXIST::FUNCTION: |
247 | ERR_reason_error_string 253 | 247 | EVP_BytesToKey 255 EXIST::FUNCTION: |
248 | ERR_remove_state 254 | 248 | EVP_CIPHER_CTX_cleanup 256 EXIST::FUNCTION: |
249 | EVP_BytesToKey 255 | 249 | EVP_CipherFinal 257 EXIST::FUNCTION: |
250 | EVP_CIPHER_CTX_cleanup 256 | 250 | EVP_CipherInit 258 EXIST::FUNCTION: |
251 | EVP_CipherFinal 257 | 251 | EVP_CipherUpdate 259 EXIST::FUNCTION: |
252 | EVP_CipherInit 258 | 252 | EVP_DecodeBlock 260 EXIST::FUNCTION: |
253 | EVP_CipherUpdate 259 | 253 | EVP_DecodeFinal 261 EXIST::FUNCTION: |
254 | EVP_DecodeBlock 260 | 254 | EVP_DecodeInit 262 EXIST::FUNCTION: |
255 | EVP_DecodeFinal 261 | 255 | EVP_DecodeUpdate 263 EXIST::FUNCTION: |
256 | EVP_DecodeInit 262 | 256 | EVP_DecryptFinal 264 EXIST::FUNCTION: |
257 | EVP_DecodeUpdate 263 | 257 | EVP_DecryptInit 265 EXIST::FUNCTION: |
258 | EVP_DecryptFinal 264 | 258 | EVP_DecryptUpdate 266 EXIST::FUNCTION: |
259 | EVP_DecryptInit 265 | 259 | EVP_DigestFinal 267 EXIST::FUNCTION: |
260 | EVP_DecryptUpdate 266 | 260 | EVP_DigestInit 268 EXIST::FUNCTION: |
261 | EVP_DigestFinal 267 | 261 | EVP_DigestUpdate 269 EXIST::FUNCTION: |
262 | EVP_DigestInit 268 | 262 | EVP_EncodeBlock 270 EXIST::FUNCTION: |
263 | EVP_DigestUpdate 269 | 263 | EVP_EncodeFinal 271 EXIST::FUNCTION: |
264 | EVP_EncodeBlock 270 | 264 | EVP_EncodeInit 272 EXIST::FUNCTION: |
265 | EVP_EncodeFinal 271 | 265 | EVP_EncodeUpdate 273 EXIST::FUNCTION: |
266 | EVP_EncodeInit 272 | 266 | EVP_EncryptFinal 274 EXIST::FUNCTION: |
267 | EVP_EncodeUpdate 273 | 267 | EVP_EncryptInit 275 EXIST::FUNCTION: |
268 | EVP_EncryptFinal 274 | 268 | EVP_EncryptUpdate 276 EXIST::FUNCTION: |
269 | EVP_EncryptInit 275 | 269 | EVP_OpenFinal 277 EXIST::FUNCTION:RSA |
270 | EVP_EncryptUpdate 276 | 270 | EVP_OpenInit 278 EXIST::FUNCTION:RSA |
271 | EVP_OpenFinal 277 | 271 | EVP_PKEY_assign 279 EXIST::FUNCTION: |
272 | EVP_OpenInit 278 | 272 | EVP_PKEY_copy_parameters 280 EXIST::FUNCTION: |
273 | EVP_PKEY_assign 279 | 273 | EVP_PKEY_free 281 EXIST::FUNCTION: |
274 | EVP_PKEY_copy_parameters 280 | 274 | EVP_PKEY_missing_parameters 282 EXIST::FUNCTION: |
275 | EVP_PKEY_free 281 | 275 | EVP_PKEY_new 283 EXIST::FUNCTION: |
276 | EVP_PKEY_missing_parameters 282 | 276 | EVP_PKEY_save_parameters 284 EXIST::FUNCTION: |
277 | EVP_PKEY_new 283 | 277 | EVP_PKEY_size 285 EXIST::FUNCTION: |
278 | EVP_PKEY_save_parameters 284 | 278 | EVP_PKEY_type 286 EXIST::FUNCTION: |
279 | EVP_PKEY_size 285 | 279 | EVP_SealFinal 287 EXIST::FUNCTION:RSA |
280 | EVP_PKEY_type 286 | 280 | EVP_SealInit 288 EXIST::FUNCTION:RSA |
281 | EVP_SealFinal 287 | 281 | EVP_SignFinal 289 EXIST::FUNCTION: |
282 | EVP_SealInit 288 | 282 | EVP_VerifyFinal 290 EXIST::FUNCTION: |
283 | EVP_SignFinal 289 | 283 | EVP_add_alias 291 NOEXIST::FUNCTION: |
284 | EVP_VerifyFinal 290 | 284 | EVP_add_cipher 292 EXIST::FUNCTION: |
285 | EVP_add_alias 291 | 285 | EVP_add_digest 293 EXIST::FUNCTION: |
286 | EVP_add_cipher 292 | 286 | EVP_bf_cbc 294 EXIST::FUNCTION:BF |
287 | EVP_add_digest 293 | 287 | EVP_bf_cfb 295 EXIST::FUNCTION:BF |
288 | EVP_bf_cbc 294 | 288 | EVP_bf_ecb 296 EXIST::FUNCTION:BF |
289 | EVP_bf_cfb 295 | 289 | EVP_bf_ofb 297 EXIST::FUNCTION:BF |
290 | EVP_bf_ecb 296 | 290 | EVP_cleanup 298 EXIST::FUNCTION: |
291 | EVP_bf_ofb 297 | 291 | EVP_des_cbc 299 EXIST::FUNCTION:DES |
292 | EVP_cleanup 298 | 292 | EVP_des_cfb 300 EXIST::FUNCTION:DES |
293 | EVP_des_cbc 299 | 293 | EVP_des_ecb 301 EXIST::FUNCTION:DES |
294 | EVP_des_cfb 300 | 294 | EVP_des_ede 302 EXIST::FUNCTION:DES |
295 | EVP_des_ecb 301 | 295 | EVP_des_ede3 303 EXIST::FUNCTION:DES |
296 | EVP_des_ede 302 | 296 | EVP_des_ede3_cbc 304 EXIST::FUNCTION:DES |
297 | EVP_des_ede3 303 | 297 | EVP_des_ede3_cfb 305 EXIST::FUNCTION:DES |
298 | EVP_des_ede3_cbc 304 | 298 | EVP_des_ede3_ofb 306 EXIST::FUNCTION:DES |
299 | EVP_des_ede3_cfb 305 | 299 | EVP_des_ede_cbc 307 EXIST::FUNCTION:DES |
300 | EVP_des_ede3_ofb 306 | 300 | EVP_des_ede_cfb 308 EXIST::FUNCTION:DES |
301 | EVP_des_ede_cbc 307 | 301 | EVP_des_ede_ofb 309 EXIST::FUNCTION:DES |
302 | EVP_des_ede_cfb 308 | 302 | EVP_des_ofb 310 EXIST::FUNCTION:DES |
303 | EVP_des_ede_ofb 309 | 303 | EVP_desx_cbc 311 EXIST::FUNCTION:DES |
304 | EVP_des_ofb 310 | 304 | EVP_dss 312 EXIST::FUNCTION:DSA,SHA |
305 | EVP_desx_cbc 311 | 305 | EVP_dss1 313 EXIST::FUNCTION:DSA,SHA |
306 | EVP_dss 312 | 306 | EVP_enc_null 314 EXIST::FUNCTION: |
307 | EVP_dss1 313 | 307 | EVP_get_cipherbyname 315 EXIST::FUNCTION: |
308 | EVP_enc_null 314 | 308 | EVP_get_digestbyname 316 EXIST::FUNCTION: |
309 | EVP_get_cipherbyname 315 | 309 | EVP_get_pw_prompt 317 EXIST::FUNCTION: |
310 | EVP_get_digestbyname 316 | 310 | EVP_idea_cbc 318 EXIST::FUNCTION:IDEA |
311 | EVP_get_pw_prompt 317 | 311 | EVP_idea_cfb 319 EXIST::FUNCTION:IDEA |
312 | EVP_idea_cbc 318 | 312 | EVP_idea_ecb 320 EXIST::FUNCTION:IDEA |
313 | EVP_idea_cfb 319 | 313 | EVP_idea_ofb 321 EXIST::FUNCTION:IDEA |
314 | EVP_idea_ecb 320 | 314 | EVP_md2 322 EXIST::FUNCTION:MD2 |
315 | EVP_idea_ofb 321 | 315 | EVP_md5 323 EXIST::FUNCTION:MD5 |
316 | EVP_md2 322 | 316 | EVP_md_null 324 EXIST::FUNCTION: |
317 | EVP_md5 323 | 317 | EVP_rc2_cbc 325 EXIST::FUNCTION:RC2 |
318 | EVP_md_null 324 | 318 | EVP_rc2_cfb 326 EXIST::FUNCTION:RC2 |
319 | EVP_rc2_cbc 325 | 319 | EVP_rc2_ecb 327 EXIST::FUNCTION:RC2 |
320 | EVP_rc2_cfb 326 | 320 | EVP_rc2_ofb 328 EXIST::FUNCTION:RC2 |
321 | EVP_rc2_ecb 327 | 321 | EVP_rc4 329 EXIST::FUNCTION:RC4 |
322 | EVP_rc2_ofb 328 | 322 | EVP_read_pw_string 330 EXIST::FUNCTION: |
323 | EVP_rc4 329 | 323 | EVP_set_pw_prompt 331 EXIST::FUNCTION: |
324 | EVP_read_pw_string 330 | 324 | EVP_sha 332 EXIST::FUNCTION:SHA |
325 | EVP_set_pw_prompt 331 | 325 | EVP_sha1 333 EXIST::FUNCTION:SHA |
326 | EVP_sha 332 | 326 | MD2 334 EXIST::FUNCTION:MD2 |
327 | EVP_sha1 333 | 327 | MD2_Final 335 EXIST::FUNCTION:MD2 |
328 | MD2 334 | 328 | MD2_Init 336 EXIST::FUNCTION:MD2 |
329 | MD2_Final 335 | 329 | MD2_Update 337 EXIST::FUNCTION:MD2 |
330 | MD2_Init 336 | 330 | MD2_options 338 EXIST::FUNCTION:MD2 |
331 | MD2_Update 337 | 331 | MD5 339 EXIST::FUNCTION:MD5 |
332 | MD2_options 338 | 332 | MD5_Final 340 EXIST::FUNCTION:MD5 |
333 | MD5 339 | 333 | MD5_Init 341 EXIST::FUNCTION:MD5 |
334 | MD5_Final 340 | 334 | MD5_Update 342 EXIST::FUNCTION:MD5 |
335 | MD5_Init 341 | 335 | MDC2 343 EXIST::FUNCTION:MDC2 |
336 | MD5_Update 342 | 336 | MDC2_Final 344 EXIST::FUNCTION:MDC2 |
337 | MDC2 343 | 337 | MDC2_Init 345 EXIST::FUNCTION:MDC2 |
338 | MDC2_Final 344 | 338 | MDC2_Update 346 EXIST::FUNCTION:MDC2 |
339 | MDC2_Init 345 | 339 | NETSCAPE_SPKAC_free 347 EXIST::FUNCTION: |
340 | MDC2_Update 346 | 340 | NETSCAPE_SPKAC_new 348 EXIST::FUNCTION: |
341 | NETSCAPE_SPKAC_free 347 | 341 | NETSCAPE_SPKI_free 349 EXIST::FUNCTION: |
342 | NETSCAPE_SPKAC_new 348 | 342 | NETSCAPE_SPKI_new 350 EXIST::FUNCTION: |
343 | NETSCAPE_SPKI_free 349 | 343 | NETSCAPE_SPKI_sign 351 EXIST::FUNCTION:EVP |
344 | NETSCAPE_SPKI_new 350 | 344 | NETSCAPE_SPKI_verify 352 EXIST::FUNCTION:EVP |
345 | NETSCAPE_SPKI_sign 351 | 345 | OBJ_add_object 353 EXIST::FUNCTION: |
346 | NETSCAPE_SPKI_verify 352 | 346 | OBJ_bsearch 354 EXIST::FUNCTION: |
347 | OBJ_add_object 353 | 347 | OBJ_cleanup 355 EXIST::FUNCTION: |
348 | OBJ_bsearch 354 | 348 | OBJ_cmp 356 EXIST::FUNCTION: |
349 | OBJ_cleanup 355 | 349 | OBJ_create 357 EXIST::FUNCTION: |
350 | OBJ_cmp 356 | 350 | OBJ_dup 358 EXIST::FUNCTION: |
351 | OBJ_create 357 | 351 | OBJ_ln2nid 359 EXIST::FUNCTION: |
352 | OBJ_dup 358 | 352 | OBJ_new_nid 360 EXIST::FUNCTION: |
353 | OBJ_ln2nid 359 | 353 | OBJ_nid2ln 361 EXIST::FUNCTION: |
354 | OBJ_new_nid 360 | 354 | OBJ_nid2obj 362 EXIST::FUNCTION: |
355 | OBJ_nid2ln 361 | 355 | OBJ_nid2sn 363 EXIST::FUNCTION: |
356 | OBJ_nid2obj 362 | 356 | OBJ_obj2nid 364 EXIST::FUNCTION: |
357 | OBJ_nid2sn 363 | 357 | OBJ_sn2nid 365 EXIST::FUNCTION: |
358 | OBJ_obj2nid 364 | 358 | OBJ_txt2nid 366 EXIST::FUNCTION: |
359 | OBJ_sn2nid 365 | 359 | PEM_ASN1_read 367 EXIST:!WIN16:FUNCTION: |
360 | OBJ_txt2nid 366 | 360 | PEM_ASN1_read_bio 368 EXIST::FUNCTION:BIO |
361 | PEM_ASN1_read 367 | 361 | PEM_ASN1_write 369 EXIST:!WIN16:FUNCTION: |
362 | PEM_ASN1_read_bio 368 | 362 | PEM_ASN1_write_bio 370 EXIST::FUNCTION:BIO |
363 | PEM_ASN1_write 369 | 363 | PEM_SealFinal 371 EXIST::FUNCTION:RSA |
364 | PEM_ASN1_write_bio 370 | 364 | PEM_SealInit 372 EXIST::FUNCTION:RSA |
365 | PEM_SealFinal 371 | 365 | PEM_SealUpdate 373 EXIST::FUNCTION:RSA |
366 | PEM_SealInit 372 | 366 | PEM_SignFinal 374 EXIST::FUNCTION: |
367 | PEM_SealUpdate 373 | 367 | PEM_SignInit 375 EXIST::FUNCTION: |
368 | PEM_SignFinal 374 | 368 | PEM_SignUpdate 376 EXIST::FUNCTION: |
369 | PEM_SignInit 375 | 369 | PEM_X509_INFO_read 377 EXIST:!WIN16:FUNCTION: |
370 | PEM_SignUpdate 376 | 370 | PEM_X509_INFO_read_bio 378 EXIST::FUNCTION:BIO |
371 | PEM_X509_INFO_read 377 | 371 | PEM_X509_INFO_write_bio 379 EXIST::FUNCTION:BIO |
372 | PEM_X509_INFO_read_bio 378 | 372 | PEM_dek_info 380 EXIST::FUNCTION: |
373 | PEM_X509_INFO_write_bio 379 | 373 | PEM_do_header 381 EXIST::FUNCTION: |
374 | PEM_dek_info 380 | 374 | PEM_get_EVP_CIPHER_INFO 382 EXIST::FUNCTION: |
375 | PEM_do_header 381 | 375 | PEM_proc_type 383 EXIST::FUNCTION: |
376 | PEM_get_EVP_CIPHER_INFO 382 | 376 | PEM_read 384 EXIST:!WIN16:FUNCTION: |
377 | PEM_proc_type 383 | 377 | PEM_read_DHparams 385 EXIST:!WIN16:FUNCTION:DH |
378 | PEM_read 384 | 378 | PEM_read_DSAPrivateKey 386 EXIST:!WIN16:FUNCTION:DSA |
379 | PEM_read_DHparams 385 | 379 | PEM_read_DSAparams 387 EXIST:!WIN16:FUNCTION:DSA |
380 | PEM_read_DSAPrivateKey 386 | 380 | PEM_read_PKCS7 388 EXIST:!WIN16:FUNCTION: |
381 | PEM_read_DSAparams 387 | 381 | PEM_read_PrivateKey 389 EXIST:!WIN16:FUNCTION: |
382 | PEM_read_PKCS7 388 | 382 | PEM_read_RSAPrivateKey 390 EXIST:!WIN16:FUNCTION:RSA |
383 | PEM_read_PrivateKey 389 | 383 | PEM_read_X509 391 EXIST:!WIN16:FUNCTION: |
384 | PEM_read_RSAPrivateKey 390 | 384 | PEM_read_X509_CRL 392 EXIST:!WIN16:FUNCTION: |
385 | PEM_read_X509 391 | 385 | PEM_read_X509_REQ 393 EXIST:!WIN16:FUNCTION: |
386 | PEM_read_X509_CRL 392 | 386 | PEM_read_bio 394 EXIST::FUNCTION:BIO |
387 | PEM_read_X509_REQ 393 | 387 | PEM_read_bio_DHparams 395 EXIST::FUNCTION:DH |
388 | PEM_read_bio 394 | 388 | PEM_read_bio_DSAPrivateKey 396 EXIST::FUNCTION:DSA |
389 | PEM_read_bio_DHparams 395 | 389 | PEM_read_bio_DSAparams 397 EXIST::FUNCTION:DSA |
390 | PEM_read_bio_DSAPrivateKey 396 | 390 | PEM_read_bio_PKCS7 398 EXIST::FUNCTION: |
391 | PEM_read_bio_DSAparams 397 | 391 | PEM_read_bio_PrivateKey 399 EXIST::FUNCTION: |
392 | PEM_read_bio_PKCS7 398 | 392 | PEM_read_bio_RSAPrivateKey 400 EXIST::FUNCTION:RSA |
393 | PEM_read_bio_PrivateKey 399 | 393 | PEM_read_bio_X509 401 EXIST::FUNCTION: |
394 | PEM_read_bio_RSAPrivateKey 400 | 394 | PEM_read_bio_X509_CRL 402 EXIST::FUNCTION: |
395 | PEM_read_bio_X509 401 | 395 | PEM_read_bio_X509_REQ 403 EXIST::FUNCTION: |
396 | PEM_read_bio_X509_CRL 402 | 396 | PEM_write 404 EXIST:!WIN16:FUNCTION: |
397 | PEM_read_bio_X509_REQ 403 | 397 | PEM_write_DHparams 405 EXIST:!WIN16:FUNCTION:DH |
398 | PEM_write 404 | 398 | PEM_write_DSAPrivateKey 406 EXIST:!WIN16:FUNCTION:DSA |
399 | PEM_write_DHparams 405 | 399 | PEM_write_DSAparams 407 EXIST:!WIN16:FUNCTION:DSA |
400 | PEM_write_DSAPrivateKey 406 | 400 | PEM_write_PKCS7 408 EXIST:!WIN16:FUNCTION: |
401 | PEM_write_DSAparams 407 | 401 | PEM_write_PrivateKey 409 EXIST:!WIN16:FUNCTION: |
402 | PEM_write_PKCS7 408 | 402 | PEM_write_RSAPrivateKey 410 EXIST:!WIN16:FUNCTION:RSA |
403 | PEM_write_PrivateKey 409 | 403 | PEM_write_X509 411 EXIST:!WIN16:FUNCTION: |
404 | PEM_write_RSAPrivateKey 410 | 404 | PEM_write_X509_CRL 412 EXIST:!WIN16:FUNCTION: |
405 | PEM_write_X509 411 | 405 | PEM_write_X509_REQ 413 EXIST:!WIN16:FUNCTION: |
406 | PEM_write_X509_CRL 412 | 406 | PEM_write_bio 414 EXIST::FUNCTION:BIO |
407 | PEM_write_X509_REQ 413 | 407 | PEM_write_bio_DHparams 415 EXIST::FUNCTION:DH |
408 | PEM_write_bio 414 | 408 | PEM_write_bio_DSAPrivateKey 416 EXIST::FUNCTION:DSA |
409 | PEM_write_bio_DHparams 415 | 409 | PEM_write_bio_DSAparams 417 EXIST::FUNCTION:DSA |
410 | PEM_write_bio_DSAPrivateKey 416 | 410 | PEM_write_bio_PKCS7 418 EXIST::FUNCTION: |
411 | PEM_write_bio_DSAparams 417 | 411 | PEM_write_bio_PrivateKey 419 EXIST::FUNCTION: |
412 | PEM_write_bio_PKCS7 418 | 412 | PEM_write_bio_RSAPrivateKey 420 EXIST::FUNCTION:RSA |
413 | PEM_write_bio_PrivateKey 419 | 413 | PEM_write_bio_X509 421 EXIST::FUNCTION: |
414 | PEM_write_bio_RSAPrivateKey 420 | 414 | PEM_write_bio_X509_CRL 422 EXIST::FUNCTION: |
415 | PEM_write_bio_X509 421 | 415 | PEM_write_bio_X509_REQ 423 EXIST::FUNCTION: |
416 | PEM_write_bio_X509_CRL 422 | 416 | PKCS7_DIGEST_free 424 EXIST::FUNCTION: |
417 | PEM_write_bio_X509_REQ 423 | 417 | PKCS7_DIGEST_new 425 EXIST::FUNCTION: |
418 | PKCS7_DIGEST_free 424 | 418 | PKCS7_ENCRYPT_free 426 EXIST::FUNCTION: |
419 | PKCS7_DIGEST_new 425 | 419 | PKCS7_ENCRYPT_new 427 EXIST::FUNCTION: |
420 | PKCS7_ENCRYPT_free 426 | 420 | PKCS7_ENC_CONTENT_free 428 EXIST::FUNCTION: |
421 | PKCS7_ENCRYPT_new 427 | 421 | PKCS7_ENC_CONTENT_new 429 EXIST::FUNCTION: |
422 | PKCS7_ENC_CONTENT_free 428 | 422 | PKCS7_ENVELOPE_free 430 EXIST::FUNCTION: |
423 | PKCS7_ENC_CONTENT_new 429 | 423 | PKCS7_ENVELOPE_new 431 EXIST::FUNCTION: |
424 | PKCS7_ENVELOPE_free 430 | 424 | PKCS7_ISSUER_AND_SERIAL_digest 432 EXIST::FUNCTION: |
425 | PKCS7_ENVELOPE_new 431 | 425 | PKCS7_ISSUER_AND_SERIAL_free 433 EXIST::FUNCTION: |
426 | PKCS7_ISSUER_AND_SERIAL_digest 432 | 426 | PKCS7_ISSUER_AND_SERIAL_new 434 EXIST::FUNCTION: |
427 | PKCS7_ISSUER_AND_SERIAL_free 433 | 427 | PKCS7_RECIP_INFO_free 435 EXIST::FUNCTION: |
428 | PKCS7_ISSUER_AND_SERIAL_new 434 | 428 | PKCS7_RECIP_INFO_new 436 EXIST::FUNCTION: |
429 | PKCS7_RECIP_INFO_free 435 | 429 | PKCS7_SIGNED_free 437 EXIST::FUNCTION: |
430 | PKCS7_RECIP_INFO_new 436 | 430 | PKCS7_SIGNED_new 438 EXIST::FUNCTION: |
431 | PKCS7_SIGNED_free 437 | 431 | PKCS7_SIGNER_INFO_free 439 EXIST::FUNCTION: |
432 | PKCS7_SIGNED_new 438 | 432 | PKCS7_SIGNER_INFO_new 440 EXIST::FUNCTION: |
433 | PKCS7_SIGNER_INFO_free 439 | 433 | PKCS7_SIGN_ENVELOPE_free 441 EXIST::FUNCTION: |
434 | PKCS7_SIGNER_INFO_new 440 | 434 | PKCS7_SIGN_ENVELOPE_new 442 EXIST::FUNCTION: |
435 | PKCS7_SIGN_ENVELOPE_free 441 | 435 | PKCS7_dup 443 EXIST::FUNCTION: |
436 | PKCS7_SIGN_ENVELOPE_new 442 | 436 | PKCS7_free 444 EXIST::FUNCTION: |
437 | PKCS7_dup 443 | 437 | PKCS7_new 445 EXIST::FUNCTION: |
438 | PKCS7_free 444 | 438 | PROXY_ENTRY_add_noproxy 446 NOEXIST::FUNCTION: |
439 | PKCS7_new 445 | 439 | PROXY_ENTRY_clear_noproxy 447 NOEXIST::FUNCTION: |
440 | PROXY_ENTRY_add_noproxy 446 | 440 | PROXY_ENTRY_free 448 NOEXIST::FUNCTION: |
441 | PROXY_ENTRY_clear_noproxy 447 | 441 | PROXY_ENTRY_get_noproxy 449 NOEXIST::FUNCTION: |
442 | PROXY_ENTRY_free 448 | 442 | PROXY_ENTRY_new 450 NOEXIST::FUNCTION: |
443 | PROXY_ENTRY_get_noproxy 449 | 443 | PROXY_ENTRY_set_server 451 NOEXIST::FUNCTION: |
444 | PROXY_ENTRY_new 450 | 444 | PROXY_add_noproxy 452 NOEXIST::FUNCTION: |
445 | PROXY_ENTRY_set_server 451 | 445 | PROXY_add_server 453 NOEXIST::FUNCTION: |
446 | PROXY_add_noproxy 452 | 446 | PROXY_check_by_host 454 NOEXIST::FUNCTION: |
447 | PROXY_add_server 453 | 447 | PROXY_check_url 455 NOEXIST::FUNCTION: |
448 | PROXY_check_by_host 454 | 448 | PROXY_clear_noproxy 456 NOEXIST::FUNCTION: |
449 | PROXY_check_url 455 | 449 | PROXY_free 457 NOEXIST::FUNCTION: |
450 | PROXY_clear_noproxy 456 | 450 | PROXY_get_noproxy 458 NOEXIST::FUNCTION: |
451 | PROXY_free 457 | 451 | PROXY_get_proxies 459 NOEXIST::FUNCTION: |
452 | PROXY_get_noproxy 458 | 452 | PROXY_get_proxy_entry 460 NOEXIST::FUNCTION: |
453 | PROXY_get_proxies 459 | 453 | PROXY_load_conf 461 NOEXIST::FUNCTION: |
454 | PROXY_get_proxy_entry 460 | 454 | PROXY_new 462 NOEXIST::FUNCTION: |
455 | PROXY_load_conf 461 | 455 | PROXY_print 463 NOEXIST::FUNCTION: |
456 | PROXY_new 462 | 456 | RAND_bytes 464 EXIST::FUNCTION: |
457 | PROXY_print 463 | 457 | RAND_cleanup 465 EXIST::FUNCTION: |
458 | RAND_bytes 464 | 458 | RAND_file_name 466 EXIST::FUNCTION: |
459 | RAND_cleanup 465 | 459 | RAND_load_file 467 EXIST::FUNCTION: |
460 | RAND_file_name 466 | 460 | RAND_screen 468 EXIST:WIN32:FUNCTION: |
461 | RAND_load_file 467 | 461 | RAND_seed 469 EXIST::FUNCTION: |
462 | RAND_screen 468 | 462 | RAND_write_file 470 EXIST::FUNCTION: |
463 | RAND_seed 469 | 463 | RC2_cbc_encrypt 471 EXIST::FUNCTION:RC2 |
464 | RAND_write_file 470 | 464 | RC2_cfb64_encrypt 472 EXIST::FUNCTION:RC2 |
465 | RC2_cbc_encrypt 471 | 465 | RC2_ecb_encrypt 473 EXIST::FUNCTION:RC2 |
466 | RC2_cfb64_encrypt 472 | 466 | RC2_encrypt 474 EXIST::FUNCTION:RC2 |
467 | RC2_ecb_encrypt 473 | 467 | RC2_ofb64_encrypt 475 EXIST::FUNCTION:RC2 |
468 | RC2_encrypt 474 | 468 | RC2_set_key 476 EXIST::FUNCTION:RC2 |
469 | RC2_ofb64_encrypt 475 | 469 | RC4 477 EXIST::FUNCTION:RC4 |
470 | RC2_set_key 476 | 470 | RC4_options 478 EXIST::FUNCTION:RC4 |
471 | RC4 477 | 471 | RC4_set_key 479 EXIST::FUNCTION:RC4 |
472 | RC4_options 478 | 472 | RSAPrivateKey_asn1_meth 480 EXIST::FUNCTION:RSA |
473 | RC4_set_key 479 | 473 | RSAPrivateKey_dup 481 EXIST::FUNCTION:RSA |
474 | RSAPrivateKey_asn1_meth 480 | 474 | RSAPublicKey_dup 482 EXIST::FUNCTION:RSA |
475 | RSAPrivateKey_dup 481 | 475 | RSA_PKCS1_SSLeay 483 EXIST::FUNCTION:RSA |
476 | RSAPublicKey_dup 482 | 476 | RSA_free 484 EXIST::FUNCTION:RSA |
477 | RSA_PKCS1_SSLeay 483 | 477 | RSA_generate_key 485 EXIST::FUNCTION:RSA |
478 | RSA_free 484 | 478 | RSA_new 486 EXIST::FUNCTION:RSA |
479 | RSA_generate_key 485 | 479 | RSA_new_method 487 EXIST::FUNCTION:RSA |
480 | RSA_new 486 | 480 | RSA_print 488 EXIST::FUNCTION:BIO,RSA |
481 | RSA_new_method 487 | 481 | RSA_print_fp 489 EXIST::FUNCTION:FP_API,RSA |
482 | RSA_print 488 | 482 | RSA_private_decrypt 490 EXIST::FUNCTION:RSA |
483 | RSA_print_fp 489 | 483 | RSA_private_encrypt 491 EXIST::FUNCTION:RSA |
484 | RSA_private_decrypt 490 | 484 | RSA_public_decrypt 492 EXIST::FUNCTION:RSA |
485 | RSA_private_encrypt 491 | 485 | RSA_public_encrypt 493 EXIST::FUNCTION:RSA |
486 | RSA_public_decrypt 492 | 486 | RSA_set_default_method 494 EXIST::FUNCTION:RSA |
487 | RSA_public_encrypt 493 | 487 | RSA_sign 495 EXIST::FUNCTION:RSA |
488 | RSA_set_default_method 494 | 488 | RSA_sign_ASN1_OCTET_STRING 496 EXIST::FUNCTION:RSA |
489 | RSA_sign 495 | 489 | RSA_size 497 EXIST::FUNCTION:RSA |
490 | RSA_sign_ASN1_OCTET_STRING 496 | 490 | RSA_verify 498 EXIST::FUNCTION:RSA |
491 | RSA_size 497 | 491 | RSA_verify_ASN1_OCTET_STRING 499 EXIST::FUNCTION:RSA |
492 | RSA_verify 498 | 492 | SHA 500 EXIST::FUNCTION:SHA,SHA0 |
493 | RSA_verify_ASN1_OCTET_STRING 499 | 493 | SHA1 501 EXIST::FUNCTION:SHA,SHA1 |
494 | SHA 500 | 494 | SHA1_Final 502 EXIST::FUNCTION:SHA,SHA1 |
495 | SHA1 501 | 495 | SHA1_Init 503 EXIST::FUNCTION:SHA,SHA1 |
496 | SHA1_Final 502 | 496 | SHA1_Update 504 EXIST::FUNCTION:SHA,SHA1 |
497 | SHA1_Init 503 | 497 | SHA_Final 505 EXIST::FUNCTION:SHA,SHA0 |
498 | SHA1_Update 504 | 498 | SHA_Init 506 EXIST::FUNCTION:SHA,SHA0 |
499 | SHA_Final 505 | 499 | SHA_Update 507 EXIST::FUNCTION:SHA,SHA0 |
500 | SHA_Init 506 | 500 | OpenSSL_add_all_algorithms 508 NOEXIST::FUNCTION: |
501 | SHA_Update 507 | 501 | OpenSSL_add_all_ciphers 509 EXIST::FUNCTION: |
502 | SSLeay_add_all_algorithms 508 | 502 | OpenSSL_add_all_digests 510 EXIST::FUNCTION: |
503 | SSLeay_add_all_ciphers 509 | 503 | TXT_DB_create_index 511 EXIST::FUNCTION: |
504 | SSLeay_add_all_digests 510 | 504 | TXT_DB_free 512 EXIST::FUNCTION: |
505 | TXT_DB_create_index 511 | 505 | TXT_DB_get_by_index 513 EXIST::FUNCTION: |
506 | TXT_DB_free 512 | 506 | TXT_DB_insert 514 EXIST::FUNCTION: |
507 | TXT_DB_get_by_index 513 | 507 | TXT_DB_read 515 EXIST::FUNCTION:BIO |
508 | TXT_DB_insert 514 | 508 | TXT_DB_write 516 EXIST::FUNCTION:BIO |
509 | TXT_DB_read 515 | 509 | X509_ALGOR_free 517 EXIST::FUNCTION: |
510 | TXT_DB_write 516 | 510 | X509_ALGOR_new 518 EXIST::FUNCTION: |
511 | X509_ALGOR_free 517 | 511 | X509_ATTRIBUTE_free 519 EXIST::FUNCTION: |
512 | X509_ALGOR_new 518 | 512 | X509_ATTRIBUTE_new 520 EXIST::FUNCTION: |
513 | X509_ATTRIBUTE_free 519 | 513 | X509_CINF_free 521 EXIST::FUNCTION: |
514 | X509_ATTRIBUTE_new 520 | 514 | X509_CINF_new 522 EXIST::FUNCTION: |
515 | X509_CINF_free 521 | 515 | X509_CRL_INFO_free 523 EXIST::FUNCTION: |
516 | X509_CINF_new 522 | 516 | X509_CRL_INFO_new 524 EXIST::FUNCTION: |
517 | X509_CRL_INFO_free 523 | 517 | X509_CRL_add_ext 525 EXIST::FUNCTION: |
518 | X509_CRL_INFO_new 524 | 518 | X509_CRL_cmp 526 EXIST::FUNCTION: |
519 | X509_CRL_add_ext 525 | 519 | X509_CRL_delete_ext 527 EXIST::FUNCTION: |
520 | X509_CRL_cmp 526 | 520 | X509_CRL_dup 528 EXIST::FUNCTION: |
521 | X509_CRL_delete_ext 527 | 521 | X509_CRL_free 529 EXIST::FUNCTION: |
522 | X509_CRL_dup 528 | 522 | X509_CRL_get_ext 530 EXIST::FUNCTION: |
523 | X509_CRL_free 529 | 523 | X509_CRL_get_ext_by_NID 531 EXIST::FUNCTION: |
524 | X509_CRL_get_ext 530 | 524 | X509_CRL_get_ext_by_OBJ 532 EXIST::FUNCTION: |
525 | X509_CRL_get_ext_by_NID 531 | 525 | X509_CRL_get_ext_by_critical 533 EXIST::FUNCTION: |
526 | X509_CRL_get_ext_by_OBJ 532 | 526 | X509_CRL_get_ext_count 534 EXIST::FUNCTION: |
527 | X509_CRL_get_ext_by_critical 533 | 527 | X509_CRL_new 535 EXIST::FUNCTION: |
528 | X509_CRL_get_ext_count 534 | 528 | X509_CRL_sign 536 EXIST::FUNCTION:EVP |
529 | X509_CRL_new 535 | 529 | X509_CRL_verify 537 EXIST::FUNCTION:EVP |
530 | X509_CRL_sign 536 | 530 | X509_EXTENSION_create_by_NID 538 EXIST::FUNCTION: |
531 | X509_CRL_verify 537 | 531 | X509_EXTENSION_create_by_OBJ 539 EXIST::FUNCTION: |
532 | X509_EXTENSION_create_by_NID 538 | 532 | X509_EXTENSION_dup 540 EXIST::FUNCTION: |
533 | X509_EXTENSION_create_by_OBJ 539 | 533 | X509_EXTENSION_free 541 EXIST::FUNCTION: |
534 | X509_EXTENSION_dup 540 | 534 | X509_EXTENSION_get_critical 542 EXIST::FUNCTION: |
535 | X509_EXTENSION_free 541 | 535 | X509_EXTENSION_get_data 543 EXIST::FUNCTION: |
536 | X509_EXTENSION_get_critical 542 | 536 | X509_EXTENSION_get_object 544 EXIST::FUNCTION: |
537 | X509_EXTENSION_get_data 543 | 537 | X509_EXTENSION_new 545 EXIST::FUNCTION: |
538 | X509_EXTENSION_get_object 544 | 538 | X509_EXTENSION_set_critical 546 EXIST::FUNCTION: |
539 | X509_EXTENSION_new 545 | 539 | X509_EXTENSION_set_data 547 EXIST::FUNCTION: |
540 | X509_EXTENSION_set_critical 546 | 540 | X509_EXTENSION_set_object 548 EXIST::FUNCTION: |
541 | X509_EXTENSION_set_data 547 | 541 | X509_INFO_free 549 EXIST::FUNCTION:EVP |
542 | X509_EXTENSION_set_object 548 | 542 | X509_INFO_new 550 EXIST::FUNCTION:EVP |
543 | X509_INFO_free 549 | 543 | X509_LOOKUP_by_alias 551 EXIST::FUNCTION: |
544 | X509_INFO_new 550 | 544 | X509_LOOKUP_by_fingerprint 552 EXIST::FUNCTION: |
545 | X509_LOOKUP_by_alias 551 | 545 | X509_LOOKUP_by_issuer_serial 553 EXIST::FUNCTION: |
546 | X509_LOOKUP_by_fingerprint 552 | 546 | X509_LOOKUP_by_subject 554 EXIST::FUNCTION: |
547 | X509_LOOKUP_by_issuer_serial 553 | 547 | X509_LOOKUP_ctrl 555 EXIST::FUNCTION: |
548 | X509_LOOKUP_by_subject 554 | 548 | X509_LOOKUP_file 556 EXIST::FUNCTION: |
549 | X509_LOOKUP_ctrl 555 | 549 | X509_LOOKUP_free 557 EXIST::FUNCTION: |
550 | X509_LOOKUP_file 556 | 550 | X509_LOOKUP_hash_dir 558 EXIST::FUNCTION: |
551 | X509_LOOKUP_free 557 | 551 | X509_LOOKUP_init 559 EXIST::FUNCTION: |
552 | X509_LOOKUP_hash_dir 558 | 552 | X509_LOOKUP_new 560 EXIST::FUNCTION: |
553 | X509_LOOKUP_init 559 | 553 | X509_LOOKUP_shutdown 561 EXIST::FUNCTION: |
554 | X509_LOOKUP_new 560 | 554 | X509_NAME_ENTRY_create_by_NID 562 EXIST::FUNCTION: |
555 | X509_LOOKUP_shutdown 561 | 555 | X509_NAME_ENTRY_create_by_OBJ 563 EXIST::FUNCTION: |
556 | X509_NAME_ENTRY_create_by_NID 562 | 556 | X509_NAME_ENTRY_dup 564 EXIST::FUNCTION: |
557 | X509_NAME_ENTRY_create_by_OBJ 563 | 557 | X509_NAME_ENTRY_free 565 EXIST::FUNCTION: |
558 | X509_NAME_ENTRY_dup 564 | 558 | X509_NAME_ENTRY_get_data 566 EXIST::FUNCTION: |
559 | X509_NAME_ENTRY_free 565 | 559 | X509_NAME_ENTRY_get_object 567 EXIST::FUNCTION: |
560 | X509_NAME_ENTRY_get_data 566 | 560 | X509_NAME_ENTRY_new 568 EXIST::FUNCTION: |
561 | X509_NAME_ENTRY_get_object 567 | 561 | X509_NAME_ENTRY_set_data 569 EXIST::FUNCTION: |
562 | X509_NAME_ENTRY_new 568 | 562 | X509_NAME_ENTRY_set_object 570 EXIST::FUNCTION: |
563 | X509_NAME_ENTRY_set_data 569 | 563 | X509_NAME_add_entry 571 EXIST::FUNCTION: |
564 | X509_NAME_ENTRY_set_object 570 | 564 | X509_NAME_cmp 572 EXIST::FUNCTION: |
565 | X509_NAME_add_entry 571 | 565 | X509_NAME_delete_entry 573 EXIST::FUNCTION: |
566 | X509_NAME_cmp 572 | 566 | X509_NAME_digest 574 EXIST::FUNCTION:EVP |
567 | X509_NAME_delete_entry 573 | 567 | X509_NAME_dup 575 EXIST::FUNCTION: |
568 | X509_NAME_digest 574 | 568 | X509_NAME_entry_count 576 EXIST::FUNCTION: |
569 | X509_NAME_dup 575 | 569 | X509_NAME_free 577 EXIST::FUNCTION: |
570 | X509_NAME_entry_count 576 | 570 | X509_NAME_get_entry 578 EXIST::FUNCTION: |
571 | X509_NAME_free 577 | 571 | X509_NAME_get_index_by_NID 579 EXIST::FUNCTION: |
572 | X509_NAME_get_entry 578 | 572 | X509_NAME_get_index_by_OBJ 580 EXIST::FUNCTION: |
573 | X509_NAME_get_index_by_NID 579 | 573 | X509_NAME_get_text_by_NID 581 EXIST::FUNCTION: |
574 | X509_NAME_get_index_by_OBJ 580 | 574 | X509_NAME_get_text_by_OBJ 582 EXIST::FUNCTION: |
575 | X509_NAME_get_text_by_NID 581 | 575 | X509_NAME_hash 583 EXIST::FUNCTION: |
576 | X509_NAME_get_text_by_OBJ 582 | 576 | X509_NAME_new 584 EXIST::FUNCTION: |
577 | X509_NAME_hash 583 | 577 | X509_NAME_oneline 585 EXIST::FUNCTION:EVP |
578 | X509_NAME_new 584 | 578 | X509_NAME_print 586 EXIST::FUNCTION:BIO |
579 | X509_NAME_oneline 585 | 579 | X509_NAME_set 587 EXIST::FUNCTION: |
580 | X509_NAME_print 586 | 580 | X509_OBJECT_free_contents 588 EXIST::FUNCTION: |
581 | X509_NAME_set 587 | 581 | X509_OBJECT_retrieve_by_subject 589 EXIST::FUNCTION: |
582 | X509_OBJECT_free_contents 588 | 582 | X509_OBJECT_up_ref_count 590 EXIST::FUNCTION: |
583 | X509_OBJECT_retrive_by_subject 589 | 583 | X509_PKEY_free 591 EXIST::FUNCTION: |
584 | X509_OBJECT_up_ref_count 590 | 584 | X509_PKEY_new 592 EXIST::FUNCTION: |
585 | X509_PKEY_free 591 | 585 | X509_PUBKEY_free 593 EXIST::FUNCTION: |
586 | X509_PKEY_new 592 | 586 | X509_PUBKEY_get 594 EXIST::FUNCTION: |
587 | X509_PUBKEY_free 593 | 587 | X509_PUBKEY_new 595 EXIST::FUNCTION: |
588 | X509_PUBKEY_get 594 | 588 | X509_PUBKEY_set 596 EXIST::FUNCTION: |
589 | X509_PUBKEY_new 595 | 589 | X509_REQ_INFO_free 597 EXIST::FUNCTION: |
590 | X509_PUBKEY_set 596 | 590 | X509_REQ_INFO_new 598 EXIST::FUNCTION: |
591 | X509_REQ_INFO_free 597 | 591 | X509_REQ_dup 599 EXIST::FUNCTION: |
592 | X509_REQ_INFO_new 598 | 592 | X509_REQ_free 600 EXIST::FUNCTION: |
593 | X509_REQ_dup 599 | 593 | X509_REQ_get_pubkey 601 EXIST::FUNCTION: |
594 | X509_REQ_free 600 | 594 | X509_REQ_new 602 EXIST::FUNCTION: |
595 | X509_REQ_get_pubkey 601 | 595 | X509_REQ_print 603 EXIST::FUNCTION:BIO |
596 | X509_REQ_new 602 | 596 | X509_REQ_print_fp 604 EXIST::FUNCTION:FP_API |
597 | X509_REQ_print 603 | 597 | X509_REQ_set_pubkey 605 EXIST::FUNCTION: |
598 | X509_REQ_print_fp 604 | 598 | X509_REQ_set_subject_name 606 EXIST::FUNCTION: |
599 | X509_REQ_set_pubkey 605 | 599 | X509_REQ_set_version 607 EXIST::FUNCTION: |
600 | X509_REQ_set_subject_name 606 | 600 | X509_REQ_sign 608 EXIST::FUNCTION:EVP |
601 | X509_REQ_set_version 607 | 601 | X509_REQ_to_X509 609 EXIST::FUNCTION: |
602 | X509_REQ_sign 608 | 602 | X509_REQ_verify 610 EXIST::FUNCTION:EVP |
603 | X509_REQ_to_X509 609 | 603 | X509_REVOKED_add_ext 611 EXIST::FUNCTION: |
604 | X509_REQ_verify 610 | 604 | X509_REVOKED_delete_ext 612 EXIST::FUNCTION: |
605 | X509_REVOKED_add_ext 611 | 605 | X509_REVOKED_free 613 EXIST::FUNCTION: |
606 | X509_REVOKED_delete_ext 612 | 606 | X509_REVOKED_get_ext 614 EXIST::FUNCTION: |
607 | X509_REVOKED_free 613 | 607 | X509_REVOKED_get_ext_by_NID 615 EXIST::FUNCTION: |
608 | X509_REVOKED_get_ext 614 | 608 | X509_REVOKED_get_ext_by_OBJ 616 EXIST::FUNCTION: |
609 | X509_REVOKED_get_ext_by_NID 615 | 609 | X509_REVOKED_get_ext_by_critical 617 EXIST:!VMS:FUNCTION: |
610 | X509_REVOKED_get_ext_by_OBJ 616 | 610 | X509_REVOKED_get_ext_by_critic 617 EXIST:VMS:FUNCTION: |
611 | X509_REVOKED_get_ext_by_critical 617 | 611 | X509_REVOKED_get_ext_count 618 EXIST::FUNCTION: |
612 | X509_REVOKED_get_ext_count 618 | 612 | X509_REVOKED_new 619 EXIST::FUNCTION: |
613 | X509_REVOKED_new 619 | 613 | X509_SIG_free 620 EXIST::FUNCTION: |
614 | X509_SIG_free 620 | 614 | X509_SIG_new 621 EXIST::FUNCTION: |
615 | X509_SIG_new 621 | 615 | X509_STORE_CTX_cleanup 622 EXIST::FUNCTION: |
616 | X509_STORE_CTX_cleanup 622 | 616 | X509_STORE_CTX_init 623 EXIST::FUNCTION: |
617 | X509_STORE_CTX_init 623 | 617 | X509_STORE_add_cert 624 EXIST::FUNCTION: |
618 | X509_STORE_add_cert 624 | 618 | X509_STORE_add_lookup 625 EXIST::FUNCTION: |
619 | X509_STORE_add_lookup 625 | 619 | X509_STORE_free 626 EXIST::FUNCTION: |
620 | X509_STORE_free 626 | 620 | X509_STORE_get_by_subject 627 EXIST::FUNCTION: |
621 | X509_STORE_get_by_subject 627 | 621 | X509_STORE_load_locations 628 EXIST::FUNCTION:STDIO |
622 | X509_STORE_load_locations 628 | 622 | X509_STORE_new 629 EXIST::FUNCTION: |
623 | X509_STORE_new 629 | 623 | X509_STORE_set_default_paths 630 EXIST::FUNCTION:STDIO |
624 | X509_STORE_set_default_paths 630 | 624 | X509_VAL_free 631 EXIST::FUNCTION: |
625 | X509_VAL_free 631 | 625 | X509_VAL_new 632 EXIST::FUNCTION: |
626 | X509_VAL_new 632 | 626 | X509_add_ext 633 EXIST::FUNCTION: |
627 | X509_add_ext 633 | 627 | X509_asn1_meth 634 EXIST::FUNCTION: |
628 | X509_asn1_meth 634 | 628 | X509_certificate_type 635 EXIST::FUNCTION: |
629 | X509_certificate_type 635 | 629 | X509_check_private_key 636 EXIST::FUNCTION: |
630 | X509_check_private_key 636 | 630 | X509_cmp_current_time 637 EXIST::FUNCTION: |
631 | X509_cmp_current_time 637 | 631 | X509_delete_ext 638 EXIST::FUNCTION: |
632 | X509_delete_ext 638 | 632 | X509_digest 639 EXIST::FUNCTION:EVP |
633 | X509_digest 639 | 633 | X509_dup 640 EXIST::FUNCTION: |
634 | X509_dup 640 | 634 | X509_free 641 EXIST::FUNCTION: |
635 | X509_free 641 | 635 | X509_get_default_cert_area 642 EXIST::FUNCTION: |
636 | X509_get_default_cert_area 642 | 636 | X509_get_default_cert_dir 643 EXIST::FUNCTION: |
637 | X509_get_default_cert_dir 643 | 637 | X509_get_default_cert_dir_env 644 EXIST::FUNCTION: |
638 | X509_get_default_cert_dir_env 644 | 638 | X509_get_default_cert_file 645 EXIST::FUNCTION: |
639 | X509_get_default_cert_file 645 | 639 | X509_get_default_cert_file_env 646 EXIST::FUNCTION: |
640 | X509_get_default_cert_file_env 646 | 640 | X509_get_default_private_dir 647 EXIST::FUNCTION: |
641 | X509_get_default_private_dir 647 | 641 | X509_get_ext 648 EXIST::FUNCTION: |
642 | X509_get_ext 648 | 642 | X509_get_ext_by_NID 649 EXIST::FUNCTION: |
643 | X509_get_ext_by_NID 649 | 643 | X509_get_ext_by_OBJ 650 EXIST::FUNCTION: |
644 | X509_get_ext_by_OBJ 650 | 644 | X509_get_ext_by_critical 651 EXIST::FUNCTION: |
645 | X509_get_ext_by_critical 651 | 645 | X509_get_ext_count 652 EXIST::FUNCTION: |
646 | X509_get_ext_count 652 | 646 | X509_get_issuer_name 653 EXIST::FUNCTION: |
647 | X509_get_issuer_name 653 | 647 | X509_get_pubkey 654 EXIST::FUNCTION: |
648 | X509_get_pubkey 654 | 648 | X509_get_pubkey_parameters 655 EXIST::FUNCTION: |
649 | X509_get_pubkey_parameters 655 | 649 | X509_get_serialNumber 656 EXIST::FUNCTION: |
650 | X509_get_serialNumber 656 | 650 | X509_get_subject_name 657 EXIST::FUNCTION: |
651 | X509_get_subject_name 657 | 651 | X509_gmtime_adj 658 EXIST::FUNCTION: |
652 | X509_gmtime_adj 658 | 652 | X509_issuer_and_serial_cmp 659 EXIST::FUNCTION: |
653 | X509_issuer_and_serial_cmp 659 | 653 | X509_issuer_and_serial_hash 660 EXIST::FUNCTION: |
654 | X509_issuer_and_serial_hash 660 | 654 | X509_issuer_name_cmp 661 EXIST::FUNCTION: |
655 | X509_issuer_name_cmp 661 | 655 | X509_issuer_name_hash 662 EXIST::FUNCTION: |
656 | X509_issuer_name_hash 662 | 656 | X509_load_cert_file 663 EXIST::FUNCTION:STDIO |
657 | X509_load_cert_file 663 | 657 | X509_new 664 EXIST::FUNCTION: |
658 | X509_new 664 | 658 | X509_print 665 EXIST::FUNCTION:BIO |
659 | X509_print 665 | 659 | X509_print_fp 666 EXIST::FUNCTION:FP_API |
660 | X509_print_fp 666 | 660 | X509_set_issuer_name 667 EXIST::FUNCTION: |
661 | X509_set_issuer_name 667 | 661 | X509_set_notAfter 668 EXIST::FUNCTION: |
662 | X509_set_notAfter 668 | 662 | X509_set_notBefore 669 EXIST::FUNCTION: |
663 | X509_set_notBefore 669 | 663 | X509_set_pubkey 670 EXIST::FUNCTION: |
664 | X509_set_pubkey 670 | 664 | X509_set_serialNumber 671 EXIST::FUNCTION: |
665 | X509_set_serialNumber 671 | 665 | X509_set_subject_name 672 EXIST::FUNCTION: |
666 | X509_set_subject_name 672 | 666 | X509_set_version 673 EXIST::FUNCTION: |
667 | X509_set_version 673 | 667 | X509_sign 674 EXIST::FUNCTION:EVP |
668 | X509_sign 674 | 668 | X509_subject_name_cmp 675 EXIST::FUNCTION: |
669 | X509_subject_name_cmp 675 | 669 | X509_subject_name_hash 676 EXIST::FUNCTION: |
670 | X509_subject_name_hash 676 | 670 | X509_to_X509_REQ 677 EXIST::FUNCTION: |
671 | X509_to_X509_REQ 677 | 671 | X509_verify 678 EXIST::FUNCTION:EVP |
672 | X509_verify 678 | 672 | X509_verify_cert 679 EXIST::FUNCTION: |
673 | X509_verify_cert 679 | 673 | X509_verify_cert_error_string 680 EXIST::FUNCTION: |
674 | X509_verify_cert_error_string 680 | 674 | X509v3_add_ext 681 EXIST::FUNCTION: |
675 | X509v3_add_ext 681 | 675 | X509v3_add_extension 682 NOEXIST::FUNCTION: |
676 | X509v3_add_extension 682 | 676 | X509v3_add_netscape_extensions 683 NOEXIST::FUNCTION: |
677 | X509v3_add_netscape_extensions 683 | 677 | X509v3_add_standard_extensions 684 NOEXIST::FUNCTION: |
678 | X509v3_add_standard_extensions 684 | 678 | X509v3_cleanup_extensions 685 NOEXIST::FUNCTION: |
679 | X509v3_cleanup_extensions 685 | 679 | X509v3_data_type_by_NID 686 NOEXIST::FUNCTION: |
680 | X509v3_data_type_by_NID 686 | 680 | X509v3_data_type_by_OBJ 687 NOEXIST::FUNCTION: |
681 | X509v3_data_type_by_OBJ 687 | 681 | X509v3_delete_ext 688 EXIST::FUNCTION: |
682 | X509v3_delete_ext 688 | 682 | X509v3_get_ext 689 EXIST::FUNCTION: |
683 | X509v3_get_ext 689 | 683 | X509v3_get_ext_by_NID 690 EXIST::FUNCTION: |
684 | X509v3_get_ext_by_NID 690 | 684 | X509v3_get_ext_by_OBJ 691 EXIST::FUNCTION: |
685 | X509v3_get_ext_by_OBJ 691 | 685 | X509v3_get_ext_by_critical 692 EXIST::FUNCTION: |
686 | X509v3_get_ext_by_critical 692 | 686 | X509v3_get_ext_count 693 EXIST::FUNCTION: |
687 | X509v3_get_ext_count 693 | 687 | X509v3_pack_string 694 NOEXIST::FUNCTION: |
688 | X509v3_pack_string 694 | 688 | X509v3_pack_type_by_NID 695 NOEXIST::FUNCTION: |
689 | X509v3_pack_type_by_NID 695 | 689 | X509v3_pack_type_by_OBJ 696 NOEXIST::FUNCTION: |
690 | X509v3_pack_type_by_OBJ 696 | 690 | X509v3_unpack_string 697 NOEXIST::FUNCTION: |
691 | X509v3_unpack_string 697 | 691 | _des_crypt 698 NOEXIST::FUNCTION: |
692 | _des_crypt 698 | 692 | a2d_ASN1_OBJECT 699 EXIST::FUNCTION: |
693 | a2d_ASN1_OBJECT 699 | 693 | a2i_ASN1_INTEGER 700 EXIST::FUNCTION:BIO |
694 | a2i_ASN1_INTEGER 700 | 694 | a2i_ASN1_STRING 701 EXIST::FUNCTION:BIO |
695 | a2i_ASN1_STRING 701 | 695 | asn1_Finish 702 EXIST::FUNCTION: |
696 | asn1_Finish 702 | 696 | asn1_GetSequence 703 EXIST::FUNCTION: |
697 | asn1_GetSequence 703 | 697 | bn_div_words 704 EXIST::FUNCTION: |
698 | bn_div64 704 | 698 | bn_expand2 705 EXIST::FUNCTION: |
699 | bn_expand2 705 | 699 | bn_mul_add_words 706 EXIST::FUNCTION: |
700 | bn_mul_add_words 706 | 700 | bn_mul_words 707 EXIST::FUNCTION: |
701 | bn_mul_words 707 | 701 | BN_uadd 708 EXIST::FUNCTION: |
702 | bn_qadd 708 | 702 | BN_usub 709 EXIST::FUNCTION: |
703 | bn_qsub 709 | 703 | bn_sqr_words 710 EXIST::FUNCTION: |
704 | bn_sqr_words 710 | 704 | _ossl_old_crypt 711 EXIST:!NeXT,!PERL5,!__FreeBSD__:FUNCTION:DES |
705 | crypt 711 | 705 | d2i_ASN1_BIT_STRING 712 EXIST::FUNCTION: |
706 | d2i_ASN1_BIT_STRING 712 | 706 | d2i_ASN1_BOOLEAN 713 EXIST::FUNCTION: |
707 | d2i_ASN1_BOOLEAN 713 | 707 | d2i_ASN1_HEADER 714 EXIST::FUNCTION: |
708 | d2i_ASN1_HEADER 714 | 708 | d2i_ASN1_IA5STRING 715 EXIST::FUNCTION: |
709 | d2i_ASN1_IA5STRING 715 | 709 | d2i_ASN1_INTEGER 716 EXIST::FUNCTION: |
710 | d2i_ASN1_INTEGER 716 | 710 | d2i_ASN1_OBJECT 717 EXIST::FUNCTION: |
711 | d2i_ASN1_OBJECT 717 | 711 | d2i_ASN1_OCTET_STRING 718 EXIST::FUNCTION: |
712 | d2i_ASN1_OCTET_STRING 718 | 712 | d2i_ASN1_PRINTABLE 719 EXIST::FUNCTION: |
713 | d2i_ASN1_PRINTABLE 719 | 713 | d2i_ASN1_PRINTABLESTRING 720 EXIST::FUNCTION: |
714 | d2i_ASN1_PRINTABLESTRING 720 | 714 | d2i_ASN1_SET 721 EXIST::FUNCTION: |
715 | d2i_ASN1_SET 721 | 715 | d2i_ASN1_T61STRING 722 EXIST::FUNCTION: |
716 | d2i_ASN1_T61STRING 722 | 716 | d2i_ASN1_TYPE 723 EXIST::FUNCTION: |
717 | d2i_ASN1_TYPE 723 | 717 | d2i_ASN1_UTCTIME 724 EXIST::FUNCTION: |
718 | d2i_ASN1_UTCTIME 724 | 718 | d2i_ASN1_bytes 725 EXIST::FUNCTION: |
719 | d2i_ASN1_bytes 725 | 719 | d2i_ASN1_type_bytes 726 EXIST::FUNCTION: |
720 | d2i_ASN1_type_bytes 726 | 720 | d2i_DHparams 727 EXIST::FUNCTION:DH |
721 | d2i_DHparams 727 | 721 | d2i_DSAPrivateKey 728 EXIST::FUNCTION:DSA |
722 | d2i_DSAPrivateKey 728 | 722 | d2i_DSAPrivateKey_bio 729 EXIST::FUNCTION:BIO,DSA |
723 | d2i_DSAPrivateKey_bio 729 | 723 | d2i_DSAPrivateKey_fp 730 EXIST::FUNCTION:DSA,FP_API |
724 | d2i_DSAPrivateKey_fp 730 | 724 | d2i_DSAPublicKey 731 EXIST::FUNCTION:DSA |
725 | d2i_DSAPublicKey 731 | 725 | d2i_DSAparams 732 EXIST::FUNCTION:DSA |
726 | d2i_DSAparams 732 | 726 | d2i_NETSCAPE_SPKAC 733 EXIST::FUNCTION: |
727 | d2i_NETSCAPE_SPKAC 733 | 727 | d2i_NETSCAPE_SPKI 734 EXIST::FUNCTION: |
728 | d2i_NETSCAPE_SPKI 734 | 728 | d2i_Netscape_RSA 735 EXIST::FUNCTION:RSA |
729 | d2i_Netscape_RSA 735 | 729 | d2i_PKCS7 736 EXIST::FUNCTION: |
730 | d2i_PKCS7 736 | 730 | d2i_PKCS7_DIGEST 737 EXIST::FUNCTION: |
731 | d2i_PKCS7_DIGEST 737 | 731 | d2i_PKCS7_ENCRYPT 738 EXIST::FUNCTION: |
732 | d2i_PKCS7_ENCRYPT 738 | 732 | d2i_PKCS7_ENC_CONTENT 739 EXIST::FUNCTION: |
733 | d2i_PKCS7_ENC_CONTENT 739 | 733 | d2i_PKCS7_ENVELOPE 740 EXIST::FUNCTION: |
734 | d2i_PKCS7_ENVELOPE 740 | 734 | d2i_PKCS7_ISSUER_AND_SERIAL 741 EXIST::FUNCTION: |
735 | d2i_PKCS7_ISSUER_AND_SERIAL 741 | 735 | d2i_PKCS7_RECIP_INFO 742 EXIST::FUNCTION: |
736 | d2i_PKCS7_RECIP_INFO 742 | 736 | d2i_PKCS7_SIGNED 743 EXIST::FUNCTION: |
737 | d2i_PKCS7_SIGNED 743 | 737 | d2i_PKCS7_SIGNER_INFO 744 EXIST::FUNCTION: |
738 | d2i_PKCS7_SIGNER_INFO 744 | 738 | d2i_PKCS7_SIGN_ENVELOPE 745 EXIST::FUNCTION: |
739 | d2i_PKCS7_SIGN_ENVELOPE 745 | 739 | d2i_PKCS7_bio 746 EXIST::FUNCTION: |
740 | d2i_PKCS7_bio 746 | 740 | d2i_PKCS7_fp 747 EXIST::FUNCTION:FP_API |
741 | d2i_PKCS7_fp 747 | 741 | d2i_PrivateKey 748 EXIST::FUNCTION: |
742 | d2i_PrivateKey 748 | 742 | d2i_PublicKey 749 EXIST::FUNCTION: |
743 | d2i_PublicKey 749 | 743 | d2i_RSAPrivateKey 750 EXIST::FUNCTION:RSA |
744 | d2i_RSAPrivateKey 750 | 744 | d2i_RSAPrivateKey_bio 751 EXIST::FUNCTION:BIO,RSA |
745 | d2i_RSAPrivateKey_bio 751 | 745 | d2i_RSAPrivateKey_fp 752 EXIST::FUNCTION:FP_API,RSA |
746 | d2i_RSAPrivateKey_fp 752 | 746 | d2i_RSAPublicKey 753 EXIST::FUNCTION:RSA |
747 | d2i_RSAPublicKey 753 | 747 | d2i_X509 754 EXIST::FUNCTION: |
748 | d2i_X509 754 | 748 | d2i_X509_ALGOR 755 EXIST::FUNCTION: |
749 | d2i_X509_ALGOR 755 | 749 | d2i_X509_ATTRIBUTE 756 EXIST::FUNCTION: |
750 | d2i_X509_ATTRIBUTE 756 | 750 | d2i_X509_CINF 757 EXIST::FUNCTION: |
751 | d2i_X509_CINF 757 | 751 | d2i_X509_CRL 758 EXIST::FUNCTION: |
752 | d2i_X509_CRL 758 | 752 | d2i_X509_CRL_INFO 759 EXIST::FUNCTION: |
753 | d2i_X509_CRL_INFO 759 | 753 | d2i_X509_CRL_bio 760 EXIST::FUNCTION:BIO |
754 | d2i_X509_CRL_bio 760 | 754 | d2i_X509_CRL_fp 761 EXIST::FUNCTION:FP_API |
755 | d2i_X509_CRL_fp 761 | 755 | d2i_X509_EXTENSION 762 EXIST::FUNCTION: |
756 | d2i_X509_EXTENSION 762 | 756 | d2i_X509_NAME 763 EXIST::FUNCTION: |
757 | d2i_X509_NAME 763 | 757 | d2i_X509_NAME_ENTRY 764 EXIST::FUNCTION: |
758 | d2i_X509_NAME_ENTRY 764 | 758 | d2i_X509_PKEY 765 EXIST::FUNCTION: |
759 | d2i_X509_PKEY 765 | 759 | d2i_X509_PUBKEY 766 EXIST::FUNCTION: |
760 | d2i_X509_PUBKEY 766 | 760 | d2i_X509_REQ 767 EXIST::FUNCTION: |
761 | d2i_X509_REQ 767 | 761 | d2i_X509_REQ_INFO 768 EXIST::FUNCTION: |
762 | d2i_X509_REQ_INFO 768 | 762 | d2i_X509_REQ_bio 769 EXIST::FUNCTION:BIO |
763 | d2i_X509_REQ_bio 769 | 763 | d2i_X509_REQ_fp 770 EXIST::FUNCTION:FP_API |
764 | d2i_X509_REQ_fp 770 | 764 | d2i_X509_REVOKED 771 EXIST::FUNCTION: |
765 | d2i_X509_REVOKED 771 | 765 | d2i_X509_SIG 772 EXIST::FUNCTION: |
766 | d2i_X509_SIG 772 | 766 | d2i_X509_VAL 773 EXIST::FUNCTION: |
767 | d2i_X509_VAL 773 | 767 | d2i_X509_bio 774 EXIST::FUNCTION:BIO |
768 | d2i_X509_bio 774 | 768 | d2i_X509_fp 775 EXIST::FUNCTION:FP_API |
769 | d2i_X509_fp 775 | 769 | DES_cbc_cksum 777 EXIST::FUNCTION:DES |
770 | des_cbc_cksum 777 | 770 | DES_cbc_encrypt 778 EXIST::FUNCTION:DES |
771 | des_cbc_encrypt 778 | 771 | DES_cblock_print_file 779 NOEXIST::FUNCTION: |
772 | des_cblock_print_file 779 | 772 | DES_cfb64_encrypt 780 EXIST::FUNCTION:DES |
773 | des_cfb64_encrypt 780 | 773 | DES_cfb_encrypt 781 EXIST::FUNCTION:DES |
774 | des_cfb_encrypt 781 | 774 | DES_decrypt3 782 EXIST::FUNCTION:DES |
775 | des_decrypt3 782 | 775 | DES_ecb3_encrypt 783 EXIST::FUNCTION:DES |
776 | des_ecb3_encrypt 783 | 776 | DES_ecb_encrypt 784 EXIST::FUNCTION:DES |
777 | des_ecb_encrypt 784 | 777 | DES_ede3_cbc_encrypt 785 EXIST::FUNCTION:DES |
778 | des_ede3_cbc_encrypt 785 | 778 | DES_ede3_cfb64_encrypt 786 EXIST::FUNCTION:DES |
779 | des_ede3_cfb64_encrypt 786 | 779 | DES_ede3_ofb64_encrypt 787 EXIST::FUNCTION:DES |
780 | des_ede3_ofb64_encrypt 787 | 780 | DES_enc_read 788 EXIST::FUNCTION:DES |
781 | des_enc_read 788 | 781 | DES_enc_write 789 EXIST::FUNCTION:DES |
782 | des_enc_write 789 | 782 | DES_encrypt1 790 EXIST::FUNCTION:DES |
783 | des_encrypt 790 | 783 | DES_encrypt2 791 EXIST::FUNCTION:DES |
784 | des_encrypt2 791 | 784 | DES_encrypt3 792 EXIST::FUNCTION:DES |
785 | des_encrypt3 792 | 785 | DES_fcrypt 793 EXIST::FUNCTION:DES |
786 | des_fcrypt 793 | 786 | DES_is_weak_key 794 EXIST::FUNCTION:DES |
787 | des_is_weak_key 794 | 787 | DES_key_sched 795 EXIST::FUNCTION:DES |
788 | des_key_sched 795 | 788 | DES_ncbc_encrypt 796 EXIST::FUNCTION:DES |
789 | des_ncbc_encrypt 796 | 789 | DES_ofb64_encrypt 797 EXIST::FUNCTION:DES |
790 | des_ofb64_encrypt 797 | 790 | DES_ofb_encrypt 798 EXIST::FUNCTION:DES |
791 | des_ofb_encrypt 798 | 791 | DES_options 799 EXIST::FUNCTION:DES |
792 | des_options 799 | 792 | DES_pcbc_encrypt 800 EXIST::FUNCTION:DES |
793 | des_pcbc_encrypt 800 | 793 | DES_quad_cksum 801 EXIST::FUNCTION:DES |
794 | des_quad_cksum 801 | 794 | DES_random_key 802 EXIST::FUNCTION:DES |
795 | des_random_key 802 | 795 | _ossl_old_des_random_seed 803 EXIST::FUNCTION:DES |
796 | des_random_seed 803 | 796 | _ossl_old_des_read_2passwords 804 EXIST::FUNCTION:DES |
797 | des_read_2passwords 804 | 797 | _ossl_old_des_read_password 805 EXIST::FUNCTION:DES |
798 | des_read_password 805 | 798 | _ossl_old_des_read_pw 806 EXIST::FUNCTION: |
799 | des_read_pw 806 | 799 | _ossl_old_des_read_pw_string 807 EXIST::FUNCTION: |
800 | des_read_pw_string 807 | 800 | DES_set_key 808 EXIST::FUNCTION:DES |
801 | des_set_key 808 | 801 | DES_set_odd_parity 809 EXIST::FUNCTION:DES |
802 | des_set_odd_parity 809 | 802 | DES_string_to_2keys 810 EXIST::FUNCTION:DES |
803 | des_string_to_2keys 810 | 803 | DES_string_to_key 811 EXIST::FUNCTION:DES |
804 | des_string_to_key 811 | 804 | DES_xcbc_encrypt 812 EXIST::FUNCTION:DES |
805 | des_xcbc_encrypt 812 | 805 | DES_xwhite_in2out 813 EXIST::FUNCTION:DES |
806 | des_xwhite_in2out 813 | 806 | fcrypt_body 814 NOEXIST::FUNCTION: |
807 | fcrypt_body 814 | 807 | i2a_ASN1_INTEGER 815 EXIST::FUNCTION:BIO |
808 | i2a_ASN1_INTEGER 815 | 808 | i2a_ASN1_OBJECT 816 EXIST::FUNCTION:BIO |
809 | i2a_ASN1_OBJECT 816 | 809 | i2a_ASN1_STRING 817 EXIST::FUNCTION:BIO |
810 | i2a_ASN1_STRING 817 | 810 | i2d_ASN1_BIT_STRING 818 EXIST::FUNCTION: |
811 | i2d_ASN1_BIT_STRING 818 | 811 | i2d_ASN1_BOOLEAN 819 EXIST::FUNCTION: |
812 | i2d_ASN1_BOOLEAN 819 | 812 | i2d_ASN1_HEADER 820 EXIST::FUNCTION: |
813 | i2d_ASN1_HEADER 820 | 813 | i2d_ASN1_IA5STRING 821 EXIST::FUNCTION: |
814 | i2d_ASN1_IA5STRING 821 | 814 | i2d_ASN1_INTEGER 822 EXIST::FUNCTION: |
815 | i2d_ASN1_INTEGER 822 | 815 | i2d_ASN1_OBJECT 823 EXIST::FUNCTION: |
816 | i2d_ASN1_OBJECT 823 | 816 | i2d_ASN1_OCTET_STRING 824 EXIST::FUNCTION: |
817 | i2d_ASN1_OCTET_STRING 824 | 817 | i2d_ASN1_PRINTABLE 825 EXIST::FUNCTION: |
818 | i2d_ASN1_PRINTABLE 825 | 818 | i2d_ASN1_SET 826 EXIST::FUNCTION: |
819 | i2d_ASN1_SET 826 | 819 | i2d_ASN1_TYPE 827 EXIST::FUNCTION: |
820 | i2d_ASN1_TYPE 827 | 820 | i2d_ASN1_UTCTIME 828 EXIST::FUNCTION: |
821 | i2d_ASN1_UTCTIME 828 | 821 | i2d_ASN1_bytes 829 EXIST::FUNCTION: |
822 | i2d_ASN1_bytes 829 | 822 | i2d_DHparams 830 EXIST::FUNCTION:DH |
823 | i2d_DHparams 830 | 823 | i2d_DSAPrivateKey 831 EXIST::FUNCTION:DSA |
824 | i2d_DSAPrivateKey 831 | 824 | i2d_DSAPrivateKey_bio 832 EXIST::FUNCTION:BIO,DSA |
825 | i2d_DSAPrivateKey_bio 832 | 825 | i2d_DSAPrivateKey_fp 833 EXIST::FUNCTION:DSA,FP_API |
826 | i2d_DSAPrivateKey_fp 833 | 826 | i2d_DSAPublicKey 834 EXIST::FUNCTION:DSA |
827 | i2d_DSAPublicKey 834 | 827 | i2d_DSAparams 835 EXIST::FUNCTION:DSA |
828 | i2d_DSAparams 835 | 828 | i2d_NETSCAPE_SPKAC 836 EXIST::FUNCTION: |
829 | i2d_NETSCAPE_SPKAC 836 | 829 | i2d_NETSCAPE_SPKI 837 EXIST::FUNCTION: |
830 | i2d_NETSCAPE_SPKI 837 | 830 | i2d_Netscape_RSA 838 EXIST::FUNCTION:RSA |
831 | i2d_Netscape_RSA 838 | 831 | i2d_PKCS7 839 EXIST::FUNCTION: |
832 | i2d_PKCS7 839 | 832 | i2d_PKCS7_DIGEST 840 EXIST::FUNCTION: |
833 | i2d_PKCS7_DIGEST 840 | 833 | i2d_PKCS7_ENCRYPT 841 EXIST::FUNCTION: |
834 | i2d_PKCS7_ENCRYPT 841 | 834 | i2d_PKCS7_ENC_CONTENT 842 EXIST::FUNCTION: |
835 | i2d_PKCS7_ENC_CONTENT 842 | 835 | i2d_PKCS7_ENVELOPE 843 EXIST::FUNCTION: |
836 | i2d_PKCS7_ENVELOPE 843 | 836 | i2d_PKCS7_ISSUER_AND_SERIAL 844 EXIST::FUNCTION: |
837 | i2d_PKCS7_ISSUER_AND_SERIAL 844 | 837 | i2d_PKCS7_RECIP_INFO 845 EXIST::FUNCTION: |
838 | i2d_PKCS7_RECIP_INFO 845 | 838 | i2d_PKCS7_SIGNED 846 EXIST::FUNCTION: |
839 | i2d_PKCS7_SIGNED 846 | 839 | i2d_PKCS7_SIGNER_INFO 847 EXIST::FUNCTION: |
840 | i2d_PKCS7_SIGNER_INFO 847 | 840 | i2d_PKCS7_SIGN_ENVELOPE 848 EXIST::FUNCTION: |
841 | i2d_PKCS7_SIGN_ENVELOPE 848 | 841 | i2d_PKCS7_bio 849 EXIST::FUNCTION: |
842 | i2d_PKCS7_bio 849 | 842 | i2d_PKCS7_fp 850 EXIST::FUNCTION:FP_API |
843 | i2d_PKCS7_fp 850 | 843 | i2d_PrivateKey 851 EXIST::FUNCTION: |
844 | i2d_PrivateKey 851 | 844 | i2d_PublicKey 852 EXIST::FUNCTION: |
845 | i2d_PublicKey 852 | 845 | i2d_RSAPrivateKey 853 EXIST::FUNCTION:RSA |
846 | i2d_RSAPrivateKey 853 | 846 | i2d_RSAPrivateKey_bio 854 EXIST::FUNCTION:BIO,RSA |
847 | i2d_RSAPrivateKey_bio 854 | 847 | i2d_RSAPrivateKey_fp 855 EXIST::FUNCTION:FP_API,RSA |
848 | i2d_RSAPrivateKey_fp 855 | 848 | i2d_RSAPublicKey 856 EXIST::FUNCTION:RSA |
849 | i2d_RSAPublicKey 856 | 849 | i2d_X509 857 EXIST::FUNCTION: |
850 | i2d_X509 857 | 850 | i2d_X509_ALGOR 858 EXIST::FUNCTION: |
851 | i2d_X509_ALGOR 858 | 851 | i2d_X509_ATTRIBUTE 859 EXIST::FUNCTION: |
852 | i2d_X509_ATTRIBUTE 859 | 852 | i2d_X509_CINF 860 EXIST::FUNCTION: |
853 | i2d_X509_CINF 860 | 853 | i2d_X509_CRL 861 EXIST::FUNCTION: |
854 | i2d_X509_CRL 861 | 854 | i2d_X509_CRL_INFO 862 EXIST::FUNCTION: |
855 | i2d_X509_CRL_INFO 862 | 855 | i2d_X509_CRL_bio 863 EXIST::FUNCTION:BIO |
856 | i2d_X509_CRL_bio 863 | 856 | i2d_X509_CRL_fp 864 EXIST::FUNCTION:FP_API |
857 | i2d_X509_CRL_fp 864 | 857 | i2d_X509_EXTENSION 865 EXIST::FUNCTION: |
858 | i2d_X509_EXTENSION 865 | 858 | i2d_X509_NAME 866 EXIST::FUNCTION: |
859 | i2d_X509_NAME 866 | 859 | i2d_X509_NAME_ENTRY 867 EXIST::FUNCTION: |
860 | i2d_X509_NAME_ENTRY 867 | 860 | i2d_X509_PKEY 868 EXIST::FUNCTION: |
861 | i2d_X509_PKEY 868 | 861 | i2d_X509_PUBKEY 869 EXIST::FUNCTION: |
862 | i2d_X509_PUBKEY 869 | 862 | i2d_X509_REQ 870 EXIST::FUNCTION: |
863 | i2d_X509_REQ 870 | 863 | i2d_X509_REQ_INFO 871 EXIST::FUNCTION: |
864 | i2d_X509_REQ_INFO 871 | 864 | i2d_X509_REQ_bio 872 EXIST::FUNCTION:BIO |
865 | i2d_X509_REQ_bio 872 | 865 | i2d_X509_REQ_fp 873 EXIST::FUNCTION:FP_API |
866 | i2d_X509_REQ_fp 873 | 866 | i2d_X509_REVOKED 874 EXIST::FUNCTION: |
867 | i2d_X509_REVOKED 874 | 867 | i2d_X509_SIG 875 EXIST::FUNCTION: |
868 | i2d_X509_SIG 875 | 868 | i2d_X509_VAL 876 EXIST::FUNCTION: |
869 | i2d_X509_VAL 876 | 869 | i2d_X509_bio 877 EXIST::FUNCTION:BIO |
870 | i2d_X509_bio 877 | 870 | i2d_X509_fp 878 EXIST::FUNCTION:FP_API |
871 | i2d_X509_fp 878 | 871 | idea_cbc_encrypt 879 EXIST::FUNCTION:IDEA |
872 | idea_cbc_encrypt 879 | 872 | idea_cfb64_encrypt 880 EXIST::FUNCTION:IDEA |
873 | idea_cfb64_encrypt 880 | 873 | idea_ecb_encrypt 881 EXIST::FUNCTION:IDEA |
874 | idea_ecb_encrypt 881 | 874 | idea_encrypt 882 EXIST::FUNCTION:IDEA |
875 | idea_encrypt 882 | 875 | idea_ofb64_encrypt 883 EXIST::FUNCTION:IDEA |
876 | idea_ofb64_encrypt 883 | 876 | idea_options 884 EXIST::FUNCTION:IDEA |
877 | idea_options 884 | 877 | idea_set_decrypt_key 885 EXIST::FUNCTION:IDEA |
878 | idea_set_decrypt_key 885 | 878 | idea_set_encrypt_key 886 EXIST::FUNCTION:IDEA |
879 | idea_set_encrypt_key 886 | 879 | lh_delete 887 EXIST::FUNCTION: |
880 | lh_delete 887 | 880 | lh_doall 888 EXIST::FUNCTION: |
881 | lh_doall 888 | 881 | lh_doall_arg 889 EXIST::FUNCTION: |
882 | lh_doall_arg 889 | 882 | lh_free 890 EXIST::FUNCTION: |
883 | lh_free 890 | 883 | lh_insert 891 EXIST::FUNCTION: |
884 | lh_insert 891 | 884 | lh_new 892 EXIST::FUNCTION: |
885 | lh_new 892 | 885 | lh_node_stats 893 EXIST::FUNCTION:FP_API |
886 | lh_node_stats 893 | 886 | lh_node_stats_bio 894 EXIST::FUNCTION:BIO |
887 | lh_node_stats_bio 894 | 887 | lh_node_usage_stats 895 EXIST::FUNCTION:FP_API |
888 | lh_node_usage_stats 895 | 888 | lh_node_usage_stats_bio 896 EXIST::FUNCTION:BIO |
889 | lh_node_usage_stats_bio 896 | 889 | lh_retrieve 897 EXIST::FUNCTION: |
890 | lh_retrieve 897 | 890 | lh_stats 898 EXIST::FUNCTION:FP_API |
891 | lh_stats 898 | 891 | lh_stats_bio 899 EXIST::FUNCTION:BIO |
892 | lh_stats_bio 899 | 892 | lh_strhash 900 EXIST::FUNCTION: |
893 | lh_strhash 900 | 893 | sk_delete 901 EXIST::FUNCTION: |
894 | sk_delete 901 | 894 | sk_delete_ptr 902 EXIST::FUNCTION: |
895 | sk_delete_ptr 902 | 895 | sk_dup 903 EXIST::FUNCTION: |
896 | sk_dup 903 | 896 | sk_find 904 EXIST::FUNCTION: |
897 | sk_find 904 | 897 | sk_free 905 EXIST::FUNCTION: |
898 | sk_free 905 | 898 | sk_insert 906 EXIST::FUNCTION: |
899 | sk_insert 906 | 899 | sk_new 907 EXIST::FUNCTION: |
900 | sk_new 907 | 900 | sk_pop 908 EXIST::FUNCTION: |
901 | sk_pop 908 | 901 | sk_pop_free 909 EXIST::FUNCTION: |
902 | sk_pop_free 909 | 902 | sk_push 910 EXIST::FUNCTION: |
903 | sk_push 910 | 903 | sk_set_cmp_func 911 EXIST::FUNCTION: |
904 | sk_set_cmp_func 911 | 904 | sk_shift 912 EXIST::FUNCTION: |
905 | sk_shift 912 | 905 | sk_unshift 913 EXIST::FUNCTION: |
906 | sk_unshift 913 | 906 | sk_zero 914 EXIST::FUNCTION: |
907 | sk_zero 914 | 907 | BIO_f_nbio_test 915 EXIST::FUNCTION: |
908 | BIO_f_nbio_test 915 | 908 | ASN1_TYPE_get 916 EXIST::FUNCTION: |
909 | ASN1_TYPE_get 916 | 909 | ASN1_TYPE_set 917 EXIST::FUNCTION: |
910 | ASN1_TYPE_set 917 | 910 | PKCS7_content_free 918 NOEXIST::FUNCTION: |
911 | PKCS7_content_free 918 | 911 | ERR_load_PKCS7_strings 919 EXIST::FUNCTION: |
912 | ERR_load_PKCS7_strings 919 | 912 | X509_find_by_issuer_and_serial 920 EXIST::FUNCTION: |
913 | X509_find_by_issuer_and_serial 920 | 913 | X509_find_by_subject 921 EXIST::FUNCTION: |
914 | X509_find_by_subject 921 | 914 | PKCS7_ctrl 927 EXIST::FUNCTION: |
915 | PKCS7_ctrl 927 | 915 | PKCS7_set_type 928 EXIST::FUNCTION: |
916 | PKCS7_set_type 928 | 916 | PKCS7_set_content 929 EXIST::FUNCTION: |
917 | PKCS7_set_content 929 | 917 | PKCS7_SIGNER_INFO_set 930 EXIST::FUNCTION: |
918 | PKCS7_SIGNER_INFO_set 930 | 918 | PKCS7_add_signer 931 EXIST::FUNCTION: |
919 | PKCS7_add_signer 931 | 919 | PKCS7_add_certificate 932 EXIST::FUNCTION: |
920 | PKCS7_add_certificate 932 | 920 | PKCS7_add_crl 933 EXIST::FUNCTION: |
921 | PKCS7_add_crl 933 | 921 | PKCS7_content_new 934 EXIST::FUNCTION: |
922 | PKCS7_content_new 934 | 922 | PKCS7_dataSign 935 NOEXIST::FUNCTION: |
923 | PKCS7_dataSign 935 | 923 | PKCS7_dataVerify 936 EXIST::FUNCTION: |
924 | PKCS7_dataVerify 936 | 924 | PKCS7_dataInit 937 EXIST::FUNCTION: |
925 | PKCS7_dataInit 937 | 925 | PKCS7_add_signature 938 EXIST::FUNCTION: |
926 | PKCS7_add_signature 938 | 926 | PKCS7_cert_from_signer_info 939 EXIST::FUNCTION: |
927 | PKCS7_cert_from_signer_info 939 | 927 | PKCS7_get_signer_info 940 EXIST::FUNCTION: |
928 | PKCS7_get_signer_info 940 | 928 | EVP_delete_alias 941 NOEXIST::FUNCTION: |
929 | EVP_delete_alias 941 | 929 | EVP_mdc2 942 EXIST::FUNCTION:MDC2 |
930 | EVP_mdc2 942 | 930 | PEM_read_bio_RSAPublicKey 943 EXIST::FUNCTION:RSA |
931 | PEM_read_bio_RSAPublicKey 943 | 931 | PEM_write_bio_RSAPublicKey 944 EXIST::FUNCTION:RSA |
932 | PEM_write_bio_RSAPublicKey 944 | 932 | d2i_RSAPublicKey_bio 945 EXIST::FUNCTION:BIO,RSA |
933 | d2i_RSAPublicKey_bio 945 | 933 | i2d_RSAPublicKey_bio 946 EXIST::FUNCTION:BIO,RSA |
934 | i2d_RSAPublicKey_bio 946 | 934 | PEM_read_RSAPublicKey 947 EXIST:!WIN16:FUNCTION:RSA |
935 | PEM_read_RSAPublicKey 947 | 935 | PEM_write_RSAPublicKey 949 EXIST:!WIN16:FUNCTION:RSA |
936 | PEM_write_RSAPublicKey 949 | 936 | d2i_RSAPublicKey_fp 952 EXIST::FUNCTION:FP_API,RSA |
937 | d2i_RSAPublicKey_fp 952 | 937 | i2d_RSAPublicKey_fp 954 EXIST::FUNCTION:FP_API,RSA |
938 | i2d_RSAPublicKey_fp 954 | 938 | BIO_copy_next_retry 955 EXIST::FUNCTION: |
939 | BIO_copy_next_retry 955 | 939 | RSA_flags 956 EXIST::FUNCTION:RSA |
940 | RSA_flags 956 | 940 | X509_STORE_add_crl 957 EXIST::FUNCTION: |
941 | X509_STORE_add_crl 957 | 941 | X509_load_crl_file 958 EXIST::FUNCTION:STDIO |
942 | X509_load_crl_file 958 | 942 | EVP_rc2_40_cbc 959 EXIST::FUNCTION:RC2 |
943 | EVP_rc2_40_cbc 959 | 943 | EVP_rc4_40 960 EXIST::FUNCTION:RC4 |
944 | EVP_rc4_40 960 | 944 | EVP_CIPHER_CTX_init 961 EXIST::FUNCTION: |
945 | EVP_CIPHER_CTX_init 961 | 945 | HMAC 962 EXIST::FUNCTION:HMAC |
946 | HMAC 962 | 946 | HMAC_Init 963 EXIST::FUNCTION:HMAC |
947 | HMAC_Init 963 | 947 | HMAC_Update 964 EXIST::FUNCTION:HMAC |
948 | HMAC_Update 964 | 948 | HMAC_Final 965 EXIST::FUNCTION:HMAC |
949 | HMAC_Final 965 | 949 | ERR_get_next_error_library 966 EXIST::FUNCTION: |
950 | ERR_get_next_error_library 966 | 950 | EVP_PKEY_cmp_parameters 967 EXIST::FUNCTION: |
951 | EVP_PKEY_cmp_parameters 967 | 951 | HMAC_cleanup 968 NOEXIST::FUNCTION: |
952 | HMAC_cleanup 968 | 952 | BIO_ptr_ctrl 969 EXIST::FUNCTION: |
953 | BIO_ptr_ctrl 969 | 953 | BIO_new_file_internal 970 EXIST:WIN16:FUNCTION:FP_API |
954 | BIO_new_file_internal 970 | 954 | BIO_new_fp_internal 971 EXIST:WIN16:FUNCTION:FP_API |
955 | BIO_new_fp_internal 971 | 955 | BIO_s_file_internal 972 EXIST:WIN16:FUNCTION:FP_API |
956 | BIO_s_file_internal 972 | 956 | BN_BLINDING_convert 973 EXIST::FUNCTION: |
957 | BN_BLINDING_convert 973 | 957 | BN_BLINDING_invert 974 EXIST::FUNCTION: |
958 | BN_BLINDING_invert 974 | 958 | BN_BLINDING_update 975 EXIST::FUNCTION: |
959 | BN_BLINDING_update 975 | 959 | RSA_blinding_on 977 EXIST::FUNCTION:RSA |
960 | RSA_blinding_on 977 | 960 | RSA_blinding_off 978 EXIST::FUNCTION:RSA |
961 | RSA_blinding_off 978 | 961 | i2t_ASN1_OBJECT 979 EXIST::FUNCTION: |
962 | i2t_ASN1_OBJECT 979 | 962 | BN_BLINDING_new 980 EXIST::FUNCTION: |
963 | BN_BLINDING_new 980 | 963 | BN_BLINDING_free 981 EXIST::FUNCTION: |
964 | BN_BLINDING_free 981 | 964 | EVP_cast5_cbc 983 EXIST::FUNCTION:CAST |
965 | EVP_cast5_cbc 983 | 965 | EVP_cast5_cfb 984 EXIST::FUNCTION:CAST |
966 | EVP_cast5_cfb 984 | 966 | EVP_cast5_ecb 985 EXIST::FUNCTION:CAST |
967 | EVP_cast5_ecb 985 | 967 | EVP_cast5_ofb 986 EXIST::FUNCTION:CAST |
968 | EVP_cast5_ofb 986 | 968 | BF_decrypt 987 EXIST::FUNCTION:BF |
969 | BF_decrypt 987 | 969 | CAST_set_key 988 EXIST::FUNCTION:CAST |
970 | CAST_set_key 988 | 970 | CAST_encrypt 989 EXIST::FUNCTION:CAST |
971 | CAST_encrypt 989 | 971 | CAST_decrypt 990 EXIST::FUNCTION:CAST |
972 | CAST_decrypt 990 | 972 | CAST_ecb_encrypt 991 EXIST::FUNCTION:CAST |
973 | CAST_ecb_encrypt 991 | 973 | CAST_cbc_encrypt 992 EXIST::FUNCTION:CAST |
974 | CAST_cbc_encrypt 992 | 974 | CAST_cfb64_encrypt 993 EXIST::FUNCTION:CAST |
975 | CAST_cfb64_encrypt 993 | 975 | CAST_ofb64_encrypt 994 EXIST::FUNCTION:CAST |
976 | CAST_ofb64_encrypt 994 | 976 | RC2_decrypt 995 EXIST::FUNCTION:RC2 |
977 | RC2_decrypt 995 | 977 | OBJ_create_objects 997 EXIST::FUNCTION: |
978 | OBJ_create_objects 997 | 978 | BN_exp 998 EXIST::FUNCTION: |
979 | BN_exp 998 | 979 | BN_mul_word 999 EXIST::FUNCTION: |
980 | BN_mul_word 999 | 980 | BN_sub_word 1000 EXIST::FUNCTION: |
981 | BN_sub_word 1000 | 981 | BN_dec2bn 1001 EXIST::FUNCTION: |
982 | BN_dec2bn 1001 | 982 | BN_bn2dec 1002 EXIST::FUNCTION: |
983 | BN_bn2dec 1002 | 983 | BIO_ghbn_ctrl 1003 EXIST::FUNCTION: |
984 | BIO_ghbn_ctrl 1003 | 984 | CRYPTO_free_ex_data 1004 EXIST::FUNCTION: |
985 | CRYPTO_free_ex_data 1004 | 985 | CRYPTO_get_ex_data 1005 EXIST::FUNCTION: |
986 | CRYPTO_get_ex_data 1005 | 986 | CRYPTO_set_ex_data 1007 EXIST::FUNCTION: |
987 | CRYPTO_set_ex_data 1007 | 987 | ERR_load_CRYPTO_strings 1009 EXIST:!VMS,!WIN16:FUNCTION: |
988 | ERR_load_CRYPTO_strings 1009 | 988 | ERR_load_CRYPTOlib_strings 1009 EXIST:VMS,WIN16:FUNCTION: |
989 | ERR_load_CRYPTOlib_strings 1009 | 989 | EVP_PKEY_bits 1010 EXIST::FUNCTION: |
990 | EVP_PKEY_bits 1010 | 990 | MD5_Transform 1011 EXIST::FUNCTION:MD5 |
991 | MD5_Transform 1011 | 991 | SHA1_Transform 1012 EXIST::FUNCTION:SHA,SHA1 |
992 | SHA1_Transform 1012 | 992 | SHA_Transform 1013 EXIST::FUNCTION:SHA,SHA0 |
993 | SHA_Transform 1013 | 993 | X509_STORE_CTX_get_chain 1014 EXIST::FUNCTION: |
994 | X509_STORE_CTX_get_chain 1014 | 994 | X509_STORE_CTX_get_current_cert 1015 EXIST::FUNCTION: |
995 | X509_STORE_CTX_get_current_cert 1015 | 995 | X509_STORE_CTX_get_error 1016 EXIST::FUNCTION: |
996 | X509_STORE_CTX_get_error 1016 | 996 | X509_STORE_CTX_get_error_depth 1017 EXIST::FUNCTION: |
997 | X509_STORE_CTX_get_error_depth 1017 | 997 | X509_STORE_CTX_get_ex_data 1018 EXIST::FUNCTION: |
998 | X509_STORE_CTX_get_ex_data 1018 | 998 | X509_STORE_CTX_set_cert 1020 EXIST::FUNCTION: |
999 | X509_STORE_CTX_set_cert 1020 | 999 | X509_STORE_CTX_set_chain 1021 EXIST::FUNCTION: |
1000 | X509_STORE_CTX_set_chain 1021 | 1000 | X509_STORE_CTX_set_error 1022 EXIST::FUNCTION: |
1001 | X509_STORE_CTX_set_error 1022 | 1001 | X509_STORE_CTX_set_ex_data 1023 EXIST::FUNCTION: |
1002 | X509_STORE_CTX_set_ex_data 1023 | 1002 | CRYPTO_dup_ex_data 1025 EXIST::FUNCTION: |
1003 | CRYPTO_dup_ex_data 1025 | 1003 | CRYPTO_get_new_lockid 1026 EXIST::FUNCTION: |
1004 | CRYPTO_get_new_lockid 1026 | 1004 | CRYPTO_new_ex_data 1027 EXIST::FUNCTION: |
1005 | CRYPTO_new_ex_data 1027 | 1005 | RSA_set_ex_data 1028 EXIST::FUNCTION:RSA |
1006 | RSA_set_ex_data 1028 | 1006 | RSA_get_ex_data 1029 EXIST::FUNCTION:RSA |
1007 | RSA_get_ex_data 1029 | 1007 | RSA_get_ex_new_index 1030 EXIST::FUNCTION:RSA |
1008 | RSA_get_ex_new_index 1030 | 1008 | RSA_padding_add_PKCS1_type_1 1031 EXIST::FUNCTION:RSA |
1009 | RSA_padding_add_PKCS1_type_1 1031 | 1009 | RSA_padding_add_PKCS1_type_2 1032 EXIST::FUNCTION:RSA |
1010 | RSA_padding_add_PKCS1_type_2 1032 | 1010 | RSA_padding_add_SSLv23 1033 EXIST::FUNCTION:RSA |
1011 | RSA_padding_add_SSLv23 1033 | 1011 | RSA_padding_add_none 1034 EXIST::FUNCTION:RSA |
1012 | RSA_padding_add_none 1034 | 1012 | RSA_padding_check_PKCS1_type_1 1035 EXIST::FUNCTION:RSA |
1013 | RSA_padding_check_PKCS1_type_1 1035 | 1013 | RSA_padding_check_PKCS1_type_2 1036 EXIST::FUNCTION:RSA |
1014 | RSA_padding_check_PKCS1_type_2 1036 | 1014 | RSA_padding_check_SSLv23 1037 EXIST::FUNCTION:RSA |
1015 | RSA_padding_check_SSLv23 1037 | 1015 | RSA_padding_check_none 1038 EXIST::FUNCTION:RSA |
1016 | RSA_padding_check_none 1038 | 1016 | bn_add_words 1039 EXIST::FUNCTION: |
1017 | bn_add_words 1039 | 1017 | d2i_Netscape_RSA_2 1040 NOEXIST::FUNCTION: |
1018 | d2i_Netscape_RSA_2 1040 | 1018 | CRYPTO_get_ex_new_index 1041 EXIST::FUNCTION: |
1019 | CRYPTO_get_ex_new_index 1041 | 1019 | RIPEMD160_Init 1042 EXIST::FUNCTION:RIPEMD |
1020 | RIPEMD160_Init 1042 | 1020 | RIPEMD160_Update 1043 EXIST::FUNCTION:RIPEMD |
1021 | RIPEMD160_Update 1043 | 1021 | RIPEMD160_Final 1044 EXIST::FUNCTION:RIPEMD |
1022 | RIPEMD160_Final 1044 | 1022 | RIPEMD160 1045 EXIST::FUNCTION:RIPEMD |
1023 | RIPEMD160 1045 | 1023 | RIPEMD160_Transform 1046 EXIST::FUNCTION:RIPEMD |
1024 | RIPEMD160_Transform 1046 | 1024 | RC5_32_set_key 1047 EXIST::FUNCTION:RC5 |
1025 | RC5_32_set_key 1047 | 1025 | RC5_32_ecb_encrypt 1048 EXIST::FUNCTION:RC5 |
1026 | RC5_32_ecb_encrypt 1048 | 1026 | RC5_32_encrypt 1049 EXIST::FUNCTION:RC5 |
1027 | RC5_32_encrypt 1049 | 1027 | RC5_32_decrypt 1050 EXIST::FUNCTION:RC5 |
1028 | RC5_32_decrypt 1050 | 1028 | RC5_32_cbc_encrypt 1051 EXIST::FUNCTION:RC5 |
1029 | RC5_32_cbc_encrypt 1051 | 1029 | RC5_32_cfb64_encrypt 1052 EXIST::FUNCTION:RC5 |
1030 | RC5_32_cfb64_encrypt 1052 | 1030 | RC5_32_ofb64_encrypt 1053 EXIST::FUNCTION:RC5 |
1031 | RC5_32_ofb64_encrypt 1053 | 1031 | BN_bn2mpi 1058 EXIST::FUNCTION: |
1032 | BN_bn2mpi 1058 | 1032 | BN_mpi2bn 1059 EXIST::FUNCTION: |
1033 | BN_mpi2bn 1059 | 1033 | ASN1_BIT_STRING_get_bit 1060 EXIST::FUNCTION: |
1034 | ASN1_BIT_STRING_get_bit 1060 | 1034 | ASN1_BIT_STRING_set_bit 1061 EXIST::FUNCTION: |
1035 | ASN1_BIT_STRING_set_bit 1061 | 1035 | BIO_get_ex_data 1062 EXIST::FUNCTION: |
1036 | BIO_get_ex_data 1062 | 1036 | BIO_get_ex_new_index 1063 EXIST::FUNCTION: |
1037 | BIO_get_ex_new_index 1063 | 1037 | BIO_set_ex_data 1064 EXIST::FUNCTION: |
1038 | BIO_set_ex_data 1064 | 1038 | X509v3_get_key_usage 1066 NOEXIST::FUNCTION: |
1039 | X509_STORE_CTX_get_ex_new_index 1065 | 1039 | X509v3_set_key_usage 1067 NOEXIST::FUNCTION: |
1040 | X509v3_get_key_usage 1066 | 1040 | a2i_X509v3_key_usage 1068 NOEXIST::FUNCTION: |
1041 | X509v3_set_key_usage 1067 | 1041 | i2a_X509v3_key_usage 1069 NOEXIST::FUNCTION: |
1042 | a2i_X509v3_key_usage 1068 | 1042 | EVP_PKEY_decrypt 1070 EXIST::FUNCTION: |
1043 | i2a_X509v3_key_usage 1069 | 1043 | EVP_PKEY_encrypt 1071 EXIST::FUNCTION: |
1044 | EVP_PKEY_decrypt 1070 | 1044 | PKCS7_RECIP_INFO_set 1072 EXIST::FUNCTION: |
1045 | EVP_PKEY_encrypt 1071 | 1045 | PKCS7_add_recipient 1073 EXIST::FUNCTION: |
1046 | PKCS7_RECIP_INFO_set 1072 | 1046 | PKCS7_add_recipient_info 1074 EXIST::FUNCTION: |
1047 | PKCS7_add_recipient 1073 | 1047 | PKCS7_set_cipher 1075 EXIST::FUNCTION: |
1048 | PKCS7_add_recipient_info 1074 | 1048 | ASN1_TYPE_get_int_octetstring 1076 EXIST::FUNCTION: |
1049 | PKCS7_set_cipher 1075 | 1049 | ASN1_TYPE_get_octetstring 1077 EXIST::FUNCTION: |
1050 | ASN1_TYPE_get_int_octetstring 1076 | 1050 | ASN1_TYPE_set_int_octetstring 1078 EXIST::FUNCTION: |
1051 | ASN1_TYPE_get_octetstring 1077 | 1051 | ASN1_TYPE_set_octetstring 1079 EXIST::FUNCTION: |
1052 | ASN1_TYPE_set_int_octetstring 1078 | 1052 | ASN1_UTCTIME_set_string 1080 EXIST::FUNCTION: |
1053 | ASN1_TYPE_set_octetstring 1079 | 1053 | ERR_add_error_data 1081 EXIST::FUNCTION:BIO |
1054 | ASN1_UTCTIME_set_string 1080 | 1054 | ERR_set_error_data 1082 EXIST::FUNCTION: |
1055 | ERR_add_error_data 1081 | 1055 | EVP_CIPHER_asn1_to_param 1083 EXIST::FUNCTION: |
1056 | ERR_set_error_data 1082 | 1056 | EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: |
1057 | EVP_CIPHER_asn1_to_param 1083 | 1057 | EVP_CIPHER_get_asn1_iv 1085 EXIST::FUNCTION: |
1058 | EVP_CIPHER_param_to_asn1 1084 | 1058 | EVP_CIPHER_set_asn1_iv 1086 EXIST::FUNCTION: |
1059 | EVP_CIPHER_get_asn1_iv 1085 | 1059 | EVP_rc5_32_12_16_cbc 1087 EXIST::FUNCTION:RC5 |
1060 | EVP_CIPHER_set_asn1_iv 1086 | 1060 | EVP_rc5_32_12_16_cfb 1088 EXIST::FUNCTION:RC5 |
1061 | EVP_rc5_32_12_16_cbc 1087 | 1061 | EVP_rc5_32_12_16_ecb 1089 EXIST::FUNCTION:RC5 |
1062 | EVP_rc5_32_12_16_cfb 1088 | 1062 | EVP_rc5_32_12_16_ofb 1090 EXIST::FUNCTION:RC5 |
1063 | EVP_rc5_32_12_16_ecb 1089 | 1063 | asn1_add_error 1091 EXIST::FUNCTION: |
1064 | EVP_rc5_32_12_16_ofb 1090 | 1064 | d2i_ASN1_BMPSTRING 1092 EXIST::FUNCTION: |
1065 | asn1_add_error 1091 | 1065 | i2d_ASN1_BMPSTRING 1093 EXIST::FUNCTION: |
1066 | BIO_f_ber 1094 NOEXIST::FUNCTION: | ||
1067 | BN_init 1095 EXIST::FUNCTION: | ||
1068 | COMP_CTX_new 1096 EXIST::FUNCTION: | ||
1069 | COMP_CTX_free 1097 EXIST::FUNCTION: | ||
1070 | COMP_CTX_compress_block 1098 NOEXIST::FUNCTION: | ||
1071 | COMP_CTX_expand_block 1099 NOEXIST::FUNCTION: | ||
1072 | X509_STORE_CTX_get_ex_new_index 1100 EXIST::FUNCTION: | ||
1073 | OBJ_NAME_add 1101 EXIST::FUNCTION: | ||
1074 | BIO_socket_nbio 1102 EXIST::FUNCTION: | ||
1075 | EVP_rc2_64_cbc 1103 EXIST::FUNCTION:RC2 | ||
1076 | OBJ_NAME_cleanup 1104 EXIST::FUNCTION: | ||
1077 | OBJ_NAME_get 1105 EXIST::FUNCTION: | ||
1078 | OBJ_NAME_init 1106 EXIST::FUNCTION: | ||
1079 | OBJ_NAME_new_index 1107 EXIST::FUNCTION: | ||
1080 | OBJ_NAME_remove 1108 EXIST::FUNCTION: | ||
1081 | BN_MONT_CTX_copy 1109 EXIST::FUNCTION: | ||
1082 | BIO_new_socks4a_connect 1110 NOEXIST::FUNCTION: | ||
1083 | BIO_s_socks4a_connect 1111 NOEXIST::FUNCTION: | ||
1084 | PROXY_set_connect_mode 1112 NOEXIST::FUNCTION: | ||
1085 | RAND_SSLeay 1113 EXIST::FUNCTION: | ||
1086 | RAND_set_rand_method 1114 EXIST::FUNCTION: | ||
1087 | RSA_memory_lock 1115 EXIST::FUNCTION:RSA | ||
1088 | bn_sub_words 1116 EXIST::FUNCTION: | ||
1089 | bn_mul_normal 1117 NOEXIST::FUNCTION: | ||
1090 | bn_mul_comba8 1118 NOEXIST::FUNCTION: | ||
1091 | bn_mul_comba4 1119 NOEXIST::FUNCTION: | ||
1092 | bn_sqr_normal 1120 NOEXIST::FUNCTION: | ||
1093 | bn_sqr_comba8 1121 NOEXIST::FUNCTION: | ||
1094 | bn_sqr_comba4 1122 NOEXIST::FUNCTION: | ||
1095 | bn_cmp_words 1123 NOEXIST::FUNCTION: | ||
1096 | bn_mul_recursive 1124 NOEXIST::FUNCTION: | ||
1097 | bn_mul_part_recursive 1125 NOEXIST::FUNCTION: | ||
1098 | bn_sqr_recursive 1126 NOEXIST::FUNCTION: | ||
1099 | bn_mul_low_normal 1127 NOEXIST::FUNCTION: | ||
1100 | BN_RECP_CTX_init 1128 EXIST::FUNCTION: | ||
1101 | BN_RECP_CTX_new 1129 EXIST::FUNCTION: | ||
1102 | BN_RECP_CTX_free 1130 EXIST::FUNCTION: | ||
1103 | BN_RECP_CTX_set 1131 EXIST::FUNCTION: | ||
1104 | BN_mod_mul_reciprocal 1132 EXIST::FUNCTION: | ||
1105 | BN_mod_exp_recp 1133 EXIST::FUNCTION: | ||
1106 | BN_div_recp 1134 EXIST::FUNCTION: | ||
1107 | BN_CTX_init 1135 EXIST::FUNCTION: | ||
1108 | BN_MONT_CTX_init 1136 EXIST::FUNCTION: | ||
1109 | RAND_get_rand_method 1137 EXIST::FUNCTION: | ||
1110 | PKCS7_add_attribute 1138 EXIST::FUNCTION: | ||
1111 | PKCS7_add_signed_attribute 1139 EXIST::FUNCTION: | ||
1112 | PKCS7_digest_from_attributes 1140 EXIST::FUNCTION: | ||
1113 | PKCS7_get_attribute 1141 EXIST::FUNCTION: | ||
1114 | PKCS7_get_issuer_and_serial 1142 EXIST::FUNCTION: | ||
1115 | PKCS7_get_signed_attribute 1143 EXIST::FUNCTION: | ||
1116 | COMP_compress_block 1144 EXIST::FUNCTION: | ||
1117 | COMP_expand_block 1145 EXIST::FUNCTION: | ||
1118 | COMP_rle 1146 EXIST::FUNCTION: | ||
1119 | COMP_zlib 1147 EXIST::FUNCTION: | ||
1120 | ms_time_diff 1148 EXIST::FUNCTION: | ||
1121 | ms_time_new 1149 EXIST::FUNCTION: | ||
1122 | ms_time_free 1150 EXIST::FUNCTION: | ||
1123 | ms_time_cmp 1151 EXIST::FUNCTION: | ||
1124 | ms_time_get 1152 EXIST::FUNCTION: | ||
1125 | PKCS7_set_attributes 1153 EXIST::FUNCTION: | ||
1126 | PKCS7_set_signed_attributes 1154 EXIST::FUNCTION: | ||
1127 | X509_ATTRIBUTE_create 1155 EXIST::FUNCTION: | ||
1128 | X509_ATTRIBUTE_dup 1156 EXIST::FUNCTION: | ||
1129 | ASN1_GENERALIZEDTIME_check 1157 EXIST::FUNCTION: | ||
1130 | ASN1_GENERALIZEDTIME_print 1158 EXIST::FUNCTION:BIO | ||
1131 | ASN1_GENERALIZEDTIME_set 1159 EXIST::FUNCTION: | ||
1132 | ASN1_GENERALIZEDTIME_set_string 1160 EXIST::FUNCTION: | ||
1133 | ASN1_TIME_print 1161 EXIST::FUNCTION:BIO | ||
1134 | BASIC_CONSTRAINTS_free 1162 EXIST::FUNCTION: | ||
1135 | BASIC_CONSTRAINTS_new 1163 EXIST::FUNCTION: | ||
1136 | ERR_load_X509V3_strings 1164 EXIST::FUNCTION: | ||
1137 | NETSCAPE_CERT_SEQUENCE_free 1165 EXIST::FUNCTION: | ||
1138 | NETSCAPE_CERT_SEQUENCE_new 1166 EXIST::FUNCTION: | ||
1139 | OBJ_txt2obj 1167 EXIST::FUNCTION: | ||
1140 | PEM_read_NETSCAPE_CERT_SEQUENCE 1168 EXIST:!VMS,!WIN16:FUNCTION: | ||
1141 | PEM_read_NS_CERT_SEQ 1168 EXIST:VMS:FUNCTION: | ||
1142 | PEM_read_bio_NETSCAPE_CERT_SEQUENCE 1169 EXIST:!VMS:FUNCTION: | ||
1143 | PEM_read_bio_NS_CERT_SEQ 1169 EXIST:VMS:FUNCTION: | ||
1144 | PEM_write_NETSCAPE_CERT_SEQUENCE 1170 EXIST:!VMS,!WIN16:FUNCTION: | ||
1145 | PEM_write_NS_CERT_SEQ 1170 EXIST:VMS:FUNCTION: | ||
1146 | PEM_write_bio_NETSCAPE_CERT_SEQUENCE 1171 EXIST:!VMS:FUNCTION: | ||
1147 | PEM_write_bio_NS_CERT_SEQ 1171 EXIST:VMS:FUNCTION: | ||
1148 | X509V3_EXT_add 1172 EXIST::FUNCTION: | ||
1149 | X509V3_EXT_add_alias 1173 EXIST::FUNCTION: | ||
1150 | X509V3_EXT_add_conf 1174 EXIST::FUNCTION: | ||
1151 | X509V3_EXT_cleanup 1175 EXIST::FUNCTION: | ||
1152 | X509V3_EXT_conf 1176 EXIST::FUNCTION: | ||
1153 | X509V3_EXT_conf_nid 1177 EXIST::FUNCTION: | ||
1154 | X509V3_EXT_get 1178 EXIST::FUNCTION: | ||
1155 | X509V3_EXT_get_nid 1179 EXIST::FUNCTION: | ||
1156 | X509V3_EXT_print 1180 EXIST::FUNCTION: | ||
1157 | X509V3_EXT_print_fp 1181 EXIST::FUNCTION: | ||
1158 | X509V3_add_standard_extensions 1182 EXIST::FUNCTION: | ||
1159 | X509V3_add_value 1183 EXIST::FUNCTION: | ||
1160 | X509V3_add_value_bool 1184 EXIST::FUNCTION: | ||
1161 | X509V3_add_value_int 1185 EXIST::FUNCTION: | ||
1162 | X509V3_conf_free 1186 EXIST::FUNCTION: | ||
1163 | X509V3_get_value_bool 1187 EXIST::FUNCTION: | ||
1164 | X509V3_get_value_int 1188 EXIST::FUNCTION: | ||
1165 | X509V3_parse_list 1189 EXIST::FUNCTION: | ||
1166 | d2i_ASN1_GENERALIZEDTIME 1190 EXIST::FUNCTION: | ||
1167 | d2i_ASN1_TIME 1191 EXIST::FUNCTION: | ||
1168 | d2i_BASIC_CONSTRAINTS 1192 EXIST::FUNCTION: | ||
1169 | d2i_NETSCAPE_CERT_SEQUENCE 1193 EXIST::FUNCTION: | ||
1170 | d2i_ext_ku 1194 NOEXIST::FUNCTION: | ||
1171 | ext_ku_free 1195 NOEXIST::FUNCTION: | ||
1172 | ext_ku_new 1196 NOEXIST::FUNCTION: | ||
1173 | i2d_ASN1_GENERALIZEDTIME 1197 EXIST::FUNCTION: | ||
1174 | i2d_ASN1_TIME 1198 EXIST::FUNCTION: | ||
1175 | i2d_BASIC_CONSTRAINTS 1199 EXIST::FUNCTION: | ||
1176 | i2d_NETSCAPE_CERT_SEQUENCE 1200 EXIST::FUNCTION: | ||
1177 | i2d_ext_ku 1201 NOEXIST::FUNCTION: | ||
1178 | EVP_MD_CTX_copy 1202 EXIST::FUNCTION: | ||
1179 | i2d_ASN1_ENUMERATED 1203 EXIST::FUNCTION: | ||
1180 | d2i_ASN1_ENUMERATED 1204 EXIST::FUNCTION: | ||
1181 | ASN1_ENUMERATED_set 1205 EXIST::FUNCTION: | ||
1182 | ASN1_ENUMERATED_get 1206 EXIST::FUNCTION: | ||
1183 | BN_to_ASN1_ENUMERATED 1207 EXIST::FUNCTION: | ||
1184 | ASN1_ENUMERATED_to_BN 1208 EXIST::FUNCTION: | ||
1185 | i2a_ASN1_ENUMERATED 1209 EXIST::FUNCTION:BIO | ||
1186 | a2i_ASN1_ENUMERATED 1210 EXIST::FUNCTION:BIO | ||
1187 | i2d_GENERAL_NAME 1211 EXIST::FUNCTION: | ||
1188 | d2i_GENERAL_NAME 1212 EXIST::FUNCTION: | ||
1189 | GENERAL_NAME_new 1213 EXIST::FUNCTION: | ||
1190 | GENERAL_NAME_free 1214 EXIST::FUNCTION: | ||
1191 | GENERAL_NAMES_new 1215 EXIST::FUNCTION: | ||
1192 | GENERAL_NAMES_free 1216 EXIST::FUNCTION: | ||
1193 | d2i_GENERAL_NAMES 1217 EXIST::FUNCTION: | ||
1194 | i2d_GENERAL_NAMES 1218 EXIST::FUNCTION: | ||
1195 | i2v_GENERAL_NAMES 1219 EXIST::FUNCTION: | ||
1196 | i2s_ASN1_OCTET_STRING 1220 EXIST::FUNCTION: | ||
1197 | s2i_ASN1_OCTET_STRING 1221 EXIST::FUNCTION: | ||
1198 | X509V3_EXT_check_conf 1222 NOEXIST::FUNCTION: | ||
1199 | hex_to_string 1223 EXIST::FUNCTION: | ||
1200 | string_to_hex 1224 EXIST::FUNCTION: | ||
1201 | DES_ede3_cbcm_encrypt 1225 EXIST::FUNCTION:DES | ||
1202 | RSA_padding_add_PKCS1_OAEP 1226 EXIST::FUNCTION:RSA | ||
1203 | RSA_padding_check_PKCS1_OAEP 1227 EXIST::FUNCTION:RSA | ||
1204 | X509_CRL_print_fp 1228 EXIST::FUNCTION:FP_API | ||
1205 | X509_CRL_print 1229 EXIST::FUNCTION:BIO | ||
1206 | i2v_GENERAL_NAME 1230 EXIST::FUNCTION: | ||
1207 | v2i_GENERAL_NAME 1231 EXIST::FUNCTION: | ||
1208 | i2d_PKEY_USAGE_PERIOD 1232 EXIST::FUNCTION: | ||
1209 | d2i_PKEY_USAGE_PERIOD 1233 EXIST::FUNCTION: | ||
1210 | PKEY_USAGE_PERIOD_new 1234 EXIST::FUNCTION: | ||
1211 | PKEY_USAGE_PERIOD_free 1235 EXIST::FUNCTION: | ||
1212 | v2i_GENERAL_NAMES 1236 EXIST::FUNCTION: | ||
1213 | i2s_ASN1_INTEGER 1237 EXIST::FUNCTION: | ||
1214 | X509V3_EXT_d2i 1238 EXIST::FUNCTION: | ||
1215 | name_cmp 1239 EXIST::FUNCTION: | ||
1216 | str_dup 1240 NOEXIST::FUNCTION: | ||
1217 | i2s_ASN1_ENUMERATED 1241 EXIST::FUNCTION: | ||
1218 | i2s_ASN1_ENUMERATED_TABLE 1242 EXIST::FUNCTION: | ||
1219 | BIO_s_log 1243 EXIST:!WIN16,!WIN32,!macintosh:FUNCTION: | ||
1220 | BIO_f_reliable 1244 EXIST::FUNCTION:BIO | ||
1221 | PKCS7_dataFinal 1245 EXIST::FUNCTION: | ||
1222 | PKCS7_dataDecode 1246 EXIST::FUNCTION: | ||
1223 | X509V3_EXT_CRL_add_conf 1247 EXIST::FUNCTION: | ||
1224 | BN_set_params 1248 EXIST::FUNCTION: | ||
1225 | BN_get_params 1249 EXIST::FUNCTION: | ||
1226 | BIO_get_ex_num 1250 NOEXIST::FUNCTION: | ||
1227 | BIO_set_ex_free_func 1251 NOEXIST::FUNCTION: | ||
1228 | EVP_ripemd160 1252 EXIST::FUNCTION:RIPEMD | ||
1229 | ASN1_TIME_set 1253 EXIST::FUNCTION: | ||
1230 | i2d_AUTHORITY_KEYID 1254 EXIST::FUNCTION: | ||
1231 | d2i_AUTHORITY_KEYID 1255 EXIST::FUNCTION: | ||
1232 | AUTHORITY_KEYID_new 1256 EXIST::FUNCTION: | ||
1233 | AUTHORITY_KEYID_free 1257 EXIST::FUNCTION: | ||
1234 | ASN1_seq_unpack 1258 EXIST::FUNCTION: | ||
1235 | ASN1_seq_pack 1259 EXIST::FUNCTION: | ||
1236 | ASN1_unpack_string 1260 EXIST::FUNCTION: | ||
1237 | ASN1_pack_string 1261 EXIST::FUNCTION: | ||
1238 | PKCS12_pack_safebag 1262 NOEXIST::FUNCTION: | ||
1239 | PKCS12_MAKE_KEYBAG 1263 EXIST::FUNCTION: | ||
1240 | PKCS8_encrypt 1264 EXIST::FUNCTION: | ||
1241 | PKCS12_MAKE_SHKEYBAG 1265 EXIST::FUNCTION: | ||
1242 | PKCS12_pack_p7data 1266 EXIST::FUNCTION: | ||
1243 | PKCS12_pack_p7encdata 1267 EXIST::FUNCTION: | ||
1244 | PKCS12_add_localkeyid 1268 EXIST::FUNCTION: | ||
1245 | PKCS12_add_friendlyname_asc 1269 EXIST::FUNCTION: | ||
1246 | PKCS12_add_friendlyname_uni 1270 EXIST::FUNCTION: | ||
1247 | PKCS12_get_friendlyname 1271 EXIST::FUNCTION: | ||
1248 | PKCS12_pbe_crypt 1272 EXIST::FUNCTION: | ||
1249 | PKCS12_decrypt_d2i 1273 NOEXIST::FUNCTION: | ||
1250 | PKCS12_i2d_encrypt 1274 NOEXIST::FUNCTION: | ||
1251 | PKCS12_init 1275 EXIST::FUNCTION: | ||
1252 | PKCS12_key_gen_asc 1276 EXIST::FUNCTION: | ||
1253 | PKCS12_key_gen_uni 1277 EXIST::FUNCTION: | ||
1254 | PKCS12_gen_mac 1278 EXIST::FUNCTION: | ||
1255 | PKCS12_verify_mac 1279 EXIST::FUNCTION: | ||
1256 | PKCS12_set_mac 1280 EXIST::FUNCTION: | ||
1257 | PKCS12_setup_mac 1281 EXIST::FUNCTION: | ||
1258 | asc2uni 1282 EXIST::FUNCTION: | ||
1259 | uni2asc 1283 EXIST::FUNCTION: | ||
1260 | i2d_PKCS12_BAGS 1284 EXIST::FUNCTION: | ||
1261 | PKCS12_BAGS_new 1285 EXIST::FUNCTION: | ||
1262 | d2i_PKCS12_BAGS 1286 EXIST::FUNCTION: | ||
1263 | PKCS12_BAGS_free 1287 EXIST::FUNCTION: | ||
1264 | i2d_PKCS12 1288 EXIST::FUNCTION: | ||
1265 | d2i_PKCS12 1289 EXIST::FUNCTION: | ||
1266 | PKCS12_new 1290 EXIST::FUNCTION: | ||
1267 | PKCS12_free 1291 EXIST::FUNCTION: | ||
1268 | i2d_PKCS12_MAC_DATA 1292 EXIST::FUNCTION: | ||
1269 | PKCS12_MAC_DATA_new 1293 EXIST::FUNCTION: | ||
1270 | d2i_PKCS12_MAC_DATA 1294 EXIST::FUNCTION: | ||
1271 | PKCS12_MAC_DATA_free 1295 EXIST::FUNCTION: | ||
1272 | i2d_PKCS12_SAFEBAG 1296 EXIST::FUNCTION: | ||
1273 | PKCS12_SAFEBAG_new 1297 EXIST::FUNCTION: | ||
1274 | d2i_PKCS12_SAFEBAG 1298 EXIST::FUNCTION: | ||
1275 | PKCS12_SAFEBAG_free 1299 EXIST::FUNCTION: | ||
1276 | ERR_load_PKCS12_strings 1300 EXIST::FUNCTION: | ||
1277 | PKCS12_PBE_add 1301 EXIST::FUNCTION: | ||
1278 | PKCS8_add_keyusage 1302 EXIST::FUNCTION: | ||
1279 | PKCS12_get_attr_gen 1303 EXIST::FUNCTION: | ||
1280 | PKCS12_parse 1304 EXIST::FUNCTION: | ||
1281 | PKCS12_create 1305 EXIST::FUNCTION: | ||
1282 | i2d_PKCS12_bio 1306 EXIST::FUNCTION: | ||
1283 | i2d_PKCS12_fp 1307 EXIST::FUNCTION: | ||
1284 | d2i_PKCS12_bio 1308 EXIST::FUNCTION: | ||
1285 | d2i_PKCS12_fp 1309 EXIST::FUNCTION: | ||
1286 | i2d_PBEPARAM 1310 EXIST::FUNCTION: | ||
1287 | PBEPARAM_new 1311 EXIST::FUNCTION: | ||
1288 | d2i_PBEPARAM 1312 EXIST::FUNCTION: | ||
1289 | PBEPARAM_free 1313 EXIST::FUNCTION: | ||
1290 | i2d_PKCS8_PRIV_KEY_INFO 1314 EXIST::FUNCTION: | ||
1291 | PKCS8_PRIV_KEY_INFO_new 1315 EXIST::FUNCTION: | ||
1292 | d2i_PKCS8_PRIV_KEY_INFO 1316 EXIST::FUNCTION: | ||
1293 | PKCS8_PRIV_KEY_INFO_free 1317 EXIST::FUNCTION: | ||
1294 | EVP_PKCS82PKEY 1318 EXIST::FUNCTION: | ||
1295 | EVP_PKEY2PKCS8 1319 EXIST::FUNCTION: | ||
1296 | PKCS8_set_broken 1320 EXIST::FUNCTION: | ||
1297 | EVP_PBE_ALGOR_CipherInit 1321 NOEXIST::FUNCTION: | ||
1298 | EVP_PBE_alg_add 1322 EXIST::FUNCTION: | ||
1299 | PKCS5_pbe_set 1323 EXIST::FUNCTION: | ||
1300 | EVP_PBE_cleanup 1324 EXIST::FUNCTION: | ||
1301 | i2d_SXNET 1325 EXIST::FUNCTION: | ||
1302 | d2i_SXNET 1326 EXIST::FUNCTION: | ||
1303 | SXNET_new 1327 EXIST::FUNCTION: | ||
1304 | SXNET_free 1328 EXIST::FUNCTION: | ||
1305 | i2d_SXNETID 1329 EXIST::FUNCTION: | ||
1306 | d2i_SXNETID 1330 EXIST::FUNCTION: | ||
1307 | SXNETID_new 1331 EXIST::FUNCTION: | ||
1308 | SXNETID_free 1332 EXIST::FUNCTION: | ||
1309 | DSA_SIG_new 1333 EXIST::FUNCTION:DSA | ||
1310 | DSA_SIG_free 1334 EXIST::FUNCTION:DSA | ||
1311 | DSA_do_sign 1335 EXIST::FUNCTION:DSA | ||
1312 | DSA_do_verify 1336 EXIST::FUNCTION:DSA | ||
1313 | d2i_DSA_SIG 1337 EXIST::FUNCTION:DSA | ||
1314 | i2d_DSA_SIG 1338 EXIST::FUNCTION:DSA | ||
1315 | i2d_ASN1_VISIBLESTRING 1339 EXIST::FUNCTION: | ||
1316 | d2i_ASN1_VISIBLESTRING 1340 EXIST::FUNCTION: | ||
1317 | i2d_ASN1_UTF8STRING 1341 EXIST::FUNCTION: | ||
1318 | d2i_ASN1_UTF8STRING 1342 EXIST::FUNCTION: | ||
1319 | i2d_DIRECTORYSTRING 1343 EXIST::FUNCTION: | ||
1320 | d2i_DIRECTORYSTRING 1344 EXIST::FUNCTION: | ||
1321 | i2d_DISPLAYTEXT 1345 EXIST::FUNCTION: | ||
1322 | d2i_DISPLAYTEXT 1346 EXIST::FUNCTION: | ||
1323 | d2i_ASN1_SET_OF_X509 1379 NOEXIST::FUNCTION: | ||
1324 | i2d_ASN1_SET_OF_X509 1380 NOEXIST::FUNCTION: | ||
1325 | i2d_PBKDF2PARAM 1397 EXIST::FUNCTION: | ||
1326 | PBKDF2PARAM_new 1398 EXIST::FUNCTION: | ||
1327 | d2i_PBKDF2PARAM 1399 EXIST::FUNCTION: | ||
1328 | PBKDF2PARAM_free 1400 EXIST::FUNCTION: | ||
1329 | i2d_PBE2PARAM 1401 EXIST::FUNCTION: | ||
1330 | PBE2PARAM_new 1402 EXIST::FUNCTION: | ||
1331 | d2i_PBE2PARAM 1403 EXIST::FUNCTION: | ||
1332 | PBE2PARAM_free 1404 EXIST::FUNCTION: | ||
1333 | d2i_ASN1_SET_OF_GENERAL_NAME 1421 NOEXIST::FUNCTION: | ||
1334 | i2d_ASN1_SET_OF_GENERAL_NAME 1422 NOEXIST::FUNCTION: | ||
1335 | d2i_ASN1_SET_OF_SXNETID 1439 NOEXIST::FUNCTION: | ||
1336 | i2d_ASN1_SET_OF_SXNETID 1440 NOEXIST::FUNCTION: | ||
1337 | d2i_ASN1_SET_OF_POLICYQUALINFO 1457 NOEXIST::FUNCTION: | ||
1338 | i2d_ASN1_SET_OF_POLICYQUALINFO 1458 NOEXIST::FUNCTION: | ||
1339 | d2i_ASN1_SET_OF_POLICYINFO 1475 NOEXIST::FUNCTION: | ||
1340 | i2d_ASN1_SET_OF_POLICYINFO 1476 NOEXIST::FUNCTION: | ||
1341 | SXNET_add_id_asc 1477 EXIST::FUNCTION: | ||
1342 | SXNET_add_id_ulong 1478 EXIST::FUNCTION: | ||
1343 | SXNET_add_id_INTEGER 1479 EXIST::FUNCTION: | ||
1344 | SXNET_get_id_asc 1480 EXIST::FUNCTION: | ||
1345 | SXNET_get_id_ulong 1481 EXIST::FUNCTION: | ||
1346 | SXNET_get_id_INTEGER 1482 EXIST::FUNCTION: | ||
1347 | X509V3_set_conf_lhash 1483 EXIST::FUNCTION: | ||
1348 | i2d_CERTIFICATEPOLICIES 1484 EXIST::FUNCTION: | ||
1349 | CERTIFICATEPOLICIES_new 1485 EXIST::FUNCTION: | ||
1350 | CERTIFICATEPOLICIES_free 1486 EXIST::FUNCTION: | ||
1351 | d2i_CERTIFICATEPOLICIES 1487 EXIST::FUNCTION: | ||
1352 | i2d_POLICYINFO 1488 EXIST::FUNCTION: | ||
1353 | POLICYINFO_new 1489 EXIST::FUNCTION: | ||
1354 | d2i_POLICYINFO 1490 EXIST::FUNCTION: | ||
1355 | POLICYINFO_free 1491 EXIST::FUNCTION: | ||
1356 | i2d_POLICYQUALINFO 1492 EXIST::FUNCTION: | ||
1357 | POLICYQUALINFO_new 1493 EXIST::FUNCTION: | ||
1358 | d2i_POLICYQUALINFO 1494 EXIST::FUNCTION: | ||
1359 | POLICYQUALINFO_free 1495 EXIST::FUNCTION: | ||
1360 | i2d_USERNOTICE 1496 EXIST::FUNCTION: | ||
1361 | USERNOTICE_new 1497 EXIST::FUNCTION: | ||
1362 | d2i_USERNOTICE 1498 EXIST::FUNCTION: | ||
1363 | USERNOTICE_free 1499 EXIST::FUNCTION: | ||
1364 | i2d_NOTICEREF 1500 EXIST::FUNCTION: | ||
1365 | NOTICEREF_new 1501 EXIST::FUNCTION: | ||
1366 | d2i_NOTICEREF 1502 EXIST::FUNCTION: | ||
1367 | NOTICEREF_free 1503 EXIST::FUNCTION: | ||
1368 | X509V3_get_string 1504 EXIST::FUNCTION: | ||
1369 | X509V3_get_section 1505 EXIST::FUNCTION: | ||
1370 | X509V3_string_free 1506 EXIST::FUNCTION: | ||
1371 | X509V3_section_free 1507 EXIST::FUNCTION: | ||
1372 | X509V3_set_ctx 1508 EXIST::FUNCTION: | ||
1373 | s2i_ASN1_INTEGER 1509 EXIST::FUNCTION: | ||
1374 | CRYPTO_set_locked_mem_functions 1510 EXIST::FUNCTION: | ||
1375 | CRYPTO_get_locked_mem_functions 1511 EXIST::FUNCTION: | ||
1376 | CRYPTO_malloc_locked 1512 EXIST::FUNCTION: | ||
1377 | CRYPTO_free_locked 1513 EXIST::FUNCTION: | ||
1378 | BN_mod_exp2_mont 1514 EXIST::FUNCTION: | ||
1379 | ERR_get_error_line_data 1515 EXIST::FUNCTION: | ||
1380 | ERR_peek_error_line_data 1516 EXIST::FUNCTION: | ||
1381 | PKCS12_PBE_keyivgen 1517 EXIST::FUNCTION: | ||
1382 | X509_ALGOR_dup 1518 EXIST::FUNCTION: | ||
1383 | d2i_ASN1_SET_OF_DIST_POINT 1535 NOEXIST::FUNCTION: | ||
1384 | i2d_ASN1_SET_OF_DIST_POINT 1536 NOEXIST::FUNCTION: | ||
1385 | i2d_CRL_DIST_POINTS 1537 EXIST::FUNCTION: | ||
1386 | CRL_DIST_POINTS_new 1538 EXIST::FUNCTION: | ||
1387 | CRL_DIST_POINTS_free 1539 EXIST::FUNCTION: | ||
1388 | d2i_CRL_DIST_POINTS 1540 EXIST::FUNCTION: | ||
1389 | i2d_DIST_POINT 1541 EXIST::FUNCTION: | ||
1390 | DIST_POINT_new 1542 EXIST::FUNCTION: | ||
1391 | d2i_DIST_POINT 1543 EXIST::FUNCTION: | ||
1392 | DIST_POINT_free 1544 EXIST::FUNCTION: | ||
1393 | i2d_DIST_POINT_NAME 1545 EXIST::FUNCTION: | ||
1394 | DIST_POINT_NAME_new 1546 EXIST::FUNCTION: | ||
1395 | DIST_POINT_NAME_free 1547 EXIST::FUNCTION: | ||
1396 | d2i_DIST_POINT_NAME 1548 EXIST::FUNCTION: | ||
1397 | X509V3_add_value_uchar 1549 EXIST::FUNCTION: | ||
1398 | d2i_ASN1_SET_OF_X509_ATTRIBUTE 1555 NOEXIST::FUNCTION: | ||
1399 | i2d_ASN1_SET_OF_ASN1_TYPE 1560 NOEXIST::FUNCTION: | ||
1400 | d2i_ASN1_SET_OF_X509_EXTENSION 1567 NOEXIST::FUNCTION: | ||
1401 | d2i_ASN1_SET_OF_X509_NAME_ENTRY 1574 NOEXIST::FUNCTION: | ||
1402 | d2i_ASN1_SET_OF_ASN1_TYPE 1589 NOEXIST::FUNCTION: | ||
1403 | i2d_ASN1_SET_OF_X509_ATTRIBUTE 1615 NOEXIST::FUNCTION: | ||
1404 | i2d_ASN1_SET_OF_X509_EXTENSION 1624 NOEXIST::FUNCTION: | ||
1405 | i2d_ASN1_SET_OF_X509_NAME_ENTRY 1633 NOEXIST::FUNCTION: | ||
1406 | X509V3_EXT_i2d 1646 EXIST::FUNCTION: | ||
1407 | X509V3_EXT_val_prn 1647 EXIST::FUNCTION: | ||
1408 | X509V3_EXT_add_list 1648 EXIST::FUNCTION: | ||
1409 | EVP_CIPHER_type 1649 EXIST::FUNCTION: | ||
1410 | EVP_PBE_CipherInit 1650 EXIST::FUNCTION: | ||
1411 | X509V3_add_value_bool_nf 1651 EXIST::FUNCTION: | ||
1412 | d2i_ASN1_UINTEGER 1652 EXIST::FUNCTION: | ||
1413 | sk_value 1653 EXIST::FUNCTION: | ||
1414 | sk_num 1654 EXIST::FUNCTION: | ||
1415 | sk_set 1655 EXIST::FUNCTION: | ||
1416 | i2d_ASN1_SET_OF_X509_REVOKED 1661 NOEXIST::FUNCTION: | ||
1417 | sk_sort 1671 EXIST::FUNCTION: | ||
1418 | d2i_ASN1_SET_OF_X509_REVOKED 1674 NOEXIST::FUNCTION: | ||
1419 | i2d_ASN1_SET_OF_X509_ALGOR 1682 NOEXIST::FUNCTION: | ||
1420 | i2d_ASN1_SET_OF_X509_CRL 1685 NOEXIST::FUNCTION: | ||
1421 | d2i_ASN1_SET_OF_X509_ALGOR 1696 NOEXIST::FUNCTION: | ||
1422 | d2i_ASN1_SET_OF_X509_CRL 1702 NOEXIST::FUNCTION: | ||
1423 | i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO 1723 NOEXIST::FUNCTION: | ||
1424 | i2d_ASN1_SET_OF_PKCS7_RECIP_INFO 1738 NOEXIST::FUNCTION: | ||
1425 | d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO 1748 NOEXIST::FUNCTION: | ||
1426 | d2i_ASN1_SET_OF_PKCS7_RECIP_INFO 1753 NOEXIST::FUNCTION: | ||
1427 | PKCS5_PBE_add 1775 EXIST::FUNCTION: | ||
1428 | PEM_write_bio_PKCS8 1776 EXIST::FUNCTION: | ||
1429 | i2d_PKCS8_fp 1777 EXIST::FUNCTION:FP_API | ||
1430 | PEM_read_bio_PKCS8_PRIV_KEY_INFO 1778 EXIST:!VMS:FUNCTION: | ||
1431 | PEM_read_bio_P8_PRIV_KEY_INFO 1778 EXIST:VMS:FUNCTION: | ||
1432 | d2i_PKCS8_bio 1779 EXIST::FUNCTION:BIO | ||
1433 | d2i_PKCS8_PRIV_KEY_INFO_fp 1780 EXIST::FUNCTION:FP_API | ||
1434 | PEM_write_bio_PKCS8_PRIV_KEY_INFO 1781 EXIST:!VMS:FUNCTION: | ||
1435 | PEM_write_bio_P8_PRIV_KEY_INFO 1781 EXIST:VMS:FUNCTION: | ||
1436 | PEM_read_PKCS8 1782 EXIST:!WIN16:FUNCTION: | ||
1437 | d2i_PKCS8_PRIV_KEY_INFO_bio 1783 EXIST::FUNCTION:BIO | ||
1438 | d2i_PKCS8_fp 1784 EXIST::FUNCTION:FP_API | ||
1439 | PEM_write_PKCS8 1785 EXIST:!WIN16:FUNCTION: | ||
1440 | PEM_read_PKCS8_PRIV_KEY_INFO 1786 EXIST:!VMS,!WIN16:FUNCTION: | ||
1441 | PEM_read_P8_PRIV_KEY_INFO 1786 EXIST:VMS:FUNCTION: | ||
1442 | PEM_read_bio_PKCS8 1787 EXIST::FUNCTION: | ||
1443 | PEM_write_PKCS8_PRIV_KEY_INFO 1788 EXIST:!VMS,!WIN16:FUNCTION: | ||
1444 | PEM_write_P8_PRIV_KEY_INFO 1788 EXIST:VMS:FUNCTION: | ||
1445 | PKCS5_PBE_keyivgen 1789 EXIST::FUNCTION: | ||
1446 | i2d_PKCS8_bio 1790 EXIST::FUNCTION:BIO | ||
1447 | i2d_PKCS8_PRIV_KEY_INFO_fp 1791 EXIST::FUNCTION:FP_API | ||
1448 | i2d_PKCS8_PRIV_KEY_INFO_bio 1792 EXIST::FUNCTION:BIO | ||
1449 | BIO_s_bio 1793 EXIST::FUNCTION: | ||
1450 | PKCS5_pbe2_set 1794 EXIST::FUNCTION: | ||
1451 | PKCS5_PBKDF2_HMAC_SHA1 1795 EXIST::FUNCTION: | ||
1452 | PKCS5_v2_PBE_keyivgen 1796 EXIST::FUNCTION: | ||
1453 | PEM_write_bio_PKCS8PrivateKey 1797 EXIST::FUNCTION: | ||
1454 | PEM_write_PKCS8PrivateKey 1798 EXIST::FUNCTION: | ||
1455 | BIO_ctrl_get_read_request 1799 EXIST::FUNCTION: | ||
1456 | BIO_ctrl_pending 1800 EXIST::FUNCTION: | ||
1457 | BIO_ctrl_wpending 1801 EXIST::FUNCTION: | ||
1458 | BIO_new_bio_pair 1802 EXIST::FUNCTION: | ||
1459 | BIO_ctrl_get_write_guarantee 1803 EXIST::FUNCTION: | ||
1460 | CRYPTO_num_locks 1804 EXIST::FUNCTION: | ||
1461 | CONF_load_bio 1805 EXIST::FUNCTION: | ||
1462 | CONF_load_fp 1806 EXIST::FUNCTION:FP_API | ||
1463 | i2d_ASN1_SET_OF_ASN1_OBJECT 1837 NOEXIST::FUNCTION: | ||
1464 | d2i_ASN1_SET_OF_ASN1_OBJECT 1844 NOEXIST::FUNCTION: | ||
1465 | PKCS7_signatureVerify 1845 EXIST::FUNCTION: | ||
1466 | RSA_set_method 1846 EXIST::FUNCTION:RSA | ||
1467 | RSA_get_method 1847 EXIST::FUNCTION:RSA | ||
1468 | RSA_get_default_method 1848 EXIST::FUNCTION:RSA | ||
1469 | RSA_check_key 1869 EXIST::FUNCTION:RSA | ||
1470 | OBJ_obj2txt 1870 EXIST::FUNCTION: | ||
1471 | DSA_dup_DH 1871 EXIST::FUNCTION:DH,DSA | ||
1472 | X509_REQ_get_extensions 1872 EXIST::FUNCTION: | ||
1473 | X509_REQ_set_extension_nids 1873 EXIST::FUNCTION: | ||
1474 | BIO_nwrite 1874 EXIST::FUNCTION: | ||
1475 | X509_REQ_extension_nid 1875 EXIST::FUNCTION: | ||
1476 | BIO_nread 1876 EXIST::FUNCTION: | ||
1477 | X509_REQ_get_extension_nids 1877 EXIST::FUNCTION: | ||
1478 | BIO_nwrite0 1878 EXIST::FUNCTION: | ||
1479 | X509_REQ_add_extensions_nid 1879 EXIST::FUNCTION: | ||
1480 | BIO_nread0 1880 EXIST::FUNCTION: | ||
1481 | X509_REQ_add_extensions 1881 EXIST::FUNCTION: | ||
1482 | BIO_new_mem_buf 1882 EXIST::FUNCTION: | ||
1483 | DH_set_ex_data 1883 EXIST::FUNCTION:DH | ||
1484 | DH_set_method 1884 EXIST::FUNCTION:DH | ||
1485 | DSA_OpenSSL 1885 EXIST::FUNCTION:DSA | ||
1486 | DH_get_ex_data 1886 EXIST::FUNCTION:DH | ||
1487 | DH_get_ex_new_index 1887 EXIST::FUNCTION:DH | ||
1488 | DSA_new_method 1888 EXIST::FUNCTION:DSA | ||
1489 | DH_new_method 1889 EXIST::FUNCTION:DH | ||
1490 | DH_OpenSSL 1890 EXIST::FUNCTION:DH | ||
1491 | DSA_get_ex_new_index 1891 EXIST::FUNCTION:DSA | ||
1492 | DH_get_default_method 1892 EXIST::FUNCTION:DH | ||
1493 | DSA_set_ex_data 1893 EXIST::FUNCTION:DSA | ||
1494 | DH_set_default_method 1894 EXIST::FUNCTION:DH | ||
1495 | DSA_get_ex_data 1895 EXIST::FUNCTION:DSA | ||
1496 | X509V3_EXT_REQ_add_conf 1896 EXIST::FUNCTION: | ||
1497 | NETSCAPE_SPKI_print 1897 EXIST::FUNCTION:EVP | ||
1498 | NETSCAPE_SPKI_set_pubkey 1898 EXIST::FUNCTION:EVP | ||
1499 | NETSCAPE_SPKI_b64_encode 1899 EXIST::FUNCTION:EVP | ||
1500 | NETSCAPE_SPKI_get_pubkey 1900 EXIST::FUNCTION:EVP | ||
1501 | NETSCAPE_SPKI_b64_decode 1901 EXIST::FUNCTION:EVP | ||
1502 | UTF8_putc 1902 EXIST::FUNCTION: | ||
1503 | UTF8_getc 1903 EXIST::FUNCTION: | ||
1504 | RSA_null_method 1904 EXIST::FUNCTION:RSA | ||
1505 | ASN1_tag2str 1905 EXIST::FUNCTION: | ||
1506 | BIO_ctrl_reset_read_request 1906 EXIST::FUNCTION: | ||
1507 | DISPLAYTEXT_new 1907 EXIST::FUNCTION: | ||
1508 | ASN1_GENERALIZEDTIME_free 1908 EXIST::FUNCTION: | ||
1509 | X509_REVOKED_get_ext_d2i 1909 EXIST::FUNCTION: | ||
1510 | X509_set_ex_data 1910 EXIST::FUNCTION: | ||
1511 | X509_reject_set_bit_asc 1911 NOEXIST::FUNCTION: | ||
1512 | X509_NAME_add_entry_by_txt 1912 EXIST::FUNCTION: | ||
1513 | X509_NAME_add_entry_by_NID 1914 EXIST::FUNCTION: | ||
1514 | X509_PURPOSE_get0 1915 EXIST::FUNCTION: | ||
1515 | PEM_read_X509_AUX 1917 EXIST:!WIN16:FUNCTION: | ||
1516 | d2i_AUTHORITY_INFO_ACCESS 1918 EXIST::FUNCTION: | ||
1517 | PEM_write_PUBKEY 1921 EXIST:!WIN16:FUNCTION: | ||
1518 | ACCESS_DESCRIPTION_new 1925 EXIST::FUNCTION: | ||
1519 | X509_CERT_AUX_free 1926 EXIST::FUNCTION: | ||
1520 | d2i_ACCESS_DESCRIPTION 1927 EXIST::FUNCTION: | ||
1521 | X509_trust_clear 1928 EXIST::FUNCTION: | ||
1522 | X509_TRUST_add 1931 EXIST::FUNCTION: | ||
1523 | ASN1_VISIBLESTRING_new 1932 EXIST::FUNCTION: | ||
1524 | X509_alias_set1 1933 EXIST::FUNCTION: | ||
1525 | ASN1_PRINTABLESTRING_free 1934 EXIST::FUNCTION: | ||
1526 | EVP_PKEY_get1_DSA 1935 EXIST::FUNCTION:DSA | ||
1527 | ASN1_BMPSTRING_new 1936 EXIST::FUNCTION: | ||
1528 | ASN1_mbstring_copy 1937 EXIST::FUNCTION: | ||
1529 | ASN1_UTF8STRING_new 1938 EXIST::FUNCTION: | ||
1530 | DSA_get_default_method 1941 EXIST::FUNCTION:DSA | ||
1531 | i2d_ASN1_SET_OF_ACCESS_DESCRIPTION 1945 NOEXIST::FUNCTION: | ||
1532 | ASN1_T61STRING_free 1946 EXIST::FUNCTION: | ||
1533 | DSA_set_method 1949 EXIST::FUNCTION:DSA | ||
1534 | X509_get_ex_data 1950 EXIST::FUNCTION: | ||
1535 | ASN1_STRING_type 1951 EXIST::FUNCTION: | ||
1536 | X509_PURPOSE_get_by_sname 1952 EXIST::FUNCTION: | ||
1537 | ASN1_TIME_free 1954 EXIST::FUNCTION: | ||
1538 | ASN1_OCTET_STRING_cmp 1955 EXIST::FUNCTION: | ||
1539 | ASN1_BIT_STRING_new 1957 EXIST::FUNCTION: | ||
1540 | X509_get_ext_d2i 1958 EXIST::FUNCTION: | ||
1541 | PEM_read_bio_X509_AUX 1959 EXIST::FUNCTION: | ||
1542 | ASN1_STRING_set_default_mask_asc 1960 EXIST:!VMS:FUNCTION: | ||
1543 | ASN1_STRING_set_def_mask_asc 1960 EXIST:VMS:FUNCTION: | ||
1544 | PEM_write_bio_RSA_PUBKEY 1961 EXIST::FUNCTION:RSA | ||
1545 | ASN1_INTEGER_cmp 1963 EXIST::FUNCTION: | ||
1546 | d2i_RSA_PUBKEY_fp 1964 EXIST::FUNCTION:FP_API,RSA | ||
1547 | X509_trust_set_bit_asc 1967 NOEXIST::FUNCTION: | ||
1548 | PEM_write_bio_DSA_PUBKEY 1968 EXIST::FUNCTION:DSA | ||
1549 | X509_STORE_CTX_free 1969 EXIST::FUNCTION: | ||
1550 | EVP_PKEY_set1_DSA 1970 EXIST::FUNCTION:DSA | ||
1551 | i2d_DSA_PUBKEY_fp 1971 EXIST::FUNCTION:DSA,FP_API | ||
1552 | X509_load_cert_crl_file 1972 EXIST::FUNCTION:STDIO | ||
1553 | ASN1_TIME_new 1973 EXIST::FUNCTION: | ||
1554 | i2d_RSA_PUBKEY 1974 EXIST::FUNCTION:RSA | ||
1555 | X509_STORE_CTX_purpose_inherit 1976 EXIST::FUNCTION: | ||
1556 | PEM_read_RSA_PUBKEY 1977 EXIST:!WIN16:FUNCTION:RSA | ||
1557 | d2i_X509_AUX 1980 EXIST::FUNCTION: | ||
1558 | i2d_DSA_PUBKEY 1981 EXIST::FUNCTION:DSA | ||
1559 | X509_CERT_AUX_print 1982 EXIST::FUNCTION:BIO | ||
1560 | PEM_read_DSA_PUBKEY 1984 EXIST:!WIN16:FUNCTION:DSA | ||
1561 | i2d_RSA_PUBKEY_bio 1985 EXIST::FUNCTION:BIO,RSA | ||
1562 | ASN1_BIT_STRING_num_asc 1986 EXIST::FUNCTION: | ||
1563 | i2d_PUBKEY 1987 EXIST::FUNCTION: | ||
1564 | ASN1_UTCTIME_free 1988 EXIST::FUNCTION: | ||
1565 | DSA_set_default_method 1989 EXIST::FUNCTION:DSA | ||
1566 | X509_PURPOSE_get_by_id 1990 EXIST::FUNCTION: | ||
1567 | ACCESS_DESCRIPTION_free 1994 EXIST::FUNCTION: | ||
1568 | PEM_read_bio_PUBKEY 1995 EXIST::FUNCTION: | ||
1569 | ASN1_STRING_set_by_NID 1996 EXIST::FUNCTION: | ||
1570 | X509_PURPOSE_get_id 1997 EXIST::FUNCTION: | ||
1571 | DISPLAYTEXT_free 1998 EXIST::FUNCTION: | ||
1572 | OTHERNAME_new 1999 EXIST::FUNCTION: | ||
1573 | X509_CERT_AUX_new 2001 EXIST::FUNCTION: | ||
1574 | X509_TRUST_cleanup 2007 EXIST::FUNCTION: | ||
1575 | X509_NAME_add_entry_by_OBJ 2008 EXIST::FUNCTION: | ||
1576 | X509_CRL_get_ext_d2i 2009 EXIST::FUNCTION: | ||
1577 | X509_PURPOSE_get0_name 2011 EXIST::FUNCTION: | ||
1578 | PEM_read_PUBKEY 2012 EXIST:!WIN16:FUNCTION: | ||
1579 | i2d_DSA_PUBKEY_bio 2014 EXIST::FUNCTION:BIO,DSA | ||
1580 | i2d_OTHERNAME 2015 EXIST::FUNCTION: | ||
1581 | ASN1_OCTET_STRING_free 2016 EXIST::FUNCTION: | ||
1582 | ASN1_BIT_STRING_set_asc 2017 EXIST::FUNCTION: | ||
1583 | X509_get_ex_new_index 2019 EXIST::FUNCTION: | ||
1584 | ASN1_STRING_TABLE_cleanup 2020 EXIST::FUNCTION: | ||
1585 | X509_TRUST_get_by_id 2021 EXIST::FUNCTION: | ||
1586 | X509_PURPOSE_get_trust 2022 EXIST::FUNCTION: | ||
1587 | ASN1_STRING_length 2023 EXIST::FUNCTION: | ||
1588 | d2i_ASN1_SET_OF_ACCESS_DESCRIPTION 2024 NOEXIST::FUNCTION: | ||
1589 | ASN1_PRINTABLESTRING_new 2025 EXIST::FUNCTION: | ||
1590 | X509V3_get_d2i 2026 EXIST::FUNCTION: | ||
1591 | ASN1_ENUMERATED_free 2027 EXIST::FUNCTION: | ||
1592 | i2d_X509_CERT_AUX 2028 EXIST::FUNCTION: | ||
1593 | X509_STORE_CTX_set_trust 2030 EXIST::FUNCTION: | ||
1594 | ASN1_STRING_set_default_mask 2032 EXIST::FUNCTION: | ||
1595 | X509_STORE_CTX_new 2033 EXIST::FUNCTION: | ||
1596 | EVP_PKEY_get1_RSA 2034 EXIST::FUNCTION:RSA | ||
1597 | DIRECTORYSTRING_free 2038 EXIST::FUNCTION: | ||
1598 | PEM_write_X509_AUX 2039 EXIST:!WIN16:FUNCTION: | ||
1599 | ASN1_OCTET_STRING_set 2040 EXIST::FUNCTION: | ||
1600 | d2i_DSA_PUBKEY_fp 2041 EXIST::FUNCTION:DSA,FP_API | ||
1601 | d2i_RSA_PUBKEY 2044 EXIST::FUNCTION:RSA | ||
1602 | X509_TRUST_get0_name 2046 EXIST::FUNCTION: | ||
1603 | X509_TRUST_get0 2047 EXIST::FUNCTION: | ||
1604 | AUTHORITY_INFO_ACCESS_free 2048 EXIST::FUNCTION: | ||
1605 | ASN1_IA5STRING_new 2049 EXIST::FUNCTION: | ||
1606 | d2i_DSA_PUBKEY 2050 EXIST::FUNCTION:DSA | ||
1607 | X509_check_purpose 2051 EXIST::FUNCTION: | ||
1608 | ASN1_ENUMERATED_new 2052 EXIST::FUNCTION: | ||
1609 | d2i_RSA_PUBKEY_bio 2053 EXIST::FUNCTION:BIO,RSA | ||
1610 | d2i_PUBKEY 2054 EXIST::FUNCTION: | ||
1611 | X509_TRUST_get_trust 2055 EXIST::FUNCTION: | ||
1612 | X509_TRUST_get_flags 2056 EXIST::FUNCTION: | ||
1613 | ASN1_BMPSTRING_free 2057 EXIST::FUNCTION: | ||
1614 | ASN1_T61STRING_new 2058 EXIST::FUNCTION: | ||
1615 | ASN1_UTCTIME_new 2060 EXIST::FUNCTION: | ||
1616 | i2d_AUTHORITY_INFO_ACCESS 2062 EXIST::FUNCTION: | ||
1617 | EVP_PKEY_set1_RSA 2063 EXIST::FUNCTION:RSA | ||
1618 | X509_STORE_CTX_set_purpose 2064 EXIST::FUNCTION: | ||
1619 | ASN1_IA5STRING_free 2065 EXIST::FUNCTION: | ||
1620 | PEM_write_bio_X509_AUX 2066 EXIST::FUNCTION: | ||
1621 | X509_PURPOSE_get_count 2067 EXIST::FUNCTION: | ||
1622 | CRYPTO_add_info 2068 NOEXIST::FUNCTION: | ||
1623 | X509_NAME_ENTRY_create_by_txt 2071 EXIST::FUNCTION: | ||
1624 | ASN1_STRING_get_default_mask 2072 EXIST::FUNCTION: | ||
1625 | X509_alias_get0 2074 EXIST::FUNCTION: | ||
1626 | ASN1_STRING_data 2075 EXIST::FUNCTION: | ||
1627 | i2d_ACCESS_DESCRIPTION 2077 EXIST::FUNCTION: | ||
1628 | X509_trust_set_bit 2078 NOEXIST::FUNCTION: | ||
1629 | ASN1_BIT_STRING_free 2080 EXIST::FUNCTION: | ||
1630 | PEM_read_bio_RSA_PUBKEY 2081 EXIST::FUNCTION:RSA | ||
1631 | X509_add1_reject_object 2082 EXIST::FUNCTION: | ||
1632 | X509_check_trust 2083 EXIST::FUNCTION: | ||
1633 | PEM_read_bio_DSA_PUBKEY 2088 EXIST::FUNCTION:DSA | ||
1634 | X509_PURPOSE_add 2090 EXIST::FUNCTION: | ||
1635 | ASN1_STRING_TABLE_get 2091 EXIST::FUNCTION: | ||
1636 | ASN1_UTF8STRING_free 2092 EXIST::FUNCTION: | ||
1637 | d2i_DSA_PUBKEY_bio 2093 EXIST::FUNCTION:BIO,DSA | ||
1638 | PEM_write_RSA_PUBKEY 2095 EXIST:!WIN16:FUNCTION:RSA | ||
1639 | d2i_OTHERNAME 2096 EXIST::FUNCTION: | ||
1640 | X509_reject_set_bit 2098 NOEXIST::FUNCTION: | ||
1641 | PEM_write_DSA_PUBKEY 2101 EXIST:!WIN16:FUNCTION:DSA | ||
1642 | X509_PURPOSE_get0_sname 2105 EXIST::FUNCTION: | ||
1643 | EVP_PKEY_set1_DH 2107 EXIST::FUNCTION:DH | ||
1644 | ASN1_OCTET_STRING_dup 2108 EXIST::FUNCTION: | ||
1645 | ASN1_BIT_STRING_set 2109 EXIST::FUNCTION: | ||
1646 | X509_TRUST_get_count 2110 EXIST::FUNCTION: | ||
1647 | ASN1_INTEGER_free 2111 EXIST::FUNCTION: | ||
1648 | OTHERNAME_free 2112 EXIST::FUNCTION: | ||
1649 | i2d_RSA_PUBKEY_fp 2113 EXIST::FUNCTION:FP_API,RSA | ||
1650 | ASN1_INTEGER_dup 2114 EXIST::FUNCTION: | ||
1651 | d2i_X509_CERT_AUX 2115 EXIST::FUNCTION: | ||
1652 | PEM_write_bio_PUBKEY 2117 EXIST::FUNCTION: | ||
1653 | ASN1_VISIBLESTRING_free 2118 EXIST::FUNCTION: | ||
1654 | X509_PURPOSE_cleanup 2119 EXIST::FUNCTION: | ||
1655 | ASN1_mbstring_ncopy 2123 EXIST::FUNCTION: | ||
1656 | ASN1_GENERALIZEDTIME_new 2126 EXIST::FUNCTION: | ||
1657 | EVP_PKEY_get1_DH 2128 EXIST::FUNCTION:DH | ||
1658 | ASN1_OCTET_STRING_new 2130 EXIST::FUNCTION: | ||
1659 | ASN1_INTEGER_new 2131 EXIST::FUNCTION: | ||
1660 | i2d_X509_AUX 2132 EXIST::FUNCTION: | ||
1661 | ASN1_BIT_STRING_name_print 2134 EXIST::FUNCTION:BIO | ||
1662 | X509_cmp 2135 EXIST::FUNCTION: | ||
1663 | ASN1_STRING_length_set 2136 EXIST::FUNCTION: | ||
1664 | DIRECTORYSTRING_new 2137 EXIST::FUNCTION: | ||
1665 | X509_add1_trust_object 2140 EXIST::FUNCTION: | ||
1666 | PKCS12_newpass 2141 EXIST::FUNCTION: | ||
1667 | SMIME_write_PKCS7 2142 EXIST::FUNCTION: | ||
1668 | SMIME_read_PKCS7 2143 EXIST::FUNCTION: | ||
1669 | DES_set_key_checked 2144 EXIST::FUNCTION:DES | ||
1670 | PKCS7_verify 2145 EXIST::FUNCTION: | ||
1671 | PKCS7_encrypt 2146 EXIST::FUNCTION: | ||
1672 | DES_set_key_unchecked 2147 EXIST::FUNCTION:DES | ||
1673 | SMIME_crlf_copy 2148 EXIST::FUNCTION: | ||
1674 | i2d_ASN1_PRINTABLESTRING 2149 EXIST::FUNCTION: | ||
1675 | PKCS7_get0_signers 2150 EXIST::FUNCTION: | ||
1676 | PKCS7_decrypt 2151 EXIST::FUNCTION: | ||
1677 | SMIME_text 2152 EXIST::FUNCTION: | ||
1678 | PKCS7_simple_smimecap 2153 EXIST::FUNCTION: | ||
1679 | PKCS7_get_smimecap 2154 EXIST::FUNCTION: | ||
1680 | PKCS7_sign 2155 EXIST::FUNCTION: | ||
1681 | PKCS7_add_attrib_smimecap 2156 EXIST::FUNCTION: | ||
1682 | CRYPTO_dbg_set_options 2157 EXIST::FUNCTION: | ||
1683 | CRYPTO_remove_all_info 2158 EXIST::FUNCTION: | ||
1684 | CRYPTO_get_mem_debug_functions 2159 EXIST::FUNCTION: | ||
1685 | CRYPTO_is_mem_check_on 2160 EXIST::FUNCTION: | ||
1686 | CRYPTO_set_mem_debug_functions 2161 EXIST::FUNCTION: | ||
1687 | CRYPTO_pop_info 2162 EXIST::FUNCTION: | ||
1688 | CRYPTO_push_info_ 2163 EXIST::FUNCTION: | ||
1689 | CRYPTO_set_mem_debug_options 2164 EXIST::FUNCTION: | ||
1690 | PEM_write_PKCS8PrivateKey_nid 2165 EXIST::FUNCTION: | ||
1691 | PEM_write_bio_PKCS8PrivateKey_nid 2166 EXIST:!VMS:FUNCTION: | ||
1692 | PEM_write_bio_PKCS8PrivKey_nid 2166 EXIST:VMS:FUNCTION: | ||
1693 | d2i_PKCS8PrivateKey_bio 2167 EXIST::FUNCTION: | ||
1694 | ASN1_NULL_free 2168 EXIST::FUNCTION: | ||
1695 | d2i_ASN1_NULL 2169 EXIST::FUNCTION: | ||
1696 | ASN1_NULL_new 2170 EXIST::FUNCTION: | ||
1697 | i2d_PKCS8PrivateKey_bio 2171 EXIST::FUNCTION: | ||
1698 | i2d_PKCS8PrivateKey_fp 2172 EXIST::FUNCTION: | ||
1699 | i2d_ASN1_NULL 2173 EXIST::FUNCTION: | ||
1700 | i2d_PKCS8PrivateKey_nid_fp 2174 EXIST::FUNCTION: | ||
1701 | d2i_PKCS8PrivateKey_fp 2175 EXIST::FUNCTION: | ||
1702 | i2d_PKCS8PrivateKey_nid_bio 2176 EXIST::FUNCTION: | ||
1703 | i2d_PKCS8PrivateKeyInfo_fp 2177 EXIST::FUNCTION:FP_API | ||
1704 | i2d_PKCS8PrivateKeyInfo_bio 2178 EXIST::FUNCTION:BIO | ||
1705 | PEM_cb 2179 NOEXIST::FUNCTION: | ||
1706 | i2d_PrivateKey_fp 2180 EXIST::FUNCTION:FP_API | ||
1707 | d2i_PrivateKey_bio 2181 EXIST::FUNCTION:BIO | ||
1708 | d2i_PrivateKey_fp 2182 EXIST::FUNCTION:FP_API | ||
1709 | i2d_PrivateKey_bio 2183 EXIST::FUNCTION:BIO | ||
1710 | X509_reject_clear 2184 EXIST::FUNCTION: | ||
1711 | X509_TRUST_set_default 2185 EXIST::FUNCTION: | ||
1712 | d2i_AutoPrivateKey 2186 EXIST::FUNCTION: | ||
1713 | X509_ATTRIBUTE_get0_type 2187 EXIST::FUNCTION: | ||
1714 | X509_ATTRIBUTE_set1_data 2188 EXIST::FUNCTION: | ||
1715 | X509at_get_attr 2189 EXIST::FUNCTION: | ||
1716 | X509at_get_attr_count 2190 EXIST::FUNCTION: | ||
1717 | X509_ATTRIBUTE_create_by_NID 2191 EXIST::FUNCTION: | ||
1718 | X509_ATTRIBUTE_set1_object 2192 EXIST::FUNCTION: | ||
1719 | X509_ATTRIBUTE_count 2193 EXIST::FUNCTION: | ||
1720 | X509_ATTRIBUTE_create_by_OBJ 2194 EXIST::FUNCTION: | ||
1721 | X509_ATTRIBUTE_get0_object 2195 EXIST::FUNCTION: | ||
1722 | X509at_get_attr_by_NID 2196 EXIST::FUNCTION: | ||
1723 | X509at_add1_attr 2197 EXIST::FUNCTION: | ||
1724 | X509_ATTRIBUTE_get0_data 2198 EXIST::FUNCTION: | ||
1725 | X509at_delete_attr 2199 EXIST::FUNCTION: | ||
1726 | X509at_get_attr_by_OBJ 2200 EXIST::FUNCTION: | ||
1727 | RAND_add 2201 EXIST::FUNCTION: | ||
1728 | BIO_number_written 2202 EXIST::FUNCTION: | ||
1729 | BIO_number_read 2203 EXIST::FUNCTION: | ||
1730 | X509_STORE_CTX_get1_chain 2204 EXIST::FUNCTION: | ||
1731 | ERR_load_RAND_strings 2205 EXIST::FUNCTION: | ||
1732 | RAND_pseudo_bytes 2206 EXIST::FUNCTION: | ||
1733 | X509_REQ_get_attr_by_NID 2207 EXIST::FUNCTION: | ||
1734 | X509_REQ_get_attr 2208 EXIST::FUNCTION: | ||
1735 | X509_REQ_add1_attr_by_NID 2209 EXIST::FUNCTION: | ||
1736 | X509_REQ_get_attr_by_OBJ 2210 EXIST::FUNCTION: | ||
1737 | X509at_add1_attr_by_NID 2211 EXIST::FUNCTION: | ||
1738 | X509_REQ_add1_attr_by_OBJ 2212 EXIST::FUNCTION: | ||
1739 | X509_REQ_get_attr_count 2213 EXIST::FUNCTION: | ||
1740 | X509_REQ_add1_attr 2214 EXIST::FUNCTION: | ||
1741 | X509_REQ_delete_attr 2215 EXIST::FUNCTION: | ||
1742 | X509at_add1_attr_by_OBJ 2216 EXIST::FUNCTION: | ||
1743 | X509_REQ_add1_attr_by_txt 2217 EXIST::FUNCTION: | ||
1744 | X509_ATTRIBUTE_create_by_txt 2218 EXIST::FUNCTION: | ||
1745 | X509at_add1_attr_by_txt 2219 EXIST::FUNCTION: | ||
1746 | BN_pseudo_rand 2239 EXIST::FUNCTION: | ||
1747 | BN_is_prime_fasttest 2240 EXIST::FUNCTION: | ||
1748 | BN_CTX_end 2241 EXIST::FUNCTION: | ||
1749 | BN_CTX_start 2242 EXIST::FUNCTION: | ||
1750 | BN_CTX_get 2243 EXIST::FUNCTION: | ||
1751 | EVP_PKEY2PKCS8_broken 2244 EXIST::FUNCTION: | ||
1752 | ASN1_STRING_TABLE_add 2245 EXIST::FUNCTION: | ||
1753 | CRYPTO_dbg_get_options 2246 EXIST::FUNCTION: | ||
1754 | AUTHORITY_INFO_ACCESS_new 2247 EXIST::FUNCTION: | ||
1755 | CRYPTO_get_mem_debug_options 2248 EXIST::FUNCTION: | ||
1756 | DES_crypt 2249 EXIST::FUNCTION:DES | ||
1757 | PEM_write_bio_X509_REQ_NEW 2250 EXIST::FUNCTION: | ||
1758 | PEM_write_X509_REQ_NEW 2251 EXIST:!WIN16:FUNCTION: | ||
1759 | BIO_callback_ctrl 2252 EXIST::FUNCTION: | ||
1760 | RAND_egd 2253 EXIST::FUNCTION: | ||
1761 | RAND_status 2254 EXIST::FUNCTION: | ||
1762 | bn_dump1 2255 NOEXIST::FUNCTION: | ||
1763 | DES_check_key_parity 2256 EXIST::FUNCTION:DES | ||
1764 | lh_num_items 2257 EXIST::FUNCTION: | ||
1765 | RAND_event 2258 EXIST:WIN32:FUNCTION: | ||
1766 | DSO_new 2259 EXIST::FUNCTION: | ||
1767 | DSO_new_method 2260 EXIST::FUNCTION: | ||
1768 | DSO_free 2261 EXIST::FUNCTION: | ||
1769 | DSO_flags 2262 EXIST::FUNCTION: | ||
1770 | DSO_up 2263 NOEXIST::FUNCTION: | ||
1771 | DSO_set_default_method 2264 EXIST::FUNCTION: | ||
1772 | DSO_get_default_method 2265 EXIST::FUNCTION: | ||
1773 | DSO_get_method 2266 EXIST::FUNCTION: | ||
1774 | DSO_set_method 2267 EXIST::FUNCTION: | ||
1775 | DSO_load 2268 EXIST::FUNCTION: | ||
1776 | DSO_bind_var 2269 EXIST::FUNCTION: | ||
1777 | DSO_METHOD_null 2270 EXIST::FUNCTION: | ||
1778 | DSO_METHOD_openssl 2271 EXIST::FUNCTION: | ||
1779 | DSO_METHOD_dlfcn 2272 EXIST::FUNCTION: | ||
1780 | DSO_METHOD_win32 2273 EXIST::FUNCTION: | ||
1781 | ERR_load_DSO_strings 2274 EXIST::FUNCTION: | ||
1782 | DSO_METHOD_dl 2275 EXIST::FUNCTION: | ||
1783 | NCONF_load 2276 EXIST::FUNCTION: | ||
1784 | NCONF_load_fp 2278 EXIST::FUNCTION:FP_API | ||
1785 | NCONF_new 2279 EXIST::FUNCTION: | ||
1786 | NCONF_get_string 2280 EXIST::FUNCTION: | ||
1787 | NCONF_free 2281 EXIST::FUNCTION: | ||
1788 | NCONF_get_number 2282 NOEXIST::FUNCTION: | ||
1789 | CONF_dump_fp 2283 EXIST::FUNCTION: | ||
1790 | NCONF_load_bio 2284 EXIST::FUNCTION: | ||
1791 | NCONF_dump_fp 2285 EXIST::FUNCTION: | ||
1792 | NCONF_get_section 2286 EXIST::FUNCTION: | ||
1793 | NCONF_dump_bio 2287 EXIST::FUNCTION: | ||
1794 | CONF_dump_bio 2288 EXIST::FUNCTION: | ||
1795 | NCONF_free_data 2289 EXIST::FUNCTION: | ||
1796 | CONF_set_default_method 2290 EXIST::FUNCTION: | ||
1797 | ERR_error_string_n 2291 EXIST::FUNCTION: | ||
1798 | BIO_snprintf 2292 EXIST::FUNCTION: | ||
1799 | DSO_ctrl 2293 EXIST::FUNCTION: | ||
1800 | i2d_ASN1_SET_OF_ASN1_INTEGER 2317 NOEXIST::FUNCTION: | ||
1801 | i2d_ASN1_SET_OF_PKCS12_SAFEBAG 2320 NOEXIST::FUNCTION: | ||
1802 | i2d_ASN1_SET_OF_PKCS7 2328 NOEXIST::FUNCTION: | ||
1803 | BIO_vfree 2334 EXIST::FUNCTION: | ||
1804 | d2i_ASN1_SET_OF_ASN1_INTEGER 2339 NOEXIST::FUNCTION: | ||
1805 | d2i_ASN1_SET_OF_PKCS12_SAFEBAG 2341 NOEXIST::FUNCTION: | ||
1806 | ASN1_UTCTIME_get 2350 NOEXIST::FUNCTION: | ||
1807 | X509_REQ_digest 2362 EXIST::FUNCTION:EVP | ||
1808 | X509_CRL_digest 2391 EXIST::FUNCTION:EVP | ||
1809 | d2i_ASN1_SET_OF_PKCS7 2397 NOEXIST::FUNCTION: | ||
1810 | EVP_CIPHER_CTX_set_key_length 2399 EXIST::FUNCTION: | ||
1811 | EVP_CIPHER_CTX_ctrl 2400 EXIST::FUNCTION: | ||
1812 | BN_mod_exp_mont_word 2401 EXIST::FUNCTION: | ||
1813 | RAND_egd_bytes 2402 EXIST::FUNCTION: | ||
1814 | X509_REQ_get1_email 2403 EXIST::FUNCTION: | ||
1815 | X509_get1_email 2404 EXIST::FUNCTION: | ||
1816 | X509_email_free 2405 EXIST::FUNCTION: | ||
1817 | i2d_RSA_NET 2406 EXIST::FUNCTION:RSA | ||
1818 | d2i_RSA_NET_2 2407 NOEXIST::FUNCTION: | ||
1819 | d2i_RSA_NET 2408 EXIST::FUNCTION:RSA | ||
1820 | DSO_bind_func 2409 EXIST::FUNCTION: | ||
1821 | CRYPTO_get_new_dynlockid 2410 EXIST::FUNCTION: | ||
1822 | sk_new_null 2411 EXIST::FUNCTION: | ||
1823 | CRYPTO_set_dynlock_destroy_callback 2412 EXIST:!VMS:FUNCTION: | ||
1824 | CRYPTO_set_dynlock_destroy_cb 2412 EXIST:VMS:FUNCTION: | ||
1825 | CRYPTO_destroy_dynlockid 2413 EXIST::FUNCTION: | ||
1826 | CRYPTO_set_dynlock_size 2414 NOEXIST::FUNCTION: | ||
1827 | CRYPTO_set_dynlock_create_callback 2415 EXIST:!VMS:FUNCTION: | ||
1828 | CRYPTO_set_dynlock_create_cb 2415 EXIST:VMS:FUNCTION: | ||
1829 | CRYPTO_set_dynlock_lock_callback 2416 EXIST:!VMS:FUNCTION: | ||
1830 | CRYPTO_set_dynlock_lock_cb 2416 EXIST:VMS:FUNCTION: | ||
1831 | CRYPTO_get_dynlock_lock_callback 2417 EXIST:!VMS:FUNCTION: | ||
1832 | CRYPTO_get_dynlock_lock_cb 2417 EXIST:VMS:FUNCTION: | ||
1833 | CRYPTO_get_dynlock_destroy_callback 2418 EXIST:!VMS:FUNCTION: | ||
1834 | CRYPTO_get_dynlock_destroy_cb 2418 EXIST:VMS:FUNCTION: | ||
1835 | CRYPTO_get_dynlock_value 2419 EXIST::FUNCTION: | ||
1836 | CRYPTO_get_dynlock_create_callback 2420 EXIST:!VMS:FUNCTION: | ||
1837 | CRYPTO_get_dynlock_create_cb 2420 EXIST:VMS:FUNCTION: | ||
1838 | c2i_ASN1_BIT_STRING 2421 EXIST::FUNCTION: | ||
1839 | i2c_ASN1_BIT_STRING 2422 EXIST::FUNCTION: | ||
1840 | RAND_poll 2423 EXIST::FUNCTION: | ||
1841 | c2i_ASN1_INTEGER 2424 EXIST::FUNCTION: | ||
1842 | i2c_ASN1_INTEGER 2425 EXIST::FUNCTION: | ||
1843 | BIO_dump_indent 2426 EXIST::FUNCTION: | ||
1844 | ASN1_parse_dump 2427 EXIST::FUNCTION:BIO | ||
1845 | c2i_ASN1_OBJECT 2428 EXIST::FUNCTION: | ||
1846 | X509_NAME_print_ex_fp 2429 EXIST::FUNCTION:FP_API | ||
1847 | ASN1_STRING_print_ex_fp 2430 EXIST::FUNCTION:FP_API | ||
1848 | X509_NAME_print_ex 2431 EXIST::FUNCTION:BIO | ||
1849 | ASN1_STRING_print_ex 2432 EXIST::FUNCTION:BIO | ||
1850 | MD4 2433 EXIST::FUNCTION:MD4 | ||
1851 | MD4_Transform 2434 EXIST::FUNCTION:MD4 | ||
1852 | MD4_Final 2435 EXIST::FUNCTION:MD4 | ||
1853 | MD4_Update 2436 EXIST::FUNCTION:MD4 | ||
1854 | MD4_Init 2437 EXIST::FUNCTION:MD4 | ||
1855 | EVP_md4 2438 EXIST::FUNCTION:MD4 | ||
1856 | i2d_PUBKEY_bio 2439 EXIST::FUNCTION:BIO | ||
1857 | i2d_PUBKEY_fp 2440 EXIST::FUNCTION:FP_API | ||
1858 | d2i_PUBKEY_bio 2441 EXIST::FUNCTION:BIO | ||
1859 | ASN1_STRING_to_UTF8 2442 EXIST::FUNCTION: | ||
1860 | BIO_vprintf 2443 EXIST::FUNCTION: | ||
1861 | BIO_vsnprintf 2444 EXIST::FUNCTION: | ||
1862 | d2i_PUBKEY_fp 2445 EXIST::FUNCTION:FP_API | ||
1863 | X509_cmp_time 2446 EXIST::FUNCTION: | ||
1864 | X509_STORE_CTX_set_time 2447 EXIST::FUNCTION: | ||
1865 | X509_STORE_CTX_get1_issuer 2448 EXIST::FUNCTION: | ||
1866 | X509_OBJECT_retrieve_match 2449 EXIST::FUNCTION: | ||
1867 | X509_OBJECT_idx_by_subject 2450 EXIST::FUNCTION: | ||
1868 | X509_STORE_CTX_set_flags 2451 EXIST::FUNCTION: | ||
1869 | X509_STORE_CTX_trusted_stack 2452 EXIST::FUNCTION: | ||
1870 | X509_time_adj 2453 EXIST::FUNCTION: | ||
1871 | X509_check_issued 2454 EXIST::FUNCTION: | ||
1872 | ASN1_UTCTIME_cmp_time_t 2455 EXIST::FUNCTION: | ||
1873 | DES_set_weak_key_flag 2456 NOEXIST::FUNCTION: | ||
1874 | DES_check_key 2457 NOEXIST::FUNCTION: | ||
1875 | DES_rw_mode 2458 NOEXIST::FUNCTION: | ||
1876 | RSA_PKCS1_RSAref 2459 NOEXIST::FUNCTION: | ||
1877 | X509_keyid_set1 2460 EXIST::FUNCTION: | ||
1878 | BIO_next 2461 EXIST::FUNCTION: | ||
1879 | DSO_METHOD_vms 2462 EXIST::FUNCTION: | ||
1880 | BIO_f_linebuffer 2463 EXIST:VMS:FUNCTION: | ||
1881 | BN_bntest_rand 2464 EXIST::FUNCTION: | ||
1882 | OPENSSL_issetugid 2465 EXIST::FUNCTION: | ||
1883 | BN_rand_range 2466 EXIST::FUNCTION: | ||
1884 | ERR_load_ENGINE_strings 2467 EXIST::FUNCTION: | ||
1885 | ENGINE_set_DSA 2468 EXIST::FUNCTION: | ||
1886 | ENGINE_get_finish_function 2469 EXIST::FUNCTION: | ||
1887 | ENGINE_get_default_RSA 2470 EXIST::FUNCTION: | ||
1888 | ENGINE_get_BN_mod_exp 2471 NOEXIST::FUNCTION: | ||
1889 | DSA_get_default_openssl_method 2472 NOEXIST::FUNCTION: | ||
1890 | ENGINE_set_DH 2473 EXIST::FUNCTION: | ||
1891 | ENGINE_set_def_BN_mod_exp_crt 2474 NOEXIST::FUNCTION: | ||
1892 | ENGINE_set_default_BN_mod_exp_crt 2474 NOEXIST::FUNCTION: | ||
1893 | ENGINE_init 2475 EXIST::FUNCTION: | ||
1894 | DH_get_default_openssl_method 2476 NOEXIST::FUNCTION: | ||
1895 | RSA_set_default_openssl_method 2477 NOEXIST::FUNCTION: | ||
1896 | ENGINE_finish 2478 EXIST::FUNCTION: | ||
1897 | ENGINE_load_public_key 2479 EXIST::FUNCTION: | ||
1898 | ENGINE_get_DH 2480 EXIST::FUNCTION: | ||
1899 | ENGINE_ctrl 2481 EXIST::FUNCTION: | ||
1900 | ENGINE_get_init_function 2482 EXIST::FUNCTION: | ||
1901 | ENGINE_set_init_function 2483 EXIST::FUNCTION: | ||
1902 | ENGINE_set_default_DSA 2484 EXIST::FUNCTION: | ||
1903 | ENGINE_get_name 2485 EXIST::FUNCTION: | ||
1904 | ENGINE_get_last 2486 EXIST::FUNCTION: | ||
1905 | ENGINE_get_prev 2487 EXIST::FUNCTION: | ||
1906 | ENGINE_get_default_DH 2488 EXIST::FUNCTION: | ||
1907 | ENGINE_get_RSA 2489 EXIST::FUNCTION: | ||
1908 | ENGINE_set_default 2490 EXIST::FUNCTION: | ||
1909 | ENGINE_get_RAND 2491 EXIST::FUNCTION: | ||
1910 | ENGINE_get_first 2492 EXIST::FUNCTION: | ||
1911 | ENGINE_by_id 2493 EXIST::FUNCTION: | ||
1912 | ENGINE_set_finish_function 2494 EXIST::FUNCTION: | ||
1913 | ENGINE_get_def_BN_mod_exp_crt 2495 NOEXIST::FUNCTION: | ||
1914 | ENGINE_get_default_BN_mod_exp_crt 2495 NOEXIST::FUNCTION: | ||
1915 | RSA_get_default_openssl_method 2496 NOEXIST::FUNCTION: | ||
1916 | ENGINE_set_RSA 2497 EXIST::FUNCTION: | ||
1917 | ENGINE_load_private_key 2498 EXIST::FUNCTION: | ||
1918 | ENGINE_set_default_RAND 2499 EXIST::FUNCTION: | ||
1919 | ENGINE_set_BN_mod_exp 2500 NOEXIST::FUNCTION: | ||
1920 | ENGINE_remove 2501 EXIST::FUNCTION: | ||
1921 | ENGINE_free 2502 EXIST::FUNCTION: | ||
1922 | ENGINE_get_BN_mod_exp_crt 2503 NOEXIST::FUNCTION: | ||
1923 | ENGINE_get_next 2504 EXIST::FUNCTION: | ||
1924 | ENGINE_set_name 2505 EXIST::FUNCTION: | ||
1925 | ENGINE_get_default_DSA 2506 EXIST::FUNCTION: | ||
1926 | ENGINE_set_default_BN_mod_exp 2507 NOEXIST::FUNCTION: | ||
1927 | ENGINE_set_default_RSA 2508 EXIST::FUNCTION: | ||
1928 | ENGINE_get_default_RAND 2509 EXIST::FUNCTION: | ||
1929 | ENGINE_get_default_BN_mod_exp 2510 NOEXIST::FUNCTION: | ||
1930 | ENGINE_set_RAND 2511 EXIST::FUNCTION: | ||
1931 | ENGINE_set_id 2512 EXIST::FUNCTION: | ||
1932 | ENGINE_set_BN_mod_exp_crt 2513 NOEXIST::FUNCTION: | ||
1933 | ENGINE_set_default_DH 2514 EXIST::FUNCTION: | ||
1934 | ENGINE_new 2515 EXIST::FUNCTION: | ||
1935 | ENGINE_get_id 2516 EXIST::FUNCTION: | ||
1936 | DSA_set_default_openssl_method 2517 NOEXIST::FUNCTION: | ||
1937 | ENGINE_add 2518 EXIST::FUNCTION: | ||
1938 | DH_set_default_openssl_method 2519 NOEXIST::FUNCTION: | ||
1939 | ENGINE_get_DSA 2520 EXIST::FUNCTION: | ||
1940 | ENGINE_get_ctrl_function 2521 EXIST::FUNCTION: | ||
1941 | ENGINE_set_ctrl_function 2522 EXIST::FUNCTION: | ||
1942 | BN_pseudo_rand_range 2523 EXIST::FUNCTION: | ||
1943 | X509_STORE_CTX_set_verify_cb 2524 EXIST::FUNCTION: | ||
1944 | ERR_load_COMP_strings 2525 EXIST::FUNCTION: | ||
1945 | PKCS12_item_decrypt_d2i 2526 EXIST::FUNCTION: | ||
1946 | ASN1_UTF8STRING_it 2527 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1947 | ASN1_UTF8STRING_it 2527 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1948 | ENGINE_unregister_ciphers 2528 EXIST::FUNCTION: | ||
1949 | ENGINE_get_ciphers 2529 EXIST::FUNCTION: | ||
1950 | d2i_OCSP_BASICRESP 2530 EXIST::FUNCTION: | ||
1951 | KRB5_CHECKSUM_it 2531 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1952 | KRB5_CHECKSUM_it 2531 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1953 | EC_POINT_add 2532 EXIST::FUNCTION:EC | ||
1954 | ASN1_item_ex_i2d 2533 EXIST::FUNCTION: | ||
1955 | OCSP_CERTID_it 2534 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1956 | OCSP_CERTID_it 2534 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1957 | d2i_OCSP_RESPBYTES 2535 EXIST::FUNCTION: | ||
1958 | X509V3_add1_i2d 2536 EXIST::FUNCTION: | ||
1959 | PKCS7_ENVELOPE_it 2537 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1960 | PKCS7_ENVELOPE_it 2537 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1961 | UI_add_input_boolean 2538 EXIST::FUNCTION: | ||
1962 | ENGINE_unregister_RSA 2539 EXIST::FUNCTION: | ||
1963 | X509V3_EXT_nconf 2540 EXIST::FUNCTION: | ||
1964 | ASN1_GENERALSTRING_free 2541 EXIST::FUNCTION: | ||
1965 | d2i_OCSP_CERTSTATUS 2542 EXIST::FUNCTION: | ||
1966 | X509_REVOKED_set_serialNumber 2543 EXIST::FUNCTION: | ||
1967 | X509_print_ex 2544 EXIST::FUNCTION:BIO | ||
1968 | OCSP_ONEREQ_get1_ext_d2i 2545 EXIST::FUNCTION: | ||
1969 | ENGINE_register_all_RAND 2546 EXIST::FUNCTION: | ||
1970 | ENGINE_load_dynamic 2547 EXIST::FUNCTION: | ||
1971 | PBKDF2PARAM_it 2548 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1972 | PBKDF2PARAM_it 2548 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1973 | EXTENDED_KEY_USAGE_new 2549 EXIST::FUNCTION: | ||
1974 | EC_GROUP_clear_free 2550 EXIST::FUNCTION:EC | ||
1975 | OCSP_sendreq_bio 2551 EXIST::FUNCTION: | ||
1976 | ASN1_item_digest 2552 EXIST::FUNCTION:EVP | ||
1977 | OCSP_BASICRESP_delete_ext 2553 EXIST::FUNCTION: | ||
1978 | OCSP_SIGNATURE_it 2554 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1979 | OCSP_SIGNATURE_it 2554 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1980 | X509_CRL_it 2555 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1981 | X509_CRL_it 2555 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1982 | OCSP_BASICRESP_add_ext 2556 EXIST::FUNCTION: | ||
1983 | KRB5_ENCKEY_it 2557 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1984 | KRB5_ENCKEY_it 2557 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1985 | UI_method_set_closer 2558 EXIST::FUNCTION: | ||
1986 | X509_STORE_set_purpose 2559 EXIST::FUNCTION: | ||
1987 | i2d_ASN1_GENERALSTRING 2560 EXIST::FUNCTION: | ||
1988 | OCSP_response_status 2561 EXIST::FUNCTION: | ||
1989 | i2d_OCSP_SERVICELOC 2562 EXIST::FUNCTION: | ||
1990 | ENGINE_get_digest_engine 2563 EXIST::FUNCTION: | ||
1991 | EC_GROUP_set_curve_GFp 2564 EXIST::FUNCTION:EC | ||
1992 | OCSP_REQUEST_get_ext_by_OBJ 2565 EXIST::FUNCTION: | ||
1993 | _ossl_old_des_random_key 2566 EXIST::FUNCTION:DES | ||
1994 | ASN1_T61STRING_it 2567 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
1995 | ASN1_T61STRING_it 2567 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
1996 | EC_GROUP_method_of 2568 EXIST::FUNCTION:EC | ||
1997 | i2d_KRB5_APREQ 2569 EXIST::FUNCTION: | ||
1998 | _ossl_old_des_encrypt 2570 EXIST::FUNCTION:DES | ||
1999 | ASN1_PRINTABLE_new 2571 EXIST::FUNCTION: | ||
2000 | HMAC_Init_ex 2572 EXIST::FUNCTION:HMAC | ||
2001 | d2i_KRB5_AUTHENT 2573 EXIST::FUNCTION: | ||
2002 | OCSP_archive_cutoff_new 2574 EXIST::FUNCTION: | ||
2003 | EC_POINT_set_Jprojective_coordinates_GFp 2575 EXIST:!VMS:FUNCTION:EC | ||
2004 | EC_POINT_set_Jproj_coords_GFp 2575 EXIST:VMS:FUNCTION:EC | ||
2005 | _ossl_old_des_is_weak_key 2576 EXIST::FUNCTION:DES | ||
2006 | OCSP_BASICRESP_get_ext_by_OBJ 2577 EXIST::FUNCTION: | ||
2007 | EC_POINT_oct2point 2578 EXIST::FUNCTION:EC | ||
2008 | OCSP_SINGLERESP_get_ext_count 2579 EXIST::FUNCTION: | ||
2009 | UI_ctrl 2580 EXIST::FUNCTION: | ||
2010 | _shadow_DES_rw_mode 2581 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:DES | ||
2011 | _shadow_DES_rw_mode 2581 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:DES | ||
2012 | asn1_do_adb 2582 EXIST::FUNCTION: | ||
2013 | ASN1_template_i2d 2583 EXIST::FUNCTION: | ||
2014 | ENGINE_register_DH 2584 EXIST::FUNCTION: | ||
2015 | UI_construct_prompt 2585 EXIST::FUNCTION: | ||
2016 | X509_STORE_set_trust 2586 EXIST::FUNCTION: | ||
2017 | UI_dup_input_string 2587 EXIST::FUNCTION: | ||
2018 | d2i_KRB5_APREQ 2588 EXIST::FUNCTION: | ||
2019 | EVP_MD_CTX_copy_ex 2589 EXIST::FUNCTION: | ||
2020 | OCSP_request_is_signed 2590 EXIST::FUNCTION: | ||
2021 | i2d_OCSP_REQINFO 2591 EXIST::FUNCTION: | ||
2022 | KRB5_ENCKEY_free 2592 EXIST::FUNCTION: | ||
2023 | OCSP_resp_get0 2593 EXIST::FUNCTION: | ||
2024 | GENERAL_NAME_it 2594 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2025 | GENERAL_NAME_it 2594 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2026 | ASN1_GENERALIZEDTIME_it 2595 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2027 | ASN1_GENERALIZEDTIME_it 2595 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2028 | X509_STORE_set_flags 2596 EXIST::FUNCTION: | ||
2029 | EC_POINT_set_compressed_coordinates_GFp 2597 EXIST:!VMS:FUNCTION:EC | ||
2030 | EC_POINT_set_compr_coords_GFp 2597 EXIST:VMS:FUNCTION:EC | ||
2031 | OCSP_response_status_str 2598 EXIST::FUNCTION: | ||
2032 | d2i_OCSP_REVOKEDINFO 2599 EXIST::FUNCTION: | ||
2033 | OCSP_basic_add1_cert 2600 EXIST::FUNCTION: | ||
2034 | ERR_get_implementation 2601 EXIST::FUNCTION: | ||
2035 | EVP_CipherFinal_ex 2602 EXIST::FUNCTION: | ||
2036 | OCSP_CERTSTATUS_new 2603 EXIST::FUNCTION: | ||
2037 | CRYPTO_cleanup_all_ex_data 2604 EXIST::FUNCTION: | ||
2038 | OCSP_resp_find 2605 EXIST::FUNCTION: | ||
2039 | BN_nnmod 2606 EXIST::FUNCTION: | ||
2040 | X509_CRL_sort 2607 EXIST::FUNCTION: | ||
2041 | X509_REVOKED_set_revocationDate 2608 EXIST::FUNCTION: | ||
2042 | ENGINE_register_RAND 2609 EXIST::FUNCTION: | ||
2043 | OCSP_SERVICELOC_new 2610 EXIST::FUNCTION: | ||
2044 | EC_POINT_set_affine_coordinates_GFp 2611 EXIST:!VMS:FUNCTION:EC | ||
2045 | EC_POINT_set_affine_coords_GFp 2611 EXIST:VMS:FUNCTION:EC | ||
2046 | _ossl_old_des_options 2612 EXIST::FUNCTION:DES | ||
2047 | SXNET_it 2613 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2048 | SXNET_it 2613 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2049 | UI_dup_input_boolean 2614 EXIST::FUNCTION: | ||
2050 | PKCS12_add_CSPName_asc 2615 EXIST::FUNCTION: | ||
2051 | EC_POINT_is_at_infinity 2616 EXIST::FUNCTION:EC | ||
2052 | ENGINE_load_openbsd_dev_crypto 2617 EXIST::FUNCTION: | ||
2053 | DSO_convert_filename 2618 EXIST::FUNCTION: | ||
2054 | POLICYQUALINFO_it 2619 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2055 | POLICYQUALINFO_it 2619 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2056 | ENGINE_register_ciphers 2620 EXIST::FUNCTION: | ||
2057 | BN_mod_lshift_quick 2621 EXIST::FUNCTION: | ||
2058 | DSO_set_filename 2622 EXIST::FUNCTION: | ||
2059 | ASN1_item_free 2623 EXIST::FUNCTION: | ||
2060 | KRB5_TKTBODY_free 2624 EXIST::FUNCTION: | ||
2061 | AUTHORITY_KEYID_it 2625 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2062 | AUTHORITY_KEYID_it 2625 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2063 | KRB5_APREQBODY_new 2626 EXIST::FUNCTION: | ||
2064 | X509V3_EXT_REQ_add_nconf 2627 EXIST::FUNCTION: | ||
2065 | ENGINE_ctrl_cmd_string 2628 EXIST::FUNCTION: | ||
2066 | i2d_OCSP_RESPDATA 2629 EXIST::FUNCTION: | ||
2067 | EVP_MD_CTX_init 2630 EXIST::FUNCTION: | ||
2068 | EXTENDED_KEY_USAGE_free 2631 EXIST::FUNCTION: | ||
2069 | PKCS7_ATTR_SIGN_it 2632 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2070 | PKCS7_ATTR_SIGN_it 2632 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2071 | UI_add_error_string 2633 EXIST::FUNCTION: | ||
2072 | KRB5_CHECKSUM_free 2634 EXIST::FUNCTION: | ||
2073 | OCSP_REQUEST_get_ext 2635 EXIST::FUNCTION: | ||
2074 | ENGINE_load_ubsec 2636 EXIST::FUNCTION: | ||
2075 | ENGINE_register_all_digests 2637 EXIST::FUNCTION: | ||
2076 | PKEY_USAGE_PERIOD_it 2638 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2077 | PKEY_USAGE_PERIOD_it 2638 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2078 | PKCS12_unpack_authsafes 2639 EXIST::FUNCTION: | ||
2079 | ASN1_item_unpack 2640 EXIST::FUNCTION: | ||
2080 | NETSCAPE_SPKAC_it 2641 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2081 | NETSCAPE_SPKAC_it 2641 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2082 | X509_REVOKED_it 2642 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2083 | X509_REVOKED_it 2642 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2084 | ASN1_STRING_encode 2643 EXIST::FUNCTION: | ||
2085 | EVP_aes_128_ecb 2644 EXIST::FUNCTION:AES | ||
2086 | KRB5_AUTHENT_free 2645 EXIST::FUNCTION: | ||
2087 | OCSP_BASICRESP_get_ext_by_critical 2646 EXIST:!VMS:FUNCTION: | ||
2088 | OCSP_BASICRESP_get_ext_by_crit 2646 EXIST:VMS:FUNCTION: | ||
2089 | OCSP_cert_status_str 2647 EXIST::FUNCTION: | ||
2090 | d2i_OCSP_REQUEST 2648 EXIST::FUNCTION: | ||
2091 | UI_dup_info_string 2649 EXIST::FUNCTION: | ||
2092 | _ossl_old_des_xwhite_in2out 2650 EXIST::FUNCTION:DES | ||
2093 | PKCS12_it 2651 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2094 | PKCS12_it 2651 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2095 | OCSP_SINGLERESP_get_ext_by_critical 2652 EXIST:!VMS:FUNCTION: | ||
2096 | OCSP_SINGLERESP_get_ext_by_crit 2652 EXIST:VMS:FUNCTION: | ||
2097 | OCSP_CERTSTATUS_free 2653 EXIST::FUNCTION: | ||
2098 | _ossl_old_des_crypt 2654 EXIST::FUNCTION:DES | ||
2099 | ASN1_item_i2d 2655 EXIST::FUNCTION: | ||
2100 | EVP_DecryptFinal_ex 2656 EXIST::FUNCTION: | ||
2101 | ENGINE_load_openssl 2657 EXIST::FUNCTION: | ||
2102 | ENGINE_get_cmd_defns 2658 EXIST::FUNCTION: | ||
2103 | ENGINE_set_load_privkey_function 2659 EXIST:!VMS:FUNCTION: | ||
2104 | ENGINE_set_load_privkey_fn 2659 EXIST:VMS:FUNCTION: | ||
2105 | EVP_EncryptFinal_ex 2660 EXIST::FUNCTION: | ||
2106 | ENGINE_set_default_digests 2661 EXIST::FUNCTION: | ||
2107 | X509_get0_pubkey_bitstr 2662 EXIST::FUNCTION: | ||
2108 | asn1_ex_i2c 2663 EXIST::FUNCTION: | ||
2109 | ENGINE_register_RSA 2664 EXIST::FUNCTION: | ||
2110 | ENGINE_unregister_DSA 2665 EXIST::FUNCTION: | ||
2111 | _ossl_old_des_key_sched 2666 EXIST::FUNCTION:DES | ||
2112 | X509_EXTENSION_it 2667 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2113 | X509_EXTENSION_it 2667 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2114 | i2d_KRB5_AUTHENT 2668 EXIST::FUNCTION: | ||
2115 | SXNETID_it 2669 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2116 | SXNETID_it 2669 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2117 | d2i_OCSP_SINGLERESP 2670 EXIST::FUNCTION: | ||
2118 | EDIPARTYNAME_new 2671 EXIST::FUNCTION: | ||
2119 | PKCS12_certbag2x509 2672 EXIST::FUNCTION: | ||
2120 | _ossl_old_des_ofb64_encrypt 2673 EXIST::FUNCTION:DES | ||
2121 | d2i_EXTENDED_KEY_USAGE 2674 EXIST::FUNCTION: | ||
2122 | ERR_print_errors_cb 2675 EXIST::FUNCTION: | ||
2123 | ENGINE_set_ciphers 2676 EXIST::FUNCTION: | ||
2124 | d2i_KRB5_APREQBODY 2677 EXIST::FUNCTION: | ||
2125 | UI_method_get_flusher 2678 EXIST::FUNCTION: | ||
2126 | X509_PUBKEY_it 2679 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2127 | X509_PUBKEY_it 2679 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2128 | _ossl_old_des_enc_read 2680 EXIST::FUNCTION:DES | ||
2129 | PKCS7_ENCRYPT_it 2681 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2130 | PKCS7_ENCRYPT_it 2681 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2131 | i2d_OCSP_RESPONSE 2682 EXIST::FUNCTION: | ||
2132 | EC_GROUP_get_cofactor 2683 EXIST::FUNCTION:EC | ||
2133 | PKCS12_unpack_p7data 2684 EXIST::FUNCTION: | ||
2134 | d2i_KRB5_AUTHDATA 2685 EXIST::FUNCTION: | ||
2135 | OCSP_copy_nonce 2686 EXIST::FUNCTION: | ||
2136 | KRB5_AUTHDATA_new 2687 EXIST::FUNCTION: | ||
2137 | OCSP_RESPDATA_new 2688 EXIST::FUNCTION: | ||
2138 | EC_GFp_mont_method 2689 EXIST::FUNCTION:EC | ||
2139 | OCSP_REVOKEDINFO_free 2690 EXIST::FUNCTION: | ||
2140 | UI_get_ex_data 2691 EXIST::FUNCTION: | ||
2141 | KRB5_APREQBODY_free 2692 EXIST::FUNCTION: | ||
2142 | EC_GROUP_get0_generator 2693 EXIST::FUNCTION:EC | ||
2143 | UI_get_default_method 2694 EXIST::FUNCTION: | ||
2144 | X509V3_set_nconf 2695 EXIST::FUNCTION: | ||
2145 | PKCS12_item_i2d_encrypt 2696 EXIST::FUNCTION: | ||
2146 | X509_add1_ext_i2d 2697 EXIST::FUNCTION: | ||
2147 | PKCS7_SIGNER_INFO_it 2698 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2148 | PKCS7_SIGNER_INFO_it 2698 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2149 | KRB5_PRINCNAME_new 2699 EXIST::FUNCTION: | ||
2150 | PKCS12_SAFEBAG_it 2700 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2151 | PKCS12_SAFEBAG_it 2700 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2152 | EC_GROUP_get_order 2701 EXIST::FUNCTION:EC | ||
2153 | d2i_OCSP_RESPID 2702 EXIST::FUNCTION: | ||
2154 | OCSP_request_verify 2703 EXIST::FUNCTION: | ||
2155 | NCONF_get_number_e 2704 EXIST::FUNCTION: | ||
2156 | _ossl_old_des_decrypt3 2705 EXIST::FUNCTION:DES | ||
2157 | X509_signature_print 2706 EXIST::FUNCTION:EVP | ||
2158 | OCSP_SINGLERESP_free 2707 EXIST::FUNCTION: | ||
2159 | ENGINE_load_builtin_engines 2708 EXIST::FUNCTION: | ||
2160 | i2d_OCSP_ONEREQ 2709 EXIST::FUNCTION: | ||
2161 | OCSP_REQUEST_add_ext 2710 EXIST::FUNCTION: | ||
2162 | OCSP_RESPBYTES_new 2711 EXIST::FUNCTION: | ||
2163 | EVP_MD_CTX_create 2712 EXIST::FUNCTION: | ||
2164 | OCSP_resp_find_status 2713 EXIST::FUNCTION: | ||
2165 | X509_ALGOR_it 2714 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2166 | X509_ALGOR_it 2714 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2167 | ASN1_TIME_it 2715 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2168 | ASN1_TIME_it 2715 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2169 | OCSP_request_set1_name 2716 EXIST::FUNCTION: | ||
2170 | OCSP_ONEREQ_get_ext_count 2717 EXIST::FUNCTION: | ||
2171 | UI_get0_result 2718 EXIST::FUNCTION: | ||
2172 | PKCS12_AUTHSAFES_it 2719 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2173 | PKCS12_AUTHSAFES_it 2719 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2174 | EVP_aes_256_ecb 2720 EXIST::FUNCTION:AES | ||
2175 | PKCS12_pack_authsafes 2721 EXIST::FUNCTION: | ||
2176 | ASN1_IA5STRING_it 2722 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2177 | ASN1_IA5STRING_it 2722 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2178 | UI_get_input_flags 2723 EXIST::FUNCTION: | ||
2179 | EC_GROUP_set_generator 2724 EXIST::FUNCTION:EC | ||
2180 | _ossl_old_des_string_to_2keys 2725 EXIST::FUNCTION:DES | ||
2181 | OCSP_CERTID_free 2726 EXIST::FUNCTION: | ||
2182 | X509_CERT_AUX_it 2727 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2183 | X509_CERT_AUX_it 2727 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2184 | CERTIFICATEPOLICIES_it 2728 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2185 | CERTIFICATEPOLICIES_it 2728 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2186 | _ossl_old_des_ede3_cbc_encrypt 2729 EXIST::FUNCTION:DES | ||
2187 | RAND_set_rand_engine 2730 EXIST::FUNCTION: | ||
2188 | DSO_get_loaded_filename 2731 EXIST::FUNCTION: | ||
2189 | X509_ATTRIBUTE_it 2732 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2190 | X509_ATTRIBUTE_it 2732 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2191 | OCSP_ONEREQ_get_ext_by_NID 2733 EXIST::FUNCTION: | ||
2192 | PKCS12_decrypt_skey 2734 EXIST::FUNCTION: | ||
2193 | KRB5_AUTHENT_it 2735 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2194 | KRB5_AUTHENT_it 2735 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2195 | UI_dup_error_string 2736 EXIST::FUNCTION: | ||
2196 | RSAPublicKey_it 2737 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:RSA | ||
2197 | RSAPublicKey_it 2737 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:RSA | ||
2198 | i2d_OCSP_REQUEST 2738 EXIST::FUNCTION: | ||
2199 | PKCS12_x509crl2certbag 2739 EXIST::FUNCTION: | ||
2200 | OCSP_SERVICELOC_it 2740 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2201 | OCSP_SERVICELOC_it 2740 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2202 | ASN1_item_sign 2741 EXIST::FUNCTION:EVP | ||
2203 | X509_CRL_set_issuer_name 2742 EXIST::FUNCTION: | ||
2204 | OBJ_NAME_do_all_sorted 2743 EXIST::FUNCTION: | ||
2205 | i2d_OCSP_BASICRESP 2744 EXIST::FUNCTION: | ||
2206 | i2d_OCSP_RESPBYTES 2745 EXIST::FUNCTION: | ||
2207 | PKCS12_unpack_p7encdata 2746 EXIST::FUNCTION: | ||
2208 | HMAC_CTX_init 2747 EXIST::FUNCTION:HMAC | ||
2209 | ENGINE_get_digest 2748 EXIST::FUNCTION: | ||
2210 | OCSP_RESPONSE_print 2749 EXIST::FUNCTION: | ||
2211 | KRB5_TKTBODY_it 2750 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2212 | KRB5_TKTBODY_it 2750 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2213 | ACCESS_DESCRIPTION_it 2751 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2214 | ACCESS_DESCRIPTION_it 2751 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2215 | PKCS7_ISSUER_AND_SERIAL_it 2752 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2216 | PKCS7_ISSUER_AND_SERIAL_it 2752 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2217 | PBE2PARAM_it 2753 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2218 | PBE2PARAM_it 2753 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2219 | PKCS12_certbag2x509crl 2754 EXIST::FUNCTION: | ||
2220 | PKCS7_SIGNED_it 2755 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2221 | PKCS7_SIGNED_it 2755 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2222 | ENGINE_get_cipher 2756 EXIST::FUNCTION: | ||
2223 | i2d_OCSP_CRLID 2757 EXIST::FUNCTION: | ||
2224 | OCSP_SINGLERESP_new 2758 EXIST::FUNCTION: | ||
2225 | ENGINE_cmd_is_executable 2759 EXIST::FUNCTION: | ||
2226 | RSA_up_ref 2760 EXIST::FUNCTION:RSA | ||
2227 | ASN1_GENERALSTRING_it 2761 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2228 | ASN1_GENERALSTRING_it 2761 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2229 | ENGINE_register_DSA 2762 EXIST::FUNCTION: | ||
2230 | X509V3_EXT_add_nconf_sk 2763 EXIST::FUNCTION: | ||
2231 | ENGINE_set_load_pubkey_function 2764 EXIST::FUNCTION: | ||
2232 | PKCS8_decrypt 2765 EXIST::FUNCTION: | ||
2233 | PEM_bytes_read_bio 2766 EXIST::FUNCTION:BIO | ||
2234 | DIRECTORYSTRING_it 2767 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2235 | DIRECTORYSTRING_it 2767 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2236 | d2i_OCSP_CRLID 2768 EXIST::FUNCTION: | ||
2237 | EC_POINT_is_on_curve 2769 EXIST::FUNCTION:EC | ||
2238 | CRYPTO_set_locked_mem_ex_functions 2770 EXIST:!VMS:FUNCTION: | ||
2239 | CRYPTO_set_locked_mem_ex_funcs 2770 EXIST:VMS:FUNCTION: | ||
2240 | d2i_KRB5_CHECKSUM 2771 EXIST::FUNCTION: | ||
2241 | ASN1_item_dup 2772 EXIST::FUNCTION: | ||
2242 | X509_it 2773 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2243 | X509_it 2773 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2244 | BN_mod_add 2774 EXIST::FUNCTION: | ||
2245 | KRB5_AUTHDATA_free 2775 EXIST::FUNCTION: | ||
2246 | _ossl_old_des_cbc_cksum 2776 EXIST::FUNCTION:DES | ||
2247 | ASN1_item_verify 2777 EXIST::FUNCTION:EVP | ||
2248 | CRYPTO_set_mem_ex_functions 2778 EXIST::FUNCTION: | ||
2249 | EC_POINT_get_Jprojective_coordinates_GFp 2779 EXIST:!VMS:FUNCTION:EC | ||
2250 | EC_POINT_get_Jproj_coords_GFp 2779 EXIST:VMS:FUNCTION:EC | ||
2251 | ZLONG_it 2780 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2252 | ZLONG_it 2780 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2253 | CRYPTO_get_locked_mem_ex_functions 2781 EXIST:!VMS:FUNCTION: | ||
2254 | CRYPTO_get_locked_mem_ex_funcs 2781 EXIST:VMS:FUNCTION: | ||
2255 | ASN1_TIME_check 2782 EXIST::FUNCTION: | ||
2256 | UI_get0_user_data 2783 EXIST::FUNCTION: | ||
2257 | HMAC_CTX_cleanup 2784 EXIST::FUNCTION:HMAC | ||
2258 | DSA_up_ref 2785 EXIST::FUNCTION:DSA | ||
2259 | _ossl_old_des_ede3_cfb64_encrypt 2786 EXIST:!VMS:FUNCTION:DES | ||
2260 | _ossl_odes_ede3_cfb64_encrypt 2786 EXIST:VMS:FUNCTION:DES | ||
2261 | ASN1_BMPSTRING_it 2787 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2262 | ASN1_BMPSTRING_it 2787 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2263 | ASN1_tag2bit 2788 EXIST::FUNCTION: | ||
2264 | UI_method_set_flusher 2789 EXIST::FUNCTION: | ||
2265 | X509_ocspid_print 2790 EXIST::FUNCTION:BIO | ||
2266 | KRB5_ENCDATA_it 2791 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2267 | KRB5_ENCDATA_it 2791 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2268 | ENGINE_get_load_pubkey_function 2792 EXIST::FUNCTION: | ||
2269 | UI_add_user_data 2793 EXIST::FUNCTION: | ||
2270 | OCSP_REQUEST_delete_ext 2794 EXIST::FUNCTION: | ||
2271 | UI_get_method 2795 EXIST::FUNCTION: | ||
2272 | OCSP_ONEREQ_free 2796 EXIST::FUNCTION: | ||
2273 | ASN1_PRINTABLESTRING_it 2797 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2274 | ASN1_PRINTABLESTRING_it 2797 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2275 | X509_CRL_set_nextUpdate 2798 EXIST::FUNCTION: | ||
2276 | OCSP_REQUEST_it 2799 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2277 | OCSP_REQUEST_it 2799 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2278 | OCSP_BASICRESP_it 2800 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2279 | OCSP_BASICRESP_it 2800 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2280 | AES_ecb_encrypt 2801 EXIST::FUNCTION:AES | ||
2281 | BN_mod_sqr 2802 EXIST::FUNCTION: | ||
2282 | NETSCAPE_CERT_SEQUENCE_it 2803 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2283 | NETSCAPE_CERT_SEQUENCE_it 2803 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2284 | GENERAL_NAMES_it 2804 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2285 | GENERAL_NAMES_it 2804 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2286 | AUTHORITY_INFO_ACCESS_it 2805 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2287 | AUTHORITY_INFO_ACCESS_it 2805 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2288 | ASN1_FBOOLEAN_it 2806 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2289 | ASN1_FBOOLEAN_it 2806 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2290 | UI_set_ex_data 2807 EXIST::FUNCTION: | ||
2291 | _ossl_old_des_string_to_key 2808 EXIST::FUNCTION:DES | ||
2292 | ENGINE_register_all_RSA 2809 EXIST::FUNCTION: | ||
2293 | d2i_KRB5_PRINCNAME 2810 EXIST::FUNCTION: | ||
2294 | OCSP_RESPBYTES_it 2811 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2295 | OCSP_RESPBYTES_it 2811 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2296 | X509_CINF_it 2812 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2297 | X509_CINF_it 2812 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2298 | ENGINE_unregister_digests 2813 EXIST::FUNCTION: | ||
2299 | d2i_EDIPARTYNAME 2814 EXIST::FUNCTION: | ||
2300 | d2i_OCSP_SERVICELOC 2815 EXIST::FUNCTION: | ||
2301 | ENGINE_get_digests 2816 EXIST::FUNCTION: | ||
2302 | _ossl_old_des_set_odd_parity 2817 EXIST::FUNCTION:DES | ||
2303 | OCSP_RESPDATA_free 2818 EXIST::FUNCTION: | ||
2304 | d2i_KRB5_TICKET 2819 EXIST::FUNCTION: | ||
2305 | OTHERNAME_it 2820 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2306 | OTHERNAME_it 2820 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2307 | EVP_MD_CTX_cleanup 2821 EXIST::FUNCTION: | ||
2308 | d2i_ASN1_GENERALSTRING 2822 EXIST::FUNCTION: | ||
2309 | X509_CRL_set_version 2823 EXIST::FUNCTION: | ||
2310 | BN_mod_sub 2824 EXIST::FUNCTION: | ||
2311 | OCSP_SINGLERESP_get_ext_by_NID 2825 EXIST::FUNCTION: | ||
2312 | ENGINE_get_ex_new_index 2826 EXIST::FUNCTION: | ||
2313 | OCSP_REQUEST_free 2827 EXIST::FUNCTION: | ||
2314 | OCSP_REQUEST_add1_ext_i2d 2828 EXIST::FUNCTION: | ||
2315 | X509_VAL_it 2829 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2316 | X509_VAL_it 2829 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2317 | EC_POINTs_make_affine 2830 EXIST::FUNCTION:EC | ||
2318 | EC_POINT_mul 2831 EXIST::FUNCTION:EC | ||
2319 | X509V3_EXT_add_nconf 2832 EXIST::FUNCTION: | ||
2320 | X509_TRUST_set 2833 EXIST::FUNCTION: | ||
2321 | X509_CRL_add1_ext_i2d 2834 EXIST::FUNCTION: | ||
2322 | _ossl_old_des_fcrypt 2835 EXIST::FUNCTION:DES | ||
2323 | DISPLAYTEXT_it 2836 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2324 | DISPLAYTEXT_it 2836 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2325 | X509_CRL_set_lastUpdate 2837 EXIST::FUNCTION: | ||
2326 | OCSP_BASICRESP_free 2838 EXIST::FUNCTION: | ||
2327 | OCSP_BASICRESP_add1_ext_i2d 2839 EXIST::FUNCTION: | ||
2328 | d2i_KRB5_AUTHENTBODY 2840 EXIST::FUNCTION: | ||
2329 | CRYPTO_set_ex_data_implementation 2841 EXIST:!VMS:FUNCTION: | ||
2330 | CRYPTO_set_ex_data_impl 2841 EXIST:VMS:FUNCTION: | ||
2331 | KRB5_ENCDATA_new 2842 EXIST::FUNCTION: | ||
2332 | DSO_up_ref 2843 EXIST::FUNCTION: | ||
2333 | OCSP_crl_reason_str 2844 EXIST::FUNCTION: | ||
2334 | UI_get0_result_string 2845 EXIST::FUNCTION: | ||
2335 | ASN1_GENERALSTRING_new 2846 EXIST::FUNCTION: | ||
2336 | X509_SIG_it 2847 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2337 | X509_SIG_it 2847 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2338 | ERR_set_implementation 2848 EXIST::FUNCTION: | ||
2339 | ERR_load_EC_strings 2849 EXIST::FUNCTION:EC | ||
2340 | UI_get0_action_string 2850 EXIST::FUNCTION: | ||
2341 | OCSP_ONEREQ_get_ext 2851 EXIST::FUNCTION: | ||
2342 | EC_POINT_method_of 2852 EXIST::FUNCTION:EC | ||
2343 | i2d_KRB5_APREQBODY 2853 EXIST::FUNCTION: | ||
2344 | _ossl_old_des_ecb3_encrypt 2854 EXIST::FUNCTION:DES | ||
2345 | CRYPTO_get_mem_ex_functions 2855 EXIST::FUNCTION: | ||
2346 | ENGINE_get_ex_data 2856 EXIST::FUNCTION: | ||
2347 | UI_destroy_method 2857 EXIST::FUNCTION: | ||
2348 | ASN1_item_i2d_bio 2858 EXIST::FUNCTION:BIO | ||
2349 | OCSP_ONEREQ_get_ext_by_OBJ 2859 EXIST::FUNCTION: | ||
2350 | ASN1_primitive_new 2860 EXIST::FUNCTION: | ||
2351 | ASN1_PRINTABLE_it 2861 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2352 | ASN1_PRINTABLE_it 2861 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2353 | EVP_aes_192_ecb 2862 EXIST::FUNCTION:AES | ||
2354 | OCSP_SIGNATURE_new 2863 EXIST::FUNCTION: | ||
2355 | LONG_it 2864 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2356 | LONG_it 2864 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2357 | ASN1_VISIBLESTRING_it 2865 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2358 | ASN1_VISIBLESTRING_it 2865 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2359 | OCSP_SINGLERESP_add1_ext_i2d 2866 EXIST::FUNCTION: | ||
2360 | d2i_OCSP_CERTID 2867 EXIST::FUNCTION: | ||
2361 | ASN1_item_d2i_fp 2868 EXIST::FUNCTION:FP_API | ||
2362 | CRL_DIST_POINTS_it 2869 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2363 | CRL_DIST_POINTS_it 2869 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2364 | GENERAL_NAME_print 2870 EXIST::FUNCTION: | ||
2365 | OCSP_SINGLERESP_delete_ext 2871 EXIST::FUNCTION: | ||
2366 | PKCS12_SAFEBAGS_it 2872 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2367 | PKCS12_SAFEBAGS_it 2872 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2368 | d2i_OCSP_SIGNATURE 2873 EXIST::FUNCTION: | ||
2369 | OCSP_request_add1_nonce 2874 EXIST::FUNCTION: | ||
2370 | ENGINE_set_cmd_defns 2875 EXIST::FUNCTION: | ||
2371 | OCSP_SERVICELOC_free 2876 EXIST::FUNCTION: | ||
2372 | EC_GROUP_free 2877 EXIST::FUNCTION:EC | ||
2373 | ASN1_BIT_STRING_it 2878 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2374 | ASN1_BIT_STRING_it 2878 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2375 | X509_REQ_it 2879 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2376 | X509_REQ_it 2879 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2377 | _ossl_old_des_cbc_encrypt 2880 EXIST::FUNCTION:DES | ||
2378 | ERR_unload_strings 2881 EXIST::FUNCTION: | ||
2379 | PKCS7_SIGN_ENVELOPE_it 2882 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2380 | PKCS7_SIGN_ENVELOPE_it 2882 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2381 | EDIPARTYNAME_free 2883 EXIST::FUNCTION: | ||
2382 | OCSP_REQINFO_free 2884 EXIST::FUNCTION: | ||
2383 | EC_GROUP_new_curve_GFp 2885 EXIST::FUNCTION:EC | ||
2384 | OCSP_REQUEST_get1_ext_d2i 2886 EXIST::FUNCTION: | ||
2385 | PKCS12_item_pack_safebag 2887 EXIST::FUNCTION: | ||
2386 | asn1_ex_c2i 2888 EXIST::FUNCTION: | ||
2387 | ENGINE_register_digests 2889 EXIST::FUNCTION: | ||
2388 | i2d_OCSP_REVOKEDINFO 2890 EXIST::FUNCTION: | ||
2389 | asn1_enc_restore 2891 EXIST::FUNCTION: | ||
2390 | UI_free 2892 EXIST::FUNCTION: | ||
2391 | UI_new_method 2893 EXIST::FUNCTION: | ||
2392 | EVP_EncryptInit_ex 2894 EXIST::FUNCTION: | ||
2393 | X509_pubkey_digest 2895 EXIST::FUNCTION:EVP | ||
2394 | EC_POINT_invert 2896 EXIST::FUNCTION:EC | ||
2395 | OCSP_basic_sign 2897 EXIST::FUNCTION: | ||
2396 | i2d_OCSP_RESPID 2898 EXIST::FUNCTION: | ||
2397 | OCSP_check_nonce 2899 EXIST::FUNCTION: | ||
2398 | ENGINE_ctrl_cmd 2900 EXIST::FUNCTION: | ||
2399 | d2i_KRB5_ENCKEY 2901 EXIST::FUNCTION: | ||
2400 | OCSP_parse_url 2902 EXIST::FUNCTION: | ||
2401 | OCSP_SINGLERESP_get_ext 2903 EXIST::FUNCTION: | ||
2402 | OCSP_CRLID_free 2904 EXIST::FUNCTION: | ||
2403 | OCSP_BASICRESP_get1_ext_d2i 2905 EXIST::FUNCTION: | ||
2404 | RSAPrivateKey_it 2906 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:RSA | ||
2405 | RSAPrivateKey_it 2906 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:RSA | ||
2406 | ENGINE_register_all_DH 2907 EXIST::FUNCTION: | ||
2407 | i2d_EDIPARTYNAME 2908 EXIST::FUNCTION: | ||
2408 | EC_POINT_get_affine_coordinates_GFp 2909 EXIST:!VMS:FUNCTION:EC | ||
2409 | EC_POINT_get_affine_coords_GFp 2909 EXIST:VMS:FUNCTION:EC | ||
2410 | OCSP_CRLID_new 2910 EXIST::FUNCTION: | ||
2411 | ENGINE_get_flags 2911 EXIST::FUNCTION: | ||
2412 | OCSP_ONEREQ_it 2912 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2413 | OCSP_ONEREQ_it 2912 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2414 | UI_process 2913 EXIST::FUNCTION: | ||
2415 | ASN1_INTEGER_it 2914 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2416 | ASN1_INTEGER_it 2914 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2417 | EVP_CipherInit_ex 2915 EXIST::FUNCTION: | ||
2418 | UI_get_string_type 2916 EXIST::FUNCTION: | ||
2419 | ENGINE_unregister_DH 2917 EXIST::FUNCTION: | ||
2420 | ENGINE_register_all_DSA 2918 EXIST::FUNCTION: | ||
2421 | OCSP_ONEREQ_get_ext_by_critical 2919 EXIST::FUNCTION: | ||
2422 | bn_dup_expand 2920 EXIST::FUNCTION: | ||
2423 | OCSP_cert_id_new 2921 EXIST::FUNCTION: | ||
2424 | BASIC_CONSTRAINTS_it 2922 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2425 | BASIC_CONSTRAINTS_it 2922 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2426 | BN_mod_add_quick 2923 EXIST::FUNCTION: | ||
2427 | EC_POINT_new 2924 EXIST::FUNCTION:EC | ||
2428 | EVP_MD_CTX_destroy 2925 EXIST::FUNCTION: | ||
2429 | OCSP_RESPBYTES_free 2926 EXIST::FUNCTION: | ||
2430 | EVP_aes_128_cbc 2927 EXIST::FUNCTION:AES | ||
2431 | OCSP_SINGLERESP_get1_ext_d2i 2928 EXIST::FUNCTION: | ||
2432 | EC_POINT_free 2929 EXIST::FUNCTION:EC | ||
2433 | DH_up_ref 2930 EXIST::FUNCTION:DH | ||
2434 | X509_NAME_ENTRY_it 2931 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2435 | X509_NAME_ENTRY_it 2931 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2436 | UI_get_ex_new_index 2932 EXIST::FUNCTION: | ||
2437 | BN_mod_sub_quick 2933 EXIST::FUNCTION: | ||
2438 | OCSP_ONEREQ_add_ext 2934 EXIST::FUNCTION: | ||
2439 | OCSP_request_sign 2935 EXIST::FUNCTION: | ||
2440 | EVP_DigestFinal_ex 2936 EXIST::FUNCTION: | ||
2441 | ENGINE_set_digests 2937 EXIST::FUNCTION: | ||
2442 | OCSP_id_issuer_cmp 2938 EXIST::FUNCTION: | ||
2443 | OBJ_NAME_do_all 2939 EXIST::FUNCTION: | ||
2444 | EC_POINTs_mul 2940 EXIST::FUNCTION:EC | ||
2445 | ENGINE_register_complete 2941 EXIST::FUNCTION: | ||
2446 | X509V3_EXT_nconf_nid 2942 EXIST::FUNCTION: | ||
2447 | ASN1_SEQUENCE_it 2943 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2448 | ASN1_SEQUENCE_it 2943 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2449 | UI_set_default_method 2944 EXIST::FUNCTION: | ||
2450 | RAND_query_egd_bytes 2945 EXIST::FUNCTION: | ||
2451 | UI_method_get_writer 2946 EXIST::FUNCTION: | ||
2452 | UI_OpenSSL 2947 EXIST::FUNCTION: | ||
2453 | PEM_def_callback 2948 EXIST::FUNCTION: | ||
2454 | ENGINE_cleanup 2949 EXIST::FUNCTION: | ||
2455 | DIST_POINT_it 2950 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2456 | DIST_POINT_it 2950 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2457 | OCSP_SINGLERESP_it 2951 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2458 | OCSP_SINGLERESP_it 2951 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2459 | d2i_KRB5_TKTBODY 2952 EXIST::FUNCTION: | ||
2460 | EC_POINT_cmp 2953 EXIST::FUNCTION:EC | ||
2461 | OCSP_REVOKEDINFO_new 2954 EXIST::FUNCTION: | ||
2462 | i2d_OCSP_CERTSTATUS 2955 EXIST::FUNCTION: | ||
2463 | OCSP_basic_add1_nonce 2956 EXIST::FUNCTION: | ||
2464 | ASN1_item_ex_d2i 2957 EXIST::FUNCTION: | ||
2465 | BN_mod_lshift1_quick 2958 EXIST::FUNCTION: | ||
2466 | UI_set_method 2959 EXIST::FUNCTION: | ||
2467 | OCSP_id_get0_info 2960 EXIST::FUNCTION: | ||
2468 | BN_mod_sqrt 2961 EXIST::FUNCTION: | ||
2469 | EC_GROUP_copy 2962 EXIST::FUNCTION:EC | ||
2470 | KRB5_ENCDATA_free 2963 EXIST::FUNCTION: | ||
2471 | _ossl_old_des_cfb_encrypt 2964 EXIST::FUNCTION:DES | ||
2472 | OCSP_SINGLERESP_get_ext_by_OBJ 2965 EXIST::FUNCTION: | ||
2473 | OCSP_cert_to_id 2966 EXIST::FUNCTION: | ||
2474 | OCSP_RESPID_new 2967 EXIST::FUNCTION: | ||
2475 | OCSP_RESPDATA_it 2968 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2476 | OCSP_RESPDATA_it 2968 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2477 | d2i_OCSP_RESPDATA 2969 EXIST::FUNCTION: | ||
2478 | ENGINE_register_all_complete 2970 EXIST::FUNCTION: | ||
2479 | OCSP_check_validity 2971 EXIST::FUNCTION: | ||
2480 | PKCS12_BAGS_it 2972 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2481 | PKCS12_BAGS_it 2972 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2482 | OCSP_url_svcloc_new 2973 EXIST::FUNCTION: | ||
2483 | ASN1_template_free 2974 EXIST::FUNCTION: | ||
2484 | OCSP_SINGLERESP_add_ext 2975 EXIST::FUNCTION: | ||
2485 | KRB5_AUTHENTBODY_it 2976 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2486 | KRB5_AUTHENTBODY_it 2976 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2487 | X509_supported_extension 2977 EXIST::FUNCTION: | ||
2488 | i2d_KRB5_AUTHDATA 2978 EXIST::FUNCTION: | ||
2489 | UI_method_get_opener 2979 EXIST::FUNCTION: | ||
2490 | ENGINE_set_ex_data 2980 EXIST::FUNCTION: | ||
2491 | OCSP_REQUEST_print 2981 EXIST::FUNCTION: | ||
2492 | CBIGNUM_it 2982 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2493 | CBIGNUM_it 2982 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2494 | KRB5_TICKET_new 2983 EXIST::FUNCTION: | ||
2495 | KRB5_APREQ_new 2984 EXIST::FUNCTION: | ||
2496 | EC_GROUP_get_curve_GFp 2985 EXIST::FUNCTION:EC | ||
2497 | KRB5_ENCKEY_new 2986 EXIST::FUNCTION: | ||
2498 | ASN1_template_d2i 2987 EXIST::FUNCTION: | ||
2499 | _ossl_old_des_quad_cksum 2988 EXIST::FUNCTION:DES | ||
2500 | OCSP_single_get0_status 2989 EXIST::FUNCTION: | ||
2501 | BN_swap 2990 EXIST::FUNCTION: | ||
2502 | POLICYINFO_it 2991 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2503 | POLICYINFO_it 2991 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2504 | ENGINE_set_destroy_function 2992 EXIST::FUNCTION: | ||
2505 | asn1_enc_free 2993 EXIST::FUNCTION: | ||
2506 | OCSP_RESPID_it 2994 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2507 | OCSP_RESPID_it 2994 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2508 | EC_GROUP_new 2995 EXIST::FUNCTION:EC | ||
2509 | EVP_aes_256_cbc 2996 EXIST::FUNCTION:AES | ||
2510 | i2d_KRB5_PRINCNAME 2997 EXIST::FUNCTION: | ||
2511 | _ossl_old_des_encrypt2 2998 EXIST::FUNCTION:DES | ||
2512 | _ossl_old_des_encrypt3 2999 EXIST::FUNCTION:DES | ||
2513 | PKCS8_PRIV_KEY_INFO_it 3000 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2514 | PKCS8_PRIV_KEY_INFO_it 3000 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2515 | OCSP_REQINFO_it 3001 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2516 | OCSP_REQINFO_it 3001 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2517 | PBEPARAM_it 3002 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2518 | PBEPARAM_it 3002 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2519 | KRB5_AUTHENTBODY_new 3003 EXIST::FUNCTION: | ||
2520 | X509_CRL_add0_revoked 3004 EXIST::FUNCTION: | ||
2521 | EDIPARTYNAME_it 3005 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2522 | EDIPARTYNAME_it 3005 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2523 | NETSCAPE_SPKI_it 3006 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2524 | NETSCAPE_SPKI_it 3006 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2525 | UI_get0_test_string 3007 EXIST::FUNCTION: | ||
2526 | ENGINE_get_cipher_engine 3008 EXIST::FUNCTION: | ||
2527 | ENGINE_register_all_ciphers 3009 EXIST::FUNCTION: | ||
2528 | EC_POINT_copy 3010 EXIST::FUNCTION:EC | ||
2529 | BN_kronecker 3011 EXIST::FUNCTION: | ||
2530 | _ossl_old_des_ede3_ofb64_encrypt 3012 EXIST:!VMS:FUNCTION:DES | ||
2531 | _ossl_odes_ede3_ofb64_encrypt 3012 EXIST:VMS:FUNCTION:DES | ||
2532 | UI_method_get_reader 3013 EXIST::FUNCTION: | ||
2533 | OCSP_BASICRESP_get_ext_count 3014 EXIST::FUNCTION: | ||
2534 | ASN1_ENUMERATED_it 3015 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2535 | ASN1_ENUMERATED_it 3015 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2536 | UI_set_result 3016 EXIST::FUNCTION: | ||
2537 | i2d_KRB5_TICKET 3017 EXIST::FUNCTION: | ||
2538 | X509_print_ex_fp 3018 EXIST::FUNCTION:FP_API | ||
2539 | EVP_CIPHER_CTX_set_padding 3019 EXIST::FUNCTION: | ||
2540 | d2i_OCSP_RESPONSE 3020 EXIST::FUNCTION: | ||
2541 | ASN1_UTCTIME_it 3021 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2542 | ASN1_UTCTIME_it 3021 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2543 | _ossl_old_des_enc_write 3022 EXIST::FUNCTION:DES | ||
2544 | OCSP_RESPONSE_new 3023 EXIST::FUNCTION: | ||
2545 | AES_set_encrypt_key 3024 EXIST::FUNCTION:AES | ||
2546 | OCSP_resp_count 3025 EXIST::FUNCTION: | ||
2547 | KRB5_CHECKSUM_new 3026 EXIST::FUNCTION: | ||
2548 | ENGINE_load_cswift 3027 EXIST::FUNCTION: | ||
2549 | OCSP_onereq_get0_id 3028 EXIST::FUNCTION: | ||
2550 | ENGINE_set_default_ciphers 3029 EXIST::FUNCTION: | ||
2551 | NOTICEREF_it 3030 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2552 | NOTICEREF_it 3030 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2553 | X509V3_EXT_CRL_add_nconf 3031 EXIST::FUNCTION: | ||
2554 | OCSP_REVOKEDINFO_it 3032 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2555 | OCSP_REVOKEDINFO_it 3032 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2556 | AES_encrypt 3033 EXIST::FUNCTION:AES | ||
2557 | OCSP_REQUEST_new 3034 EXIST::FUNCTION: | ||
2558 | ASN1_ANY_it 3035 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2559 | ASN1_ANY_it 3035 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2560 | CRYPTO_ex_data_new_class 3036 EXIST::FUNCTION: | ||
2561 | _ossl_old_des_ncbc_encrypt 3037 EXIST::FUNCTION:DES | ||
2562 | i2d_KRB5_TKTBODY 3038 EXIST::FUNCTION: | ||
2563 | EC_POINT_clear_free 3039 EXIST::FUNCTION:EC | ||
2564 | AES_decrypt 3040 EXIST::FUNCTION:AES | ||
2565 | asn1_enc_init 3041 EXIST::FUNCTION: | ||
2566 | UI_get_result_maxsize 3042 EXIST::FUNCTION: | ||
2567 | OCSP_CERTID_new 3043 EXIST::FUNCTION: | ||
2568 | ENGINE_unregister_RAND 3044 EXIST::FUNCTION: | ||
2569 | UI_method_get_closer 3045 EXIST::FUNCTION: | ||
2570 | d2i_KRB5_ENCDATA 3046 EXIST::FUNCTION: | ||
2571 | OCSP_request_onereq_count 3047 EXIST::FUNCTION: | ||
2572 | OCSP_basic_verify 3048 EXIST::FUNCTION: | ||
2573 | KRB5_AUTHENTBODY_free 3049 EXIST::FUNCTION: | ||
2574 | ASN1_item_d2i 3050 EXIST::FUNCTION: | ||
2575 | ASN1_primitive_free 3051 EXIST::FUNCTION: | ||
2576 | i2d_EXTENDED_KEY_USAGE 3052 EXIST::FUNCTION: | ||
2577 | i2d_OCSP_SIGNATURE 3053 EXIST::FUNCTION: | ||
2578 | asn1_enc_save 3054 EXIST::FUNCTION: | ||
2579 | ENGINE_load_nuron 3055 EXIST::FUNCTION: | ||
2580 | _ossl_old_des_pcbc_encrypt 3056 EXIST::FUNCTION:DES | ||
2581 | PKCS12_MAC_DATA_it 3057 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2582 | PKCS12_MAC_DATA_it 3057 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2583 | OCSP_accept_responses_new 3058 EXIST::FUNCTION: | ||
2584 | asn1_do_lock 3059 EXIST::FUNCTION: | ||
2585 | PKCS7_ATTR_VERIFY_it 3060 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2586 | PKCS7_ATTR_VERIFY_it 3060 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2587 | KRB5_APREQBODY_it 3061 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2588 | KRB5_APREQBODY_it 3061 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2589 | i2d_OCSP_SINGLERESP 3062 EXIST::FUNCTION: | ||
2590 | ASN1_item_ex_new 3063 EXIST::FUNCTION: | ||
2591 | UI_add_verify_string 3064 EXIST::FUNCTION: | ||
2592 | _ossl_old_des_set_key 3065 EXIST::FUNCTION:DES | ||
2593 | KRB5_PRINCNAME_it 3066 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2594 | KRB5_PRINCNAME_it 3066 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2595 | EVP_DecryptInit_ex 3067 EXIST::FUNCTION: | ||
2596 | i2d_OCSP_CERTID 3068 EXIST::FUNCTION: | ||
2597 | ASN1_item_d2i_bio 3069 EXIST::FUNCTION:BIO | ||
2598 | EC_POINT_dbl 3070 EXIST::FUNCTION:EC | ||
2599 | asn1_get_choice_selector 3071 EXIST::FUNCTION: | ||
2600 | i2d_KRB5_CHECKSUM 3072 EXIST::FUNCTION: | ||
2601 | ENGINE_set_table_flags 3073 EXIST::FUNCTION: | ||
2602 | AES_options 3074 EXIST::FUNCTION:AES | ||
2603 | ENGINE_load_chil 3075 EXIST::FUNCTION: | ||
2604 | OCSP_id_cmp 3076 EXIST::FUNCTION: | ||
2605 | OCSP_BASICRESP_new 3077 EXIST::FUNCTION: | ||
2606 | OCSP_REQUEST_get_ext_by_NID 3078 EXIST::FUNCTION: | ||
2607 | KRB5_APREQ_it 3079 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2608 | KRB5_APREQ_it 3079 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2609 | ENGINE_get_destroy_function 3080 EXIST::FUNCTION: | ||
2610 | CONF_set_nconf 3081 EXIST::FUNCTION: | ||
2611 | ASN1_PRINTABLE_free 3082 EXIST::FUNCTION: | ||
2612 | OCSP_BASICRESP_get_ext_by_NID 3083 EXIST::FUNCTION: | ||
2613 | DIST_POINT_NAME_it 3084 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2614 | DIST_POINT_NAME_it 3084 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2615 | X509V3_extensions_print 3085 EXIST::FUNCTION: | ||
2616 | _ossl_old_des_cfb64_encrypt 3086 EXIST::FUNCTION:DES | ||
2617 | X509_REVOKED_add1_ext_i2d 3087 EXIST::FUNCTION: | ||
2618 | _ossl_old_des_ofb_encrypt 3088 EXIST::FUNCTION:DES | ||
2619 | KRB5_TKTBODY_new 3089 EXIST::FUNCTION: | ||
2620 | ASN1_OCTET_STRING_it 3090 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2621 | ASN1_OCTET_STRING_it 3090 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2622 | ERR_load_UI_strings 3091 EXIST::FUNCTION: | ||
2623 | i2d_KRB5_ENCKEY 3092 EXIST::FUNCTION: | ||
2624 | ASN1_template_new 3093 EXIST::FUNCTION: | ||
2625 | OCSP_SIGNATURE_free 3094 EXIST::FUNCTION: | ||
2626 | ASN1_item_i2d_fp 3095 EXIST::FUNCTION:FP_API | ||
2627 | KRB5_PRINCNAME_free 3096 EXIST::FUNCTION: | ||
2628 | PKCS7_RECIP_INFO_it 3097 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2629 | PKCS7_RECIP_INFO_it 3097 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2630 | EXTENDED_KEY_USAGE_it 3098 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2631 | EXTENDED_KEY_USAGE_it 3098 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2632 | EC_GFp_simple_method 3099 EXIST::FUNCTION:EC | ||
2633 | EC_GROUP_precompute_mult 3100 EXIST::FUNCTION:EC | ||
2634 | OCSP_request_onereq_get0 3101 EXIST::FUNCTION: | ||
2635 | UI_method_set_writer 3102 EXIST::FUNCTION: | ||
2636 | KRB5_AUTHENT_new 3103 EXIST::FUNCTION: | ||
2637 | X509_CRL_INFO_it 3104 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2638 | X509_CRL_INFO_it 3104 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2639 | DSO_set_name_converter 3105 EXIST::FUNCTION: | ||
2640 | AES_set_decrypt_key 3106 EXIST::FUNCTION:AES | ||
2641 | PKCS7_DIGEST_it 3107 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2642 | PKCS7_DIGEST_it 3107 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2643 | PKCS12_x5092certbag 3108 EXIST::FUNCTION: | ||
2644 | EVP_DigestInit_ex 3109 EXIST::FUNCTION: | ||
2645 | i2a_ACCESS_DESCRIPTION 3110 EXIST::FUNCTION: | ||
2646 | OCSP_RESPONSE_it 3111 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2647 | OCSP_RESPONSE_it 3111 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2648 | PKCS7_ENC_CONTENT_it 3112 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2649 | PKCS7_ENC_CONTENT_it 3112 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2650 | OCSP_request_add0_id 3113 EXIST::FUNCTION: | ||
2651 | EC_POINT_make_affine 3114 EXIST::FUNCTION:EC | ||
2652 | DSO_get_filename 3115 EXIST::FUNCTION: | ||
2653 | OCSP_CERTSTATUS_it 3116 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2654 | OCSP_CERTSTATUS_it 3116 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2655 | OCSP_request_add1_cert 3117 EXIST::FUNCTION: | ||
2656 | UI_get0_output_string 3118 EXIST::FUNCTION: | ||
2657 | UI_dup_verify_string 3119 EXIST::FUNCTION: | ||
2658 | BN_mod_lshift 3120 EXIST::FUNCTION: | ||
2659 | KRB5_AUTHDATA_it 3121 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2660 | KRB5_AUTHDATA_it 3121 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2661 | asn1_set_choice_selector 3122 EXIST::FUNCTION: | ||
2662 | OCSP_basic_add1_status 3123 EXIST::FUNCTION: | ||
2663 | OCSP_RESPID_free 3124 EXIST::FUNCTION: | ||
2664 | asn1_get_field_ptr 3125 EXIST::FUNCTION: | ||
2665 | UI_add_input_string 3126 EXIST::FUNCTION: | ||
2666 | OCSP_CRLID_it 3127 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2667 | OCSP_CRLID_it 3127 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2668 | i2d_KRB5_AUTHENTBODY 3128 EXIST::FUNCTION: | ||
2669 | OCSP_REQUEST_get_ext_count 3129 EXIST::FUNCTION: | ||
2670 | ENGINE_load_atalla 3130 EXIST::FUNCTION: | ||
2671 | X509_NAME_it 3131 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2672 | X509_NAME_it 3131 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2673 | USERNOTICE_it 3132 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2674 | USERNOTICE_it 3132 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2675 | OCSP_REQINFO_new 3133 EXIST::FUNCTION: | ||
2676 | OCSP_BASICRESP_get_ext 3134 EXIST::FUNCTION: | ||
2677 | CRYPTO_get_ex_data_implementation 3135 EXIST:!VMS:FUNCTION: | ||
2678 | CRYPTO_get_ex_data_impl 3135 EXIST:VMS:FUNCTION: | ||
2679 | ASN1_item_pack 3136 EXIST::FUNCTION: | ||
2680 | i2d_KRB5_ENCDATA 3137 EXIST::FUNCTION: | ||
2681 | X509_PURPOSE_set 3138 EXIST::FUNCTION: | ||
2682 | X509_REQ_INFO_it 3139 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2683 | X509_REQ_INFO_it 3139 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2684 | UI_method_set_opener 3140 EXIST::FUNCTION: | ||
2685 | ASN1_item_ex_free 3141 EXIST::FUNCTION: | ||
2686 | ASN1_BOOLEAN_it 3142 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2687 | ASN1_BOOLEAN_it 3142 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2688 | ENGINE_get_table_flags 3143 EXIST::FUNCTION: | ||
2689 | UI_create_method 3144 EXIST::FUNCTION: | ||
2690 | OCSP_ONEREQ_add1_ext_i2d 3145 EXIST::FUNCTION: | ||
2691 | _shadow_DES_check_key 3146 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:DES | ||
2692 | _shadow_DES_check_key 3146 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:DES | ||
2693 | d2i_OCSP_REQINFO 3147 EXIST::FUNCTION: | ||
2694 | UI_add_info_string 3148 EXIST::FUNCTION: | ||
2695 | UI_get_result_minsize 3149 EXIST::FUNCTION: | ||
2696 | ASN1_NULL_it 3150 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2697 | ASN1_NULL_it 3150 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2698 | BN_mod_lshift1 3151 EXIST::FUNCTION: | ||
2699 | d2i_OCSP_ONEREQ 3152 EXIST::FUNCTION: | ||
2700 | OCSP_ONEREQ_new 3153 EXIST::FUNCTION: | ||
2701 | KRB5_TICKET_it 3154 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2702 | KRB5_TICKET_it 3154 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2703 | EVP_aes_192_cbc 3155 EXIST::FUNCTION:AES | ||
2704 | KRB5_TICKET_free 3156 EXIST::FUNCTION: | ||
2705 | UI_new 3157 EXIST::FUNCTION: | ||
2706 | OCSP_response_create 3158 EXIST::FUNCTION: | ||
2707 | _ossl_old_des_xcbc_encrypt 3159 EXIST::FUNCTION:DES | ||
2708 | PKCS7_it 3160 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2709 | PKCS7_it 3160 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2710 | OCSP_REQUEST_get_ext_by_critical 3161 EXIST:!VMS:FUNCTION: | ||
2711 | OCSP_REQUEST_get_ext_by_crit 3161 EXIST:VMS:FUNCTION: | ||
2712 | ENGINE_set_flags 3162 EXIST::FUNCTION: | ||
2713 | _ossl_old_des_ecb_encrypt 3163 EXIST::FUNCTION:DES | ||
2714 | OCSP_response_get1_basic 3164 EXIST::FUNCTION: | ||
2715 | EVP_Digest 3165 EXIST::FUNCTION: | ||
2716 | OCSP_ONEREQ_delete_ext 3166 EXIST::FUNCTION: | ||
2717 | ASN1_TBOOLEAN_it 3167 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2718 | ASN1_TBOOLEAN_it 3167 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2719 | ASN1_item_new 3168 EXIST::FUNCTION: | ||
2720 | ASN1_TIME_to_generalizedtime 3169 EXIST::FUNCTION: | ||
2721 | BIGNUM_it 3170 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2722 | BIGNUM_it 3170 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2723 | AES_cbc_encrypt 3171 EXIST::FUNCTION:AES | ||
2724 | ENGINE_get_load_privkey_function 3172 EXIST:!VMS:FUNCTION: | ||
2725 | ENGINE_get_load_privkey_fn 3172 EXIST:VMS:FUNCTION: | ||
2726 | OCSP_RESPONSE_free 3173 EXIST::FUNCTION: | ||
2727 | UI_method_set_reader 3174 EXIST::FUNCTION: | ||
2728 | i2d_ASN1_T61STRING 3175 EXIST::FUNCTION: | ||
2729 | EC_POINT_set_to_infinity 3176 EXIST::FUNCTION:EC | ||
2730 | ERR_load_OCSP_strings 3177 EXIST::FUNCTION: | ||
2731 | EC_POINT_point2oct 3178 EXIST::FUNCTION:EC | ||
2732 | KRB5_APREQ_free 3179 EXIST::FUNCTION: | ||
2733 | ASN1_OBJECT_it 3180 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: | ||
2734 | ASN1_OBJECT_it 3180 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: | ||
2735 | OCSP_crlID_new 3181 EXIST:!VMS,!WIN16:FUNCTION: | ||
2736 | OCSP_crlID2_new 3181 EXIST:VMS,WIN16:FUNCTION: | ||
2737 | CONF_modules_load_file 3182 EXIST::FUNCTION: | ||
2738 | CONF_imodule_set_usr_data 3183 EXIST::FUNCTION: | ||
2739 | ENGINE_set_default_string 3184 EXIST::FUNCTION: | ||
2740 | CONF_module_get_usr_data 3185 EXIST::FUNCTION: | ||
2741 | ASN1_add_oid_module 3186 EXIST::FUNCTION: | ||
2742 | CONF_modules_finish 3187 EXIST::FUNCTION: | ||
2743 | OPENSSL_config 3188 EXIST::FUNCTION: | ||
2744 | CONF_modules_unload 3189 EXIST::FUNCTION: | ||
2745 | CONF_imodule_get_value 3190 EXIST::FUNCTION: | ||
2746 | CONF_module_set_usr_data 3191 EXIST::FUNCTION: | ||
2747 | CONF_parse_list 3192 EXIST::FUNCTION: | ||
2748 | CONF_module_add 3193 EXIST::FUNCTION: | ||
2749 | CONF_get1_default_config_file 3194 EXIST::FUNCTION: | ||
2750 | CONF_imodule_get_flags 3195 EXIST::FUNCTION: | ||
2751 | CONF_imodule_get_module 3196 EXIST::FUNCTION: | ||
2752 | CONF_modules_load 3197 EXIST::FUNCTION: | ||
2753 | CONF_imodule_get_name 3198 EXIST::FUNCTION: | ||
2754 | ERR_peek_top_error 3199 NOEXIST::FUNCTION: | ||
2755 | CONF_imodule_get_usr_data 3200 EXIST::FUNCTION: | ||
2756 | CONF_imodule_set_flags 3201 EXIST::FUNCTION: | ||
2757 | ENGINE_add_conf_module 3202 EXIST::FUNCTION: | ||
2758 | ERR_peek_last_error_line 3203 EXIST::FUNCTION: | ||
2759 | ERR_peek_last_error_line_data 3204 EXIST::FUNCTION: | ||
2760 | ERR_peek_last_error 3205 EXIST::FUNCTION: | ||
2761 | DES_read_2passwords 3206 EXIST::FUNCTION:DES | ||
2762 | DES_read_password 3207 EXIST::FUNCTION:DES | ||
2763 | UI_UTIL_read_pw 3208 EXIST::FUNCTION: | ||
2764 | UI_UTIL_read_pw_string 3209 EXIST::FUNCTION: | ||
2765 | ENGINE_load_aep 3210 EXIST::FUNCTION: | ||
2766 | ENGINE_load_sureware 3211 EXIST::FUNCTION: | ||
2767 | OPENSSL_add_all_algorithms_noconf 3212 EXIST:!VMS:FUNCTION: | ||
2768 | OPENSSL_add_all_algo_noconf 3212 EXIST:VMS:FUNCTION: | ||
2769 | OPENSSL_add_all_algorithms_conf 3213 EXIST:!VMS:FUNCTION: | ||
2770 | OPENSSL_add_all_algo_conf 3213 EXIST:VMS:FUNCTION: | ||
2771 | OPENSSL_load_builtin_modules 3214 EXIST::FUNCTION: | ||
2772 | AES_ofb128_encrypt 3215 EXIST::FUNCTION:AES | ||
2773 | AES_ctr128_encrypt 3216 EXIST::FUNCTION:AES | ||
2774 | AES_cfb128_encrypt 3217 EXIST::FUNCTION:AES | ||
2775 | ENGINE_load_4758cca 3218 EXIST::FUNCTION: | ||
2776 | _ossl_096_des_random_seed 3219 EXIST::FUNCTION:DES | ||
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl index 149a0f4f80..8b6b2e668a 100644 --- a/src/lib/libcrypto/util/mk1mf.pl +++ b/src/lib/libcrypto/util/mk1mf.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # A bit of an evil hack but it post processes the file ../MINFO which | 2 | # A bit of an evil hack but it post processes the file ../MINFO which |
3 | # is generated by `make files` in the top directory. | 3 | # is generated by `make files` in the top directory. |
4 | # This script outputs one mega makefile that has no shell stuff or any | 4 | # This script outputs one mega makefile that has no shell stuff or any |
@@ -6,88 +6,71 @@ | |||
6 | # | 6 | # |
7 | 7 | ||
8 | $INSTALLTOP="/usr/local/ssl"; | 8 | $INSTALLTOP="/usr/local/ssl"; |
9 | $OPTIONS=""; | ||
10 | $ssl_version=""; | ||
11 | $banner="\t\@echo Building OpenSSL"; | ||
12 | |||
13 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | ||
14 | while(<IN>) { | ||
15 | $ssl_version=$1 if (/^VERSION=(.*)$/); | ||
16 | $OPTIONS=$1 if (/^OPTIONS=(.*)$/); | ||
17 | $INSTALLTOP=$1 if (/^INSTALLTOP=(.*$)/); | ||
18 | } | ||
19 | close(IN); | ||
9 | 20 | ||
10 | $ssl_version="0.8.2"; | 21 | die "Makefile.ssl is not the toplevel Makefile!\n" if $ssl_version eq ""; |
11 | 22 | ||
12 | $infile="MINFO"; | 23 | $infile="MINFO"; |
13 | 24 | ||
14 | %ops=( | 25 | %ops=( |
15 | "VC-WIN32", "Microsoft Visual C++ 4.[01] - Windows NT [34].x", | 26 | "VC-WIN32", "Microsoft Visual C++ [4-6] - Windows NT or 9X", |
27 | "VC-NT", "Microsoft Visual C++ [4-6] - Windows NT ONLY", | ||
16 | "VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286", | 28 | "VC-W31-16", "Microsoft Visual C++ 1.52 - Windows 3.1 - 286", |
17 | "VC-WIN16", "Alias for VC-W31-32", | 29 | "VC-WIN16", "Alias for VC-W31-32", |
18 | "VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+", | 30 | "VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+", |
19 | "VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS", | 31 | "VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS", |
20 | "BC-NT", "Borland C++ 4.5 - Windows NT - PROBABLY NOT WORKING", | 32 | "Mingw32", "GNU C++ - Windows NT or 9x", |
33 | "Mingw32-files", "Create files with DOS copy ...", | ||
34 | "BC-NT", "Borland C++ 4.5 - Windows NT", | ||
21 | "BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING", | 35 | "BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING", |
22 | "BC-MSDOS","Borland C++ 4.5 - MSDOS", | 36 | "BC-MSDOS","Borland C++ 4.5 - MSDOS", |
23 | "linux-elf","Linux elf", | 37 | "linux-elf","Linux elf", |
38 | "ultrix-mips","DEC mips ultrix", | ||
24 | "FreeBSD","FreeBSD distribution", | 39 | "FreeBSD","FreeBSD distribution", |
40 | "OS2-EMX", "EMX GCC OS/2", | ||
25 | "default","cc under unix", | 41 | "default","cc under unix", |
26 | ); | 42 | ); |
27 | 43 | ||
28 | $type=""; | 44 | $platform=""; |
29 | foreach (@ARGV) | 45 | foreach (@ARGV) |
30 | { | 46 | { |
31 | if (/^no-rc2$/) { $no_rc2=1; } | 47 | if (!&read_options && !defined($ops{$_})) |
32 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
33 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
34 | elsif (/^no-idea$/) { $no_idea=1; } | ||
35 | elsif (/^no-des$/) { $no_des=1; } | ||
36 | elsif (/^no-bf$/) { $no_bf=1; } | ||
37 | elsif (/^no-cast$/) { $no_cast=1; } | ||
38 | elsif (/^no-md2$/) { $no_md2=1; } | ||
39 | elsif (/^no-md5$/) { $no_md5=1; } | ||
40 | elsif (/^no-sha$/) { $no_sha=1; } | ||
41 | elsif (/^no-sha1$/) { $no_sha1=1; } | ||
42 | elsif (/^no-rmd160$/) { $no_rmd160=1; } | ||
43 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
44 | elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; } | ||
45 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
46 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
47 | elsif (/^no-dh$/) { $no_dh=1; } | ||
48 | elsif (/^no-asm$/) { $no_asm=1; } | ||
49 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | ||
50 | elsif (/^no-ssl3$/) { $no_ssl3=1; } | ||
51 | elsif (/^no-err$/) { $no_err=1; } | ||
52 | elsif (/^no-sock$/) { $no_sock=1; } | ||
53 | |||
54 | elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1; | ||
55 | $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1; | ||
56 | $no_ssl2=$no_err=1; } | ||
57 | |||
58 | elsif (/^rsaref$/) { $rsaref=1; } | ||
59 | elsif (/^gcc$/) { $gcc=1; } | ||
60 | elsif (/^debug$/) { $debug=1; } | ||
61 | elsif (/^shlib$/) { $shlib=1; } | ||
62 | elsif (/^dll$/) { $shlib=1; } | ||
63 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } | ||
64 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } | ||
65 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) | ||
66 | { $c_flags.="$_ "; } | ||
67 | else | ||
68 | { | 48 | { |
69 | if (!defined($ops{$_})) | 49 | print STDERR "unknown option - $_\n"; |
70 | { | 50 | print STDERR "usage: perl mk1mf.pl [options] [system]\n"; |
71 | print STDERR "unknown option - $_\n"; | 51 | print STDERR "\nwhere [system] can be one of the following\n"; |
72 | print STDERR "usage: perl mk1mf.pl [system] [options]\n"; | 52 | foreach $i (sort keys %ops) |
73 | print STDERR "\nwhere [system] can be one of the following\n"; | 53 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } |
74 | foreach $i (sort keys %ops) | 54 | print STDERR <<"EOF"; |
75 | { printf STDERR "\t%-10s\t%s\n",$i,$ops{$i}; } | ||
76 | print STDERR <<"EOF"; | ||
77 | and [options] can be one of | 55 | and [options] can be one of |
78 | no-md2 no-md5 no-sha no-sha1 no-mdc2 no-rmd160 - Skip this digest | 56 | no-md2 no-md4 no-md5 no-sha no-mdc2 - Skip this digest |
79 | no-rc2 no-rc4 no-idea no-des no-bf no-cast - Skip this symetric cipher | 57 | no-ripemd |
80 | no-rc5 | 58 | no-rc2 no-rc4 no-rc5 no-idea no-des - Skip this symetric cipher |
59 | no-bf no-cast no-aes | ||
81 | no-rsa no-dsa no-dh - Skip this public key cipher | 60 | no-rsa no-dsa no-dh - Skip this public key cipher |
82 | no-ssl2 no-ssl3 - Skip this version of SSL | 61 | no-ssl2 no-ssl3 - Skip this version of SSL |
83 | just-ssl - remove all non-ssl keys/digest | 62 | just-ssl - remove all non-ssl keys/digest |
84 | no-asm - No x86 asm | 63 | no-asm - No x86 asm |
64 | no-krb5 - No KRB5 | ||
65 | no-ec - No EC | ||
66 | nasm - Use NASM for x86 asm | ||
67 | gaswin - Use GNU as with Mingw32 | ||
85 | no-socks - No socket code | 68 | no-socks - No socket code |
86 | no-err - No error strings | 69 | no-err - No error strings |
87 | dll/shlib - Build shared libraries (MS) | 70 | dll/shlib - Build shared libraries (MS) |
88 | debug - Debug build | 71 | debug - Debug build |
72 | profile - Profiling build | ||
89 | gcc - Use Gcc (unix) | 73 | gcc - Use Gcc (unix) |
90 | rsaref - Build to require RSAref | ||
91 | 74 | ||
92 | Values that can be set | 75 | Values that can be set |
93 | TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler | 76 | TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler |
@@ -96,27 +79,30 @@ TMP=tmpdir OUT=outdir SRC=srcdir BIN=binpath INC=header-outdir CC=C-compiler | |||
96 | -<ex_cc_flags> - extra 'cc' flags, | 79 | -<ex_cc_flags> - extra 'cc' flags, |
97 | added (MS), or replace (unix) | 80 | added (MS), or replace (unix) |
98 | EOF | 81 | EOF |
99 | exit(1); | 82 | exit(1); |
100 | } | ||
101 | $type=$_; | ||
102 | } | 83 | } |
84 | $platform=$_; | ||
85 | } | ||
86 | foreach (grep(!/^$/, split(/ /, $OPTIONS))) | ||
87 | { | ||
88 | print STDERR "unknown option - $_\n" if !&read_options; | ||
103 | } | 89 | } |
104 | 90 | ||
105 | $no_mdc2=1 if ($no_des); | 91 | $no_mdc2=1 if ($no_des); |
106 | 92 | ||
107 | $no_ssl3=1 if ($no_md5 || $no_sha1); | 93 | $no_ssl3=1 if ($no_md5 || $no_sha); |
108 | $no_ssl3=1 if ($no_rsa && $no_dh); | 94 | $no_ssl3=1 if ($no_rsa && $no_dh); |
109 | 95 | ||
110 | $no_ssl2=1 if ($no_md5 || $no_rsa); | 96 | $no_ssl2=1 if ($no_md5); |
111 | $no_ssl2=1 if ($no_rsa); | 97 | $no_ssl2=1 if ($no_rsa); |
112 | 98 | ||
113 | $out_def="out"; | 99 | $out_def="out"; |
114 | $inc_def="outinc"; | 100 | $inc_def="outinc"; |
115 | $tmp_def="tmp"; | 101 | $tmp_def="tmp"; |
116 | 102 | ||
103 | $mkdir="mkdir"; | ||
117 | 104 | ||
118 | ($ssl,$crypto)=("ssl","crypto"); | 105 | ($ssl,$crypto)=("ssl","crypto"); |
119 | $RSAglue="RSAglue"; | ||
120 | $ranlib="echo ranlib"; | 106 | $ranlib="echo ranlib"; |
121 | 107 | ||
122 | $cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc'; | 108 | $cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc'; |
@@ -125,62 +111,84 @@ $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:''; | |||
125 | 111 | ||
126 | # $bin_dir.=$o causes a core dump on my sparc :-( | 112 | # $bin_dir.=$o causes a core dump on my sparc :-( |
127 | 113 | ||
114 | $NT=0; | ||
115 | |||
128 | push(@INC,"util/pl","pl"); | 116 | push(@INC,"util/pl","pl"); |
129 | if ($type eq "VC-MSDOS") | 117 | if ($platform eq "VC-MSDOS") |
130 | { | 118 | { |
131 | $asmbits=16; | 119 | $asmbits=16; |
132 | $msdos=1; | 120 | $msdos=1; |
133 | require 'VC-16.pl'; | 121 | require 'VC-16.pl'; |
134 | } | 122 | } |
135 | elsif ($type eq "VC-W31-16") | 123 | elsif ($platform eq "VC-W31-16") |
136 | { | 124 | { |
137 | $asmbits=16; | 125 | $asmbits=16; |
138 | $msdos=1; $win16=1; | 126 | $msdos=1; $win16=1; |
139 | require 'VC-16.pl'; | 127 | require 'VC-16.pl'; |
140 | } | 128 | } |
141 | elsif (($type eq "VC-W31-32") || ($type eq "VC-WIN16")) | 129 | elsif (($platform eq "VC-W31-32") || ($platform eq "VC-WIN16")) |
142 | { | 130 | { |
143 | $asmbits=32; | 131 | $asmbits=32; |
144 | $msdos=1; $win16=1; | 132 | $msdos=1; $win16=1; |
145 | require 'VC-16.pl'; | 133 | require 'VC-16.pl'; |
146 | } | 134 | } |
147 | elsif (($type eq "VC-WIN32") || ($type eq "VC-NT")) | 135 | elsif (($platform eq "VC-WIN32") || ($platform eq "VC-NT")) |
148 | { | 136 | { |
137 | $NT = 1 if $platform eq "VC-NT"; | ||
149 | require 'VC-32.pl'; | 138 | require 'VC-32.pl'; |
150 | } | 139 | } |
151 | elsif ($type eq "BC-NT") | 140 | elsif ($platform eq "Mingw32") |
141 | { | ||
142 | require 'Mingw32.pl'; | ||
143 | } | ||
144 | elsif ($platform eq "Mingw32-files") | ||
145 | { | ||
146 | require 'Mingw32f.pl'; | ||
147 | } | ||
148 | elsif ($platform eq "BC-NT") | ||
152 | { | 149 | { |
153 | $bc=1; | 150 | $bc=1; |
154 | require 'BC-32.pl'; | 151 | require 'BC-32.pl'; |
155 | } | 152 | } |
156 | elsif ($type eq "BC-W31") | 153 | elsif ($platform eq "BC-W31") |
157 | { | 154 | { |
158 | $bc=1; | 155 | $bc=1; |
159 | $msdos=1; $w16=1; | 156 | $msdos=1; $w16=1; |
160 | require 'BC-16.pl'; | 157 | require 'BC-16.pl'; |
161 | } | 158 | } |
162 | elsif ($type eq "BC-Q16") | 159 | elsif ($platform eq "BC-Q16") |
163 | { | 160 | { |
164 | $msdos=1; $w16=1; $shlib=0; $qw=1; | 161 | $msdos=1; $w16=1; $shlib=0; $qw=1; |
165 | require 'BC-16.pl'; | 162 | require 'BC-16.pl'; |
166 | } | 163 | } |
167 | elsif ($type eq "BC-MSDOS") | 164 | elsif ($platform eq "BC-MSDOS") |
168 | { | 165 | { |
169 | $asmbits=16; | 166 | $asmbits=16; |
170 | $msdos=1; | 167 | $msdos=1; |
171 | require 'BC-16.pl'; | 168 | require 'BC-16.pl'; |
172 | } | 169 | } |
173 | elsif ($type eq "FreeBSD") | 170 | elsif ($platform eq "FreeBSD") |
174 | { | 171 | { |
175 | require 'unix.pl'; | 172 | require 'unix.pl'; |
176 | $cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer'; | 173 | $cflags='-DTERMIO -D_ANSI_SOURCE -O2 -fomit-frame-pointer'; |
177 | } | 174 | } |
178 | elsif ($type eq "linux-elf") | 175 | elsif ($platform eq "linux-elf") |
179 | { | 176 | { |
180 | require "unix.pl"; | 177 | require "unix.pl"; |
181 | require "linux.pl"; | 178 | require "linux.pl"; |
182 | $unix=1; | 179 | $unix=1; |
183 | } | 180 | } |
181 | elsif ($platform eq "ultrix-mips") | ||
182 | { | ||
183 | require "unix.pl"; | ||
184 | require "ultrix.pl"; | ||
185 | $unix=1; | ||
186 | } | ||
187 | elsif ($platform eq "OS2-EMX") | ||
188 | { | ||
189 | $wc=1; | ||
190 | require 'OS2-EMX.pl'; | ||
191 | } | ||
184 | else | 192 | else |
185 | { | 193 | { |
186 | require "unix.pl"; | 194 | require "unix.pl"; |
@@ -195,42 +203,45 @@ $inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def; | |||
195 | 203 | ||
196 | $bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq '')); | 204 | $bin_dir=$bin_dir.$o unless ((substr($bin_dir,-1,1) eq $o) || ($bin_dir eq '')); |
197 | 205 | ||
198 | $cflags.=" -DNO_IDEA" if $no_idea; | 206 | $cflags.=" -DOPENSSL_NO_IDEA" if $no_idea; |
199 | $cflags.=" -DNO_RC2" if $no_rc2; | 207 | $cflags.=" -DOPENSSL_NO_AES" if $no_aes; |
200 | $cflags.=" -DNO_RC4" if $no_rc4; | 208 | $cflags.=" -DOPENSSL_NO_RC2" if $no_rc2; |
201 | $cflags.=" -DNO_RC5" if $no_rc5; | 209 | $cflags.=" -DOPENSSL_NO_RC4" if $no_rc4; |
202 | $cflags.=" -DNO_MD2" if $no_md2; | 210 | $cflags.=" -DOPENSSL_NO_RC5" if $no_rc5; |
203 | $cflags.=" -DNO_MD5" if $no_md5; | 211 | $cflags.=" -DOPENSSL_NO_MD2" if $no_md2; |
204 | $cflags.=" -DNO_SHA" if $no_sha; | 212 | $cflags.=" -DOPENSSL_NO_MD4" if $no_md4; |
205 | $cflags.=" -DNO_SHA1" if $no_sha1; | 213 | $cflags.=" -DOPENSSL_NO_MD5" if $no_md5; |
206 | $cflags.=" -DNO_RMD160" if $no_rmd160; | 214 | $cflags.=" -DOPENSSL_NO_SHA" if $no_sha; |
207 | $cflags.=" -DNO_MDC2" if $no_mdc2; | 215 | $cflags.=" -DOPENSSL_NO_SHA1" if $no_sha1; |
208 | $cflags.=" -DNO_BLOWFISH" if $no_bf; | 216 | $cflags.=" -DOPENSSL_NO_RIPEMD" if $no_rmd160; |
209 | $cflags.=" -DNO_CAST" if $no_cast; | 217 | $cflags.=" -DOPENSSL_NO_MDC2" if $no_mdc2; |
210 | $cflags.=" -DNO_DES" if $no_des; | 218 | $cflags.=" -DOPENSSL_NO_BF" if $no_bf; |
211 | $cflags.=" -DNO_RSA" if $no_rsa; | 219 | $cflags.=" -DOPENSSL_NO_CAST" if $no_cast; |
212 | $cflags.=" -DNO_DSA" if $no_dsa; | 220 | $cflags.=" -DOPENSSL_NO_DES" if $no_des; |
213 | $cflags.=" -DNO_DH" if $no_dh; | 221 | $cflags.=" -DOPENSSL_NO_RSA" if $no_rsa; |
214 | $cflags.=" -DNO_SOCK" if $no_sock; | 222 | $cflags.=" -DOPENSSL_NO_DSA" if $no_dsa; |
215 | $cflags.=" -DNO_SSL2" if $no_ssl2; | 223 | $cflags.=" -DOPENSSL_NO_DH" if $no_dh; |
216 | $cflags.=" -DNO_SSL3" if $no_ssl3; | 224 | $cflags.=" -DOPENSSL_NO_SOCK" if $no_sock; |
217 | $cflags.=" -DNO_ERR" if $no_err; | 225 | $cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2; |
218 | $cflags.=" -DRSAref" if $rsaref ne ""; | 226 | $cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3; |
219 | 227 | $cflags.=" -DOPENSSL_NO_ERR" if $no_err; | |
220 | if ($unix) | 228 | $cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; |
221 | { $cflags="$c_flags" if ($c_flags ne ""); } | 229 | $cflags.=" -DOPENSSL_NO_EC" if $no_ec; |
222 | else { $cflags="$c_flags$cflags" if ($c_flags ne ""); } | 230 | #$cflags.=" -DRSAref" if $rsaref ne ""; |
231 | |||
232 | ## if ($unix) | ||
233 | ## { $cflags="$c_flags" if ($c_flags ne ""); } | ||
234 | ##else | ||
235 | { $cflags="$c_flags$cflags" if ($c_flags ne ""); } | ||
223 | 236 | ||
224 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); | 237 | $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); |
225 | 238 | ||
226 | if ($ranlib ne "") | 239 | %shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL", |
227 | { | 240 | "CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO"); |
228 | $ranlib="\$(SRC_D)$o$ranlib"; | ||
229 | } | ||
230 | 241 | ||
231 | if ($msdos) | 242 | if ($msdos) |
232 | { | 243 | { |
233 | $banner ="\t\@echo Make sure you have run 'perl Configure $type' in the\n"; | 244 | $banner ="\t\@echo Make sure you have run 'perl Configure $platform' in the\n"; |
234 | $banner.="\t\@echo top level directory, if you don't have perl, you will\n"; | 245 | $banner.="\t\@echo top level directory, if you don't have perl, you will\n"; |
235 | $banner.="\t\@echo need to probably edit crypto/bn/bn.h, check the\n"; | 246 | $banner.="\t\@echo need to probably edit crypto/bn/bn.h, check the\n"; |
236 | $banner.="\t\@echo documentation for details.\n"; | 247 | $banner.="\t\@echo documentation for details.\n"; |
@@ -242,8 +253,8 @@ $link="$bin_dir$link" if ($link !~ /^\$/); | |||
242 | $INSTALLTOP =~ s|/|$o|g; | 253 | $INSTALLTOP =~ s|/|$o|g; |
243 | 254 | ||
244 | $defs= <<"EOF"; | 255 | $defs= <<"EOF"; |
245 | # This makefile has been automatically generated from the SSLeay distribution. | 256 | # This makefile has been automatically generated from the OpenSSL distribution. |
246 | # This single makefile will build the complete SSLeay distribution and | 257 | # This single makefile will build the complete OpenSSL distribution and |
247 | # by default leave the 'intertesting' output files in .${o}out and the stuff | 258 | # by default leave the 'intertesting' output files in .${o}out and the stuff |
248 | # that needs deleting in .${o}tmp. | 259 | # that needs deleting in .${o}tmp. |
249 | # The file was generated by running 'make makefile.one', which | 260 | # The file was generated by running 'make makefile.one', which |
@@ -258,6 +269,7 @@ $defs= <<"EOF"; | |||
258 | INSTALLTOP=$INSTALLTOP | 269 | INSTALLTOP=$INSTALLTOP |
259 | 270 | ||
260 | # Set your compiler options | 271 | # Set your compiler options |
272 | PLATFORM=$platform | ||
261 | CC=$bin_dir${cc} | 273 | CC=$bin_dir${cc} |
262 | CFLAG=$cflags | 274 | CFLAG=$cflags |
263 | APP_CFLAG=$app_cflag | 275 | APP_CFLAG=$app_cflag |
@@ -269,18 +281,18 @@ SHLIB_EX_OBJ=$shlib_ex_obj | |||
269 | # be added | 281 | # be added |
270 | EX_LIBS=$ex_libs | 282 | EX_LIBS=$ex_libs |
271 | 283 | ||
272 | # The SSLeay directory | 284 | # The OpenSSL directory |
273 | SRC_D=$src_dir | 285 | SRC_D=$src_dir |
274 | 286 | ||
275 | LINK=$link | 287 | LINK=$link |
276 | LFLAGS=$lflags | 288 | LFLAGS=$lflags |
277 | 289 | ||
278 | BN_MULW_OBJ=$bn_mulw_obj | 290 | BN_ASM_OBJ=$bn_asm_obj |
279 | BN_MULW_SRC=$bn_mulw_src | 291 | BN_ASM_SRC=$bn_asm_src |
292 | BNCO_ASM_OBJ=$bnco_asm_obj | ||
293 | BNCO_ASM_SRC=$bnco_asm_src | ||
280 | DES_ENC_OBJ=$des_enc_obj | 294 | DES_ENC_OBJ=$des_enc_obj |
281 | DES_ENC_SRC=$des_enc_src | 295 | DES_ENC_SRC=$des_enc_src |
282 | DES_CRYPT_OBJ=$des_crypt_obj | ||
283 | DES_CRYPT_SRC=$des_crypt_src | ||
284 | BF_ENC_OBJ=$bf_enc_obj | 296 | BF_ENC_OBJ=$bf_enc_obj |
285 | BF_ENC_SRC=$bf_enc_src | 297 | BF_ENC_SRC=$bf_enc_src |
286 | CAST_ENC_OBJ=$cast_enc_obj | 298 | CAST_ENC_OBJ=$cast_enc_obj |
@@ -302,11 +314,12 @@ OUT_D=$out_dir | |||
302 | TMP_D=$tmp_dir | 314 | TMP_D=$tmp_dir |
303 | # The output directory for the header files | 315 | # The output directory for the header files |
304 | INC_D=$inc_dir | 316 | INC_D=$inc_dir |
317 | INCO_D=$inc_dir${o}openssl | ||
305 | 318 | ||
306 | CP=$cp | 319 | CP=$cp |
307 | RM=$rm | 320 | RM=$rm |
308 | RANLIB=$ranlib | 321 | RANLIB=$ranlib |
309 | MKDIR=mkdir | 322 | MKDIR=$mkdir |
310 | MKLIB=$bin_dir$mklib | 323 | MKLIB=$bin_dir$mklib |
311 | MLFLAGS=$mlflags | 324 | MLFLAGS=$mlflags |
312 | ASM=$bin_dir$asm | 325 | ASM=$bin_dir$asm |
@@ -315,14 +328,16 @@ ASM=$bin_dir$asm | |||
315 | # You should not need to touch anything below this point | 328 | # You should not need to touch anything below this point |
316 | ###################################################### | 329 | ###################################################### |
317 | 330 | ||
318 | E_EXE=ssleay | 331 | E_EXE=openssl |
319 | SSL=$ssl | 332 | SSL=$ssl |
320 | CRYPTO=$crypto | 333 | CRYPTO=$crypto |
321 | RSAGLUE=$RSAglue | ||
322 | 334 | ||
323 | # BIN_D - Binary output directory | 335 | # BIN_D - Binary output directory |
324 | # TEST_D - Binary test file output directory | 336 | # TEST_D - Binary test file output directory |
325 | # LIB_D - library output directory | 337 | # LIB_D - library output directory |
338 | # Note: if you change these point to different directories then uncomment out | ||
339 | # the lines around the 'NB' comment below. | ||
340 | # | ||
326 | BIN_D=\$(OUT_D) | 341 | BIN_D=\$(OUT_D) |
327 | TEST_D=\$(OUT_D) | 342 | TEST_D=\$(OUT_D) |
328 | LIB_D=\$(OUT_D) | 343 | LIB_D=\$(OUT_D) |
@@ -334,14 +349,12 @@ INCL_D=\$(TMP_D) | |||
334 | 349 | ||
335 | O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp | 350 | O_SSL= \$(LIB_D)$o$plib\$(SSL)$shlibp |
336 | O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp | 351 | O_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$shlibp |
337 | O_RSAGLUE= \$(LIB_D)$o$plib\$(RSAGLUE)$libp | ||
338 | SO_SSL= $plib\$(SSL)$so_shlibp | 352 | SO_SSL= $plib\$(SSL)$so_shlibp |
339 | SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp | 353 | SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp |
340 | L_SSL= \$(LIB_D)$o\$(SSL)$libp | 354 | L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp |
341 | L_CRYPTO= \$(LIB_D)$o\$(CRYPTO)$libp | 355 | L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp |
342 | 356 | ||
343 | L_LIBS= \$(L_SSL) \$(L_CRYPTO) | 357 | L_LIBS= \$(L_SSL) \$(L_CRYPTO) |
344 | #L_LIBS= \$(O_SSL) \$(O_RSAGLUE) -lrsaref \$(O_CRYPTO) | ||
345 | 358 | ||
346 | ###################################################### | 359 | ###################################################### |
347 | # Don't touch anything below this point | 360 | # Don't touch anything below this point |
@@ -351,33 +364,37 @@ INC=-I\$(INC_D) -I\$(INCL_D) | |||
351 | APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG) | 364 | APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG) |
352 | LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) | 365 | LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) |
353 | SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG) | 366 | SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG) |
354 | LIBS_DEP=\$(O_CRYPTO) \$(O_RSAGLUE) \$(O_SSL) | 367 | LIBS_DEP=\$(O_CRYPTO) \$(O_SSL) |
355 | 368 | ||
356 | ############################################# | 369 | ############################################# |
357 | EOF | 370 | EOF |
358 | 371 | ||
359 | $rules=<<"EOF"; | 372 | $rules=<<"EOF"; |
360 | all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INC_D) headers lib exe | 373 | all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe |
361 | 374 | ||
362 | banner: | 375 | banner: |
363 | $banner | 376 | $banner |
364 | 377 | ||
365 | \$(TMP_D): | 378 | \$(TMP_D): |
366 | \$(MKDIR) \$(TMP_D) | 379 | \$(MKDIR) \$(TMP_D) |
367 | 380 | # NB: uncomment out these lines if BIN_D, TEST_D and LIB_D are different | |
368 | \$(BIN_D): | 381 | #\$(BIN_D): |
369 | \$(MKDIR) \$(BIN_D) | 382 | # \$(MKDIR) \$(BIN_D) |
370 | 383 | # | |
371 | \$(TEST_D): | 384 | #\$(TEST_D): |
372 | \$(MKDIR) \$(TEST_D) | 385 | # \$(MKDIR) \$(TEST_D) |
373 | 386 | ||
374 | \$(LIB_D): | 387 | \$(LIB_D): |
375 | \$(MKDIR) \$(LIB_D) | 388 | \$(MKDIR) \$(LIB_D) |
376 | 389 | ||
390 | \$(INCO_D): \$(INC_D) | ||
391 | \$(MKDIR) \$(INCO_D) | ||
392 | |||
377 | \$(INC_D): | 393 | \$(INC_D): |
378 | \$(MKDIR) \$(INC_D) | 394 | \$(MKDIR) \$(INC_D) |
379 | 395 | ||
380 | headers: \$(HEADER) \$(EXHEADER) | 396 | headers: \$(HEADER) \$(EXHEADER) |
397 | @ | ||
381 | 398 | ||
382 | lib: \$(LIBS_DEP) | 399 | lib: \$(LIBS_DEP) |
383 | 400 | ||
@@ -387,8 +404,9 @@ install: | |||
387 | \$(MKDIR) \$(INSTALLTOP) | 404 | \$(MKDIR) \$(INSTALLTOP) |
388 | \$(MKDIR) \$(INSTALLTOP)${o}bin | 405 | \$(MKDIR) \$(INSTALLTOP)${o}bin |
389 | \$(MKDIR) \$(INSTALLTOP)${o}include | 406 | \$(MKDIR) \$(INSTALLTOP)${o}include |
407 | \$(MKDIR) \$(INSTALLTOP)${o}include${o}openssl | ||
390 | \$(MKDIR) \$(INSTALLTOP)${o}lib | 408 | \$(MKDIR) \$(INSTALLTOP)${o}lib |
391 | \$(CP) \$(INC_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include | 409 | \$(CP) \$(INCO_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include${o}openssl |
392 | \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin | 410 | \$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin |
393 | \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib | 411 | \$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib |
394 | \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib | 412 | \$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib |
@@ -401,6 +419,42 @@ vclean: | |||
401 | \$(RM) \$(OUT_D)$o*.* | 419 | \$(RM) \$(OUT_D)$o*.* |
402 | 420 | ||
403 | EOF | 421 | EOF |
422 | |||
423 | my $platform_cpp_symbol = "MK1MF_PLATFORM_$platform"; | ||
424 | $platform_cpp_symbol =~ s/-/_/g; | ||
425 | if (open(IN,"crypto/buildinf.h")) | ||
426 | { | ||
427 | # Remove entry for this platform in existing file buildinf.h. | ||
428 | |||
429 | my $old_buildinf_h = ""; | ||
430 | while (<IN>) | ||
431 | { | ||
432 | if (/^\#ifdef $platform_cpp_symbol$/) | ||
433 | { | ||
434 | while (<IN>) { last if (/^\#endif/); } | ||
435 | } | ||
436 | else | ||
437 | { | ||
438 | $old_buildinf_h .= $_; | ||
439 | } | ||
440 | } | ||
441 | close(IN); | ||
442 | |||
443 | open(OUT,">crypto/buildinf.h") || die "Can't open buildinf.h"; | ||
444 | print OUT $old_buildinf_h; | ||
445 | close(OUT); | ||
446 | } | ||
447 | |||
448 | open (OUT,">>crypto/buildinf.h") || die "Can't open buildinf.h"; | ||
449 | printf OUT <<EOF; | ||
450 | #ifdef $platform_cpp_symbol | ||
451 | /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */ | ||
452 | #define CFLAGS "$cc $cflags" | ||
453 | #define PLATFORM "$platform" | ||
454 | EOF | ||
455 | printf OUT " #define DATE \"%s\"\n", scalar gmtime(); | ||
456 | printf OUT "#endif\n"; | ||
457 | close(OUT); | ||
404 | 458 | ||
405 | ############################################# | 459 | ############################################# |
406 | # We parse in input file and 'store' info for later printing. | 460 | # We parse in input file and 'store' info for later printing. |
@@ -468,8 +522,8 @@ chop($h); $header=$h; | |||
468 | $defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h"); | 522 | $defs.=&do_defs("HEADER",$header,"\$(INCL_D)",".h"); |
469 | $rules.=&do_copy_rule("\$(INCL_D)",$header,".h"); | 523 | $rules.=&do_copy_rule("\$(INCL_D)",$header,".h"); |
470 | 524 | ||
471 | $defs.=&do_defs("EXHEADER",$exheader,"\$(INC_D)",".h"); | 525 | $defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)",".h"); |
472 | $rules.=&do_copy_rule("\$(INC_D)",$exheader,".h"); | 526 | $rules.=&do_copy_rule("\$(INCO_D)",$exheader,".h"); |
473 | 527 | ||
474 | $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj); | 528 | $defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj); |
475 | $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)"); | 529 | $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)"); |
@@ -482,24 +536,21 @@ foreach (values %lib_nam) | |||
482 | $lib_obj=$lib_obj{$_}; | 536 | $lib_obj=$lib_obj{$_}; |
483 | local($slib)=$shlib; | 537 | local($slib)=$shlib; |
484 | 538 | ||
485 | $slib=0 if ($_ eq "RSAGLUE"); | ||
486 | |||
487 | if (($_ eq "SSL") && $no_ssl2 && $no_ssl3) | 539 | if (($_ eq "SSL") && $no_ssl2 && $no_ssl3) |
488 | { | 540 | { |
489 | $rules.="\$(O_SSL):\n\n"; | 541 | $rules.="\$(O_SSL):\n\n"; |
490 | next; | 542 | next; |
491 | } | 543 | } |
492 | 544 | ||
493 | if (($_ eq "RSAGLUE") && $no_rsa) | 545 | if (($bn_asm_obj ne "") && ($_ eq "CRYPTO")) |
494 | { | 546 | { |
495 | $rules.="\$(O_RSAGLUE):\n\n"; | 547 | $lib_obj =~ s/\s\S*\/bn_asm\S*/ \$(BN_ASM_OBJ)/; |
496 | next; | 548 | $rules.=&do_asm_rule($bn_asm_obj,$bn_asm_src); |
497 | } | 549 | } |
498 | 550 | if (($bnco_asm_obj ne "") && ($_ eq "CRYPTO")) | |
499 | if (($bn_mulw_obj ne "") && ($_ eq "CRYPTO")) | ||
500 | { | 551 | { |
501 | $lib_obj =~ s/\s\S*\/bn_mulw\S*/ \$(BN_MULW_OBJ)/; | 552 | $lib_obj .= "\$(BNCO_ASM_OBJ)"; |
502 | $rules.=&do_asm_rule($bn_mulw_obj,$bn_mulw_src); | 553 | $rules.=&do_asm_rule($bnco_asm_obj,$bnco_asm_src); |
503 | } | 554 | } |
504 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) | 555 | if (($des_enc_obj ne "") && ($_ eq "CRYPTO")) |
505 | { | 556 | { |
@@ -543,7 +594,7 @@ foreach (values %lib_nam) | |||
543 | $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src); | 594 | $rules.=&do_asm_rule($rmd160_asm_obj,$rmd160_asm_src); |
544 | } | 595 | } |
545 | $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj); | 596 | $defs.=&do_defs(${_}."OBJ",$lib_obj,"\$(OBJ_D)",$obj); |
546 | $lib=($slib)?" \$(SHLIB_CFLAGS)":" \$(LIB_CFLAGS)"; | 597 | $lib=($slib)?" \$(SHLIB_CFLAGS)".$shlib_ex_cflags{$_}:" \$(LIB_CFLAGS)"; |
547 | $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); | 598 | $rules.=&do_compile_rule("\$(OBJ_D)",$lib_obj{$_},$lib); |
548 | } | 599 | } |
549 | 600 | ||
@@ -556,13 +607,19 @@ foreach (split(/\s+/,$test)) | |||
556 | } | 607 | } |
557 | 608 | ||
558 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); | 609 | $rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); |
559 | $rules.= &do_lib_rule("\$(RSAGLUEOBJ)","\$(O_RSAGLUE)",$RSAglue,0,"") | ||
560 | unless $no_rsa; | ||
561 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); | 610 | $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); |
562 | 611 | ||
563 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); | 612 | $rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); |
564 | 613 | ||
565 | print $defs; | 614 | print $defs; |
615 | |||
616 | if ($platform eq "linux-elf") { | ||
617 | print <<"EOF"; | ||
618 | # Generate perlasm output files | ||
619 | %.cpp: | ||
620 | (cd \$(\@D)/..; PERL=perl make -f Makefile.ssl asm/\$(\@F)) | ||
621 | EOF | ||
622 | } | ||
566 | print "###################################################################\n"; | 623 | print "###################################################################\n"; |
567 | print $rules; | 624 | print $rules; |
568 | 625 | ||
@@ -576,6 +633,7 @@ sub var_add | |||
576 | local(@a,$_,$ret); | 633 | local(@a,$_,$ret); |
577 | 634 | ||
578 | return("") if $no_idea && $dir =~ /\/idea/; | 635 | return("") if $no_idea && $dir =~ /\/idea/; |
636 | return("") if $no_aes && $dir =~ /\/aes/; | ||
579 | return("") if $no_rc2 && $dir =~ /\/rc2/; | 637 | return("") if $no_rc2 && $dir =~ /\/rc2/; |
580 | return("") if $no_rc4 && $dir =~ /\/rc4/; | 638 | return("") if $no_rc4 && $dir =~ /\/rc4/; |
581 | return("") if $no_rc5 && $dir =~ /\/rc5/; | 639 | return("") if $no_rc5 && $dir =~ /\/rc5/; |
@@ -601,7 +659,8 @@ sub var_add | |||
601 | 659 | ||
602 | @a=grep(!/^e_.*_3d$/,@a) if $no_des; | 660 | @a=grep(!/^e_.*_3d$/,@a) if $no_des; |
603 | @a=grep(!/^e_.*_d$/,@a) if $no_des; | 661 | @a=grep(!/^e_.*_d$/,@a) if $no_des; |
604 | @a=grep(!/^e_.*_i$/,@a) if $no_idea; | 662 | @a=grep(!/^e_.*_ae$/,@a) if $no_idea; |
663 | @a=grep(!/^e_.*_i$/,@a) if $no_aes; | ||
605 | @a=grep(!/^e_.*_r2$/,@a) if $no_rc2; | 664 | @a=grep(!/^e_.*_r2$/,@a) if $no_rc2; |
606 | @a=grep(!/^e_.*_r5$/,@a) if $no_rc5; | 665 | @a=grep(!/^e_.*_r5$/,@a) if $no_rc5; |
607 | @a=grep(!/^e_.*_bf$/,@a) if $no_bf; | 666 | @a=grep(!/^e_.*_bf$/,@a) if $no_bf; |
@@ -614,7 +673,9 @@ sub var_add | |||
614 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; | 673 | @a=grep(!/(_sock$)|(_acpt$)|(_conn$)|(^pxy_)/,@a) if $no_sock; |
615 | 674 | ||
616 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; | 675 | @a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2; |
676 | @a=grep(!/(^md4)|(_md4$)/,@a) if $no_md4; | ||
617 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; | 677 | @a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5; |
678 | @a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160; | ||
618 | 679 | ||
619 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; | 680 | @a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa; |
620 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; | 681 | @a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa; |
@@ -631,7 +692,7 @@ sub var_add | |||
631 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; | 692 | @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; |
632 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; | 693 | @a=grep(!/_mdc2$/,@a) if $no_mdc2; |
633 | 694 | ||
634 | @a=grep(!/(^rsa$)|(^genrsa$)|(^req$)|(^ca$)/,@a) if $no_rsa; | 695 | @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa; |
635 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; | 696 | @a=grep(!/(^dsa$)|(^gendsa$)|(^dsaparam$)/,@a) if $no_dsa; |
636 | @a=grep(!/^gendsa$/,@a) if $no_sha1; | 697 | @a=grep(!/^gendsa$/,@a) if $no_sha1; |
637 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; | 698 | @a=grep(!/(^dh$)|(^gendh$)/,@a) if $no_dh; |
@@ -677,7 +738,8 @@ sub do_defs | |||
677 | if (($_ =~ /bss_file/) && ($postfix eq ".h")) | 738 | if (($_ =~ /bss_file/) && ($postfix eq ".h")) |
678 | { $pf=".c"; } | 739 | { $pf=".c"; } |
679 | else { $pf=$postfix; } | 740 | else { $pf=$postfix; } |
680 | if ($_ =~ /BN_MULW/) { $t="$_ "; } | 741 | if ($_ =~ /BN_ASM/) { $t="$_ "; } |
742 | elsif ($_ =~ /BNCO_ASM/){ $t="$_ "; } | ||
681 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } | 743 | elsif ($_ =~ /DES_ENC/) { $t="$_ "; } |
682 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } | 744 | elsif ($_ =~ /BF_ENC/) { $t="$_ "; } |
683 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } | 745 | elsif ($_ =~ /CAST_ENC/){ $t="$_ "; } |
@@ -704,23 +766,6 @@ sub bname | |||
704 | return($ret); | 766 | return($ret); |
705 | } | 767 | } |
706 | 768 | ||
707 | # do a rule for each file that says 'copy' to new direcory on change | ||
708 | sub do_copy_rule | ||
709 | { | ||
710 | local($to,$files,$p)=@_; | ||
711 | local($ret,$_,$n,$pp); | ||
712 | |||
713 | $files =~ s/\//$o/g if $o ne '/'; | ||
714 | foreach (split(/\s+/,$files)) | ||
715 | { | ||
716 | $n=&bname($_); | ||
717 | if ($n =~ /bss_file/) | ||
718 | { $pp=".c"; } | ||
719 | else { $pp=$p; } | ||
720 | $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n"; | ||
721 | } | ||
722 | return($ret); | ||
723 | } | ||
724 | 769 | ||
725 | ############################################################## | 770 | ############################################################## |
726 | # do a rule for each file that says 'compile' to new direcory | 771 | # do a rule for each file that says 'compile' to new direcory |
@@ -746,8 +791,7 @@ sub cc_compile_target | |||
746 | local($target,$source,$ex_flags)=@_; | 791 | local($target,$source,$ex_flags)=@_; |
747 | local($ret); | 792 | local($ret); |
748 | 793 | ||
749 | # EAY EAY | 794 | $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/); |
750 | $ex_flags.=' -DCFLAGS="\"$(CC) $(CFLAG)\""' if ($source =~ /cversion/); | ||
751 | $target =~ s/\//$o/g if $o ne "/"; | 795 | $target =~ s/\//$o/g if $o ne "/"; |
752 | $source =~ s/\//$o/g if $o ne "/"; | 796 | $source =~ s/\//$o/g if $o ne "/"; |
753 | $ret ="$target: \$(SRC_D)$o$source\n\t"; | 797 | $ret ="$target: \$(SRC_D)$o$source\n\t"; |
@@ -791,3 +835,73 @@ sub do_shlib_rule | |||
791 | return($ret); | 835 | return($ret); |
792 | } | 836 | } |
793 | 837 | ||
838 | # do a rule for each file that says 'copy' to new direcory on change | ||
839 | sub do_copy_rule | ||
840 | { | ||
841 | local($to,$files,$p)=@_; | ||
842 | local($ret,$_,$n,$pp); | ||
843 | |||
844 | $files =~ s/\//$o/g if $o ne '/'; | ||
845 | foreach (split(/\s+/,$files)) | ||
846 | { | ||
847 | $n=&bname($_); | ||
848 | if ($n =~ /bss_file/) | ||
849 | { $pp=".c"; } | ||
850 | else { $pp=$p; } | ||
851 | $ret.="$to${o}$n$pp: \$(SRC_D)$o$_$pp\n\t\$(CP) \$(SRC_D)$o$_$pp $to${o}$n$pp\n\n"; | ||
852 | } | ||
853 | return($ret); | ||
854 | } | ||
855 | |||
856 | sub read_options | ||
857 | { | ||
858 | if (/^no-rc2$/) { $no_rc2=1; } | ||
859 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
860 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
861 | elsif (/^no-idea$/) { $no_idea=1; } | ||
862 | elsif (/^no-aes$/) { $no_aes=1; } | ||
863 | elsif (/^no-des$/) { $no_des=1; } | ||
864 | elsif (/^no-bf$/) { $no_bf=1; } | ||
865 | elsif (/^no-cast$/) { $no_cast=1; } | ||
866 | elsif (/^no-md2$/) { $no_md2=1; } | ||
867 | elsif (/^no-md4$/) { $no_md4=1; } | ||
868 | elsif (/^no-md5$/) { $no_md5=1; } | ||
869 | elsif (/^no-sha$/) { $no_sha=1; } | ||
870 | elsif (/^no-sha1$/) { $no_sha1=1; } | ||
871 | elsif (/^no-ripemd$/) { $no_ripemd=1; } | ||
872 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
873 | elsif (/^no-patents$/) { $no_rc2=$no_rc4=$no_rc5=$no_idea=$no_rsa=1; } | ||
874 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
875 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
876 | elsif (/^no-dh$/) { $no_dh=1; } | ||
877 | elsif (/^no-hmac$/) { $no_hmac=1; } | ||
878 | elsif (/^no-aes$/) { $no_aes=1; } | ||
879 | elsif (/^no-asm$/) { $no_asm=1; } | ||
880 | elsif (/^nasm$/) { $nasm=1; } | ||
881 | elsif (/^gaswin$/) { $gaswin=1; } | ||
882 | elsif (/^no-ssl2$/) { $no_ssl2=1; } | ||
883 | elsif (/^no-ssl3$/) { $no_ssl3=1; } | ||
884 | elsif (/^no-err$/) { $no_err=1; } | ||
885 | elsif (/^no-sock$/) { $no_sock=1; } | ||
886 | elsif (/^no-krb5$/) { $no_krb5=1; } | ||
887 | elsif (/^no-ec$/) { $no_ec=1; } | ||
888 | |||
889 | elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1; | ||
890 | $no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1; | ||
891 | $no_ssl2=$no_err=$no_rmd160=$no_rc5=1; | ||
892 | $no_aes=1; } | ||
893 | |||
894 | elsif (/^rsaref$/) { } | ||
895 | elsif (/^gcc$/) { $gcc=1; } | ||
896 | elsif (/^debug$/) { $debug=1; } | ||
897 | elsif (/^profile$/) { $profile=1; } | ||
898 | elsif (/^shlib$/) { $shlib=1; } | ||
899 | elsif (/^dll$/) { $shlib=1; } | ||
900 | elsif (/^shared$/) { } # We just need to ignore it for now... | ||
901 | elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; } | ||
902 | elsif (/^-[lL].*$/) { $l_flags.="$_ "; } | ||
903 | elsif ((!/^-help/) && (!/^-h/) && (!/^-\?/) && /^-.*$/) | ||
904 | { $c_flags.="$_ "; } | ||
905 | else { return(0); } | ||
906 | return(1); | ||
907 | } | ||
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 8124f11292..071036a6d2 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
@@ -1,244 +1,1115 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl -w |
2 | # | 2 | # |
3 | # generate a .def file | 3 | # generate a .def file |
4 | # | 4 | # |
5 | # It does this by parsing the header files and looking for the | 5 | # It does this by parsing the header files and looking for the |
6 | # non-prototyped functions. | 6 | # prototyped functions: it then prunes the output. |
7 | # | 7 | # |
8 | # Intermediary files are created, call libeay.num and ssleay.num,... | ||
9 | # Previously, they had the following format: | ||
10 | # | ||
11 | # routine-name nnnn | ||
12 | # | ||
13 | # But that isn't enough for a number of reasons, the first on being that | ||
14 | # this format is (needlessly) very Win32-centric, and even then... | ||
15 | # One of the biggest problems is that there's no information about what | ||
16 | # routines should actually be used, which varies with what crypto algorithms | ||
17 | # are disabled. Also, some operating systems (for example VMS with VAX C) | ||
18 | # need to keep track of the global variables as well as the functions. | ||
19 | # | ||
20 | # So, a remake of this script is done so as to include information on the | ||
21 | # kind of symbol it is (function or variable) and what algorithms they're | ||
22 | # part of. This will allow easy translating to .def files or the corresponding | ||
23 | # file in other operating systems (a .opt file for VMS, possibly with a .mar | ||
24 | # file). | ||
25 | # | ||
26 | # The format now becomes: | ||
27 | # | ||
28 | # routine-name nnnn info | ||
29 | # | ||
30 | # and the "info" part is actually a colon-separated string of fields with | ||
31 | # the following meaning: | ||
32 | # | ||
33 | # existence:platform:kind:algorithms | ||
34 | # | ||
35 | # - "existence" can be "EXIST" or "NOEXIST" depending on if the symbol is | ||
36 | # found somewhere in the source, | ||
37 | # - "platforms" is empty if it exists on all platforms, otherwise it contains | ||
38 | # comma-separated list of the platform, just as they are if the symbol exists | ||
39 | # for those platforms, or prepended with a "!" if not. This helps resolve | ||
40 | # symbol name variants for platforms where the names are too long for the | ||
41 | # compiler or linker, or if the systems is case insensitive and there is a | ||
42 | # clash, or the symbol is implemented differently (see | ||
43 | # EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found | ||
44 | # in the file crypto/symhacks.h. | ||
45 | # The semantics for the platforms is that every item is checked against the | ||
46 | # enviroment. For the negative items ("!FOO"), if any of them is false | ||
47 | # (i.e. "FOO" is true) in the enviroment, the corresponding symbol can't be | ||
48 | # used. For the positive itms, if all of them are false in the environment, | ||
49 | # the corresponding symbol can't be used. Any combination of positive and | ||
50 | # negative items are possible, and of course leave room for some redundancy. | ||
51 | # - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious. | ||
52 | # - "algorithms" is a comma-separated list of algorithm names. This helps | ||
53 | # exclude symbols that are part of an algorithm that some user wants to | ||
54 | # exclude. | ||
55 | # | ||
56 | |||
57 | my $debug=0; | ||
58 | |||
59 | my $crypto_num= "util/libeay.num"; | ||
60 | my $ssl_num= "util/ssleay.num"; | ||
61 | |||
62 | my $do_update = 0; | ||
63 | my $do_rewrite = 1; | ||
64 | my $do_crypto = 0; | ||
65 | my $do_ssl = 0; | ||
66 | my $do_ctest = 0; | ||
67 | my $do_ctestall = 0; | ||
68 | my $do_checkexist = 0; | ||
8 | 69 | ||
9 | $crypto_num="util/libeay.num"; | 70 | my $VMSVAX=0; |
10 | $ssl_num= "util/ssleay.num"; | 71 | my $VMSAlpha=0; |
72 | my $VMS=0; | ||
73 | my $W32=0; | ||
74 | my $W16=0; | ||
75 | my $NT=0; | ||
76 | # Set this to make typesafe STACK definitions appear in DEF | ||
77 | my $safe_stack_def = 0; | ||
11 | 78 | ||
12 | $NT=1; | 79 | my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", |
13 | foreach (@ARGV) | 80 | "EXPORT_VAR_AS_FUNCTION" ); |
81 | my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT" ); | ||
82 | my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | ||
83 | "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", | ||
84 | "RIPEMD", | ||
85 | "MDC2", "RSA", "DSA", "DH", "EC", "HMAC", "AES", | ||
86 | # Envelope "algorithms" | ||
87 | "EVP", "X509", "ASN1_TYPEDEFS", | ||
88 | # Helper "algorithms" | ||
89 | "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", | ||
90 | "LOCKING", | ||
91 | # External "algorithms" | ||
92 | "FP_API", "STDIO", "SOCK", "KRB5" ); | ||
93 | |||
94 | my $options=""; | ||
95 | open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; | ||
96 | while(<IN>) { | ||
97 | $options=$1 if (/^OPTIONS=(.*)$/); | ||
98 | } | ||
99 | close(IN); | ||
100 | |||
101 | # The following ciphers may be excluded (by Configure). This means functions | ||
102 | # defined with ifndef(NO_XXX) are not included in the .def file, and everything | ||
103 | # in directory xxx is ignored. | ||
104 | my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; | ||
105 | my $no_cast; | ||
106 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | ||
107 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | ||
108 | my $no_ec; | ||
109 | my $no_fp_api; | ||
110 | |||
111 | foreach (@ARGV, split(/ /, $options)) | ||
14 | { | 112 | { |
15 | $NT=1 if $_ eq "32"; | 113 | $debug=1 if $_ eq "debug"; |
16 | $NT=0 if $_ eq "16"; | 114 | $W32=1 if $_ eq "32"; |
115 | $W16=1 if $_ eq "16"; | ||
116 | if($_ eq "NT") { | ||
117 | $W32 = 1; | ||
118 | $NT = 1; | ||
119 | } | ||
120 | if ($_ eq "VMS-VAX") { | ||
121 | $VMS=1; | ||
122 | $VMSVAX=1; | ||
123 | } | ||
124 | if ($_ eq "VMS-Alpha") { | ||
125 | $VMS=1; | ||
126 | $VMSAlpha=1; | ||
127 | } | ||
128 | $VMS=1 if $_ eq "VMS"; | ||
129 | |||
17 | $do_ssl=1 if $_ eq "ssleay"; | 130 | $do_ssl=1 if $_ eq "ssleay"; |
131 | $do_ssl=1 if $_ eq "ssl"; | ||
18 | $do_crypto=1 if $_ eq "libeay"; | 132 | $do_crypto=1 if $_ eq "libeay"; |
133 | $do_crypto=1 if $_ eq "crypto"; | ||
134 | $do_update=1 if $_ eq "update"; | ||
135 | $do_rewrite=1 if $_ eq "rewrite"; | ||
136 | $do_ctest=1 if $_ eq "ctest"; | ||
137 | $do_ctestall=1 if $_ eq "ctestall"; | ||
138 | $do_checkexist=1 if $_ eq "exist"; | ||
139 | #$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK"; | ||
140 | |||
141 | if (/^no-rc2$/) { $no_rc2=1; } | ||
142 | elsif (/^no-rc4$/) { $no_rc4=1; } | ||
143 | elsif (/^no-rc5$/) { $no_rc5=1; } | ||
144 | elsif (/^no-idea$/) { $no_idea=1; } | ||
145 | elsif (/^no-des$/) { $no_des=1; $no_mdc2=1; } | ||
146 | elsif (/^no-bf$/) { $no_bf=1; } | ||
147 | elsif (/^no-cast$/) { $no_cast=1; } | ||
148 | elsif (/^no-md2$/) { $no_md2=1; } | ||
149 | elsif (/^no-md4$/) { $no_md4=1; } | ||
150 | elsif (/^no-md5$/) { $no_md5=1; } | ||
151 | elsif (/^no-sha$/) { $no_sha=1; } | ||
152 | elsif (/^no-ripemd$/) { $no_ripemd=1; } | ||
153 | elsif (/^no-mdc2$/) { $no_mdc2=1; } | ||
154 | elsif (/^no-rsa$/) { $no_rsa=1; } | ||
155 | elsif (/^no-dsa$/) { $no_dsa=1; } | ||
156 | elsif (/^no-dh$/) { $no_dh=1; } | ||
157 | elsif (/^no-ec$/) { $no_ec=1; } | ||
158 | elsif (/^no-hmac$/) { $no_hmac=1; } | ||
159 | elsif (/^no-aes$/) { $no_aes=1; } | ||
160 | elsif (/^no-evp$/) { $no_evp=1; } | ||
161 | elsif (/^no-lhash$/) { $no_lhash=1; } | ||
162 | elsif (/^no-stack$/) { $no_stack=1; } | ||
163 | elsif (/^no-err$/) { $no_err=1; } | ||
164 | elsif (/^no-buffer$/) { $no_buffer=1; } | ||
165 | elsif (/^no-bio$/) { $no_bio=1; } | ||
166 | #elsif (/^no-locking$/) { $no_locking=1; } | ||
167 | elsif (/^no-comp$/) { $no_comp=1; } | ||
168 | elsif (/^no-dso$/) { $no_dso=1; } | ||
169 | elsif (/^no-krb5$/) { $no_krb5=1; } | ||
19 | } | 170 | } |
20 | 171 | ||
172 | |||
173 | # If no platform is given, assume WIN32 | ||
174 | if ($W32 + $W16 + $VMS == 0) { | ||
175 | $W32 = 1; | ||
176 | } | ||
177 | |||
178 | # Add extra knowledge | ||
179 | if ($W16) { | ||
180 | $no_fp_api=1; | ||
181 | } | ||
182 | |||
21 | if (!$do_ssl && !$do_crypto) | 183 | if (!$do_ssl && !$do_crypto) |
22 | { | 184 | { |
23 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 ]\n"; | 185 | print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ]\n"; |
24 | exit(1); | 186 | exit(1); |
25 | } | 187 | } |
26 | 188 | ||
27 | %ssl_list=&load_numbers($ssl_num); | 189 | %ssl_list=&load_numbers($ssl_num); |
190 | $max_ssl = $max_num; | ||
28 | %crypto_list=&load_numbers($crypto_num); | 191 | %crypto_list=&load_numbers($crypto_num); |
192 | $max_crypto = $max_num; | ||
193 | |||
194 | my $ssl="ssl/ssl.h"; | ||
195 | $ssl.=" ssl/kssl.h"; | ||
29 | 196 | ||
30 | $ssl="ssl/ssl.h"; | 197 | my $crypto ="crypto/crypto.h"; |
31 | 198 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; | |
32 | $crypto ="crypto/crypto.h"; | 199 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; |
33 | $crypto.=" crypto/des/des.h"; | 200 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; |
34 | $crypto.=" crypto/idea/idea.h"; | 201 | $crypto.=" crypto/rc5/rc5.h" ; # unless $no_rc5; |
35 | $crypto.=" crypto/rc4/rc4.h"; | 202 | $crypto.=" crypto/rc2/rc2.h" ; # unless $no_rc2; |
36 | $crypto.=" crypto/rc5/rc5.h"; | 203 | $crypto.=" crypto/bf/blowfish.h" ; # unless $no_bf; |
37 | $crypto.=" crypto/rc2/rc2.h"; | 204 | $crypto.=" crypto/cast/cast.h" ; # unless $no_cast; |
38 | $crypto.=" crypto/bf/blowfish.h"; | 205 | $crypto.=" crypto/md2/md2.h" ; # unless $no_md2; |
39 | $crypto.=" crypto/cast/cast.h"; | 206 | $crypto.=" crypto/md4/md4.h" ; # unless $no_md4; |
40 | $crypto.=" crypto/md2/md2.h"; | 207 | $crypto.=" crypto/md5/md5.h" ; # unless $no_md5; |
41 | $crypto.=" crypto/md5/md5.h"; | 208 | $crypto.=" crypto/mdc2/mdc2.h" ; # unless $no_mdc2; |
42 | $crypto.=" crypto/mdc2/mdc2.h"; | 209 | $crypto.=" crypto/sha/sha.h" ; # unless $no_sha; |
43 | $crypto.=" crypto/sha/sha.h"; | 210 | $crypto.=" crypto/ripemd/ripemd.h" ; # unless $no_ripemd; |
44 | $crypto.=" crypto/ripemd/ripemd.h"; | 211 | $crypto.=" crypto/aes/aes.h" ; # unless $no_aes; |
45 | 212 | ||
46 | $crypto.=" crypto/bn/bn.h"; | 213 | $crypto.=" crypto/bn/bn.h"; |
47 | $crypto.=" crypto/rsa/rsa.h"; | 214 | $crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; |
48 | $crypto.=" crypto/dsa/dsa.h"; | 215 | $crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; |
49 | $crypto.=" crypto/dh/dh.h"; | 216 | $crypto.=" crypto/dh/dh.h" ; # unless $no_dh; |
50 | 217 | $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; | |
51 | $crypto.=" crypto/stack/stack.h"; | 218 | $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; |
52 | $crypto.=" crypto/buffer/buffer.h"; | 219 | |
53 | $crypto.=" crypto/bio/bio.h"; | 220 | $crypto.=" crypto/engine/engine.h"; |
54 | $crypto.=" crypto/lhash/lhash.h"; | 221 | $crypto.=" crypto/stack/stack.h" ; # unless $no_stack; |
222 | $crypto.=" crypto/buffer/buffer.h" ; # unless $no_buffer; | ||
223 | $crypto.=" crypto/bio/bio.h" ; # unless $no_bio; | ||
224 | $crypto.=" crypto/dso/dso.h" ; # unless $no_dso; | ||
225 | $crypto.=" crypto/lhash/lhash.h" ; # unless $no_lhash; | ||
55 | $crypto.=" crypto/conf/conf.h"; | 226 | $crypto.=" crypto/conf/conf.h"; |
56 | $crypto.=" crypto/txt_db/txt_db.h"; | 227 | $crypto.=" crypto/txt_db/txt_db.h"; |
57 | 228 | ||
58 | $crypto.=" crypto/evp/evp.h"; | 229 | $crypto.=" crypto/evp/evp.h" ; # unless $no_evp; |
59 | $crypto.=" crypto/objects/objects.h"; | 230 | $crypto.=" crypto/objects/objects.h"; |
60 | $crypto.=" crypto/pem/pem.h"; | 231 | $crypto.=" crypto/pem/pem.h"; |
61 | #$crypto.=" crypto/meth/meth.h"; | 232 | #$crypto.=" crypto/meth/meth.h"; |
62 | $crypto.=" crypto/asn1/asn1.h"; | 233 | $crypto.=" crypto/asn1/asn1.h"; |
234 | $crypto.=" crypto/asn1/asn1t.h"; | ||
63 | $crypto.=" crypto/asn1/asn1_mac.h"; | 235 | $crypto.=" crypto/asn1/asn1_mac.h"; |
64 | $crypto.=" crypto/err/err.h"; | 236 | $crypto.=" crypto/err/err.h" ; # unless $no_err; |
65 | $crypto.=" crypto/pkcs7/pkcs7.h"; | 237 | $crypto.=" crypto/pkcs7/pkcs7.h"; |
238 | $crypto.=" crypto/pkcs12/pkcs12.h"; | ||
66 | $crypto.=" crypto/x509/x509.h"; | 239 | $crypto.=" crypto/x509/x509.h"; |
67 | $crypto.=" crypto/x509/x509_vfy.h"; | 240 | $crypto.=" crypto/x509/x509_vfy.h"; |
241 | $crypto.=" crypto/x509v3/x509v3.h"; | ||
68 | $crypto.=" crypto/rand/rand.h"; | 242 | $crypto.=" crypto/rand/rand.h"; |
69 | $crypto.=" crypto/hmac/hmac.h"; | 243 | $crypto.=" crypto/comp/comp.h" ; # unless $no_comp; |
244 | $crypto.=" crypto/ocsp/ocsp.h"; | ||
245 | $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; | ||
246 | $crypto.=" crypto/krb5/krb5_asn.h"; | ||
247 | $crypto.=" crypto/tmdiff.h"; | ||
248 | |||
249 | my $symhacks="crypto/symhacks.h"; | ||
250 | |||
251 | my @ssl_symbols = &do_defs("SSLEAY", $ssl, $symhacks); | ||
252 | my @crypto_symbols = &do_defs("LIBEAY", $crypto, $symhacks); | ||
253 | |||
254 | if ($do_update) { | ||
255 | |||
256 | if ($do_ssl == 1) { | ||
257 | |||
258 | &maybe_add_info("SSLEAY",*ssl_list,@ssl_symbols); | ||
259 | if ($do_rewrite == 1) { | ||
260 | open(OUT, ">$ssl_num"); | ||
261 | &rewrite_numbers(*OUT,"SSLEAY",*ssl_list,@ssl_symbols); | ||
262 | } else { | ||
263 | open(OUT, ">>$ssl_num"); | ||
264 | } | ||
265 | &update_numbers(*OUT,"SSLEAY",*ssl_list,$max_ssl,@ssl_symbols); | ||
266 | close OUT; | ||
267 | } | ||
268 | |||
269 | if($do_crypto == 1) { | ||
270 | |||
271 | &maybe_add_info("LIBEAY",*crypto_list,@crypto_symbols); | ||
272 | if ($do_rewrite == 1) { | ||
273 | open(OUT, ">$crypto_num"); | ||
274 | &rewrite_numbers(*OUT,"LIBEAY",*crypto_list,@crypto_symbols); | ||
275 | } else { | ||
276 | open(OUT, ">>$crypto_num"); | ||
277 | } | ||
278 | &update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto,@crypto_symbols); | ||
279 | close OUT; | ||
280 | } | ||
281 | |||
282 | } elsif ($do_checkexist) { | ||
283 | &check_existing(*ssl_list, @ssl_symbols) | ||
284 | if $do_ssl == 1; | ||
285 | &check_existing(*crypto_list, @crypto_symbols) | ||
286 | if $do_crypto == 1; | ||
287 | } elsif ($do_ctest || $do_ctestall) { | ||
70 | 288 | ||
71 | $match{'NOPROTO'}=1; | 289 | print <<"EOF"; |
72 | $match2{'PERL5'}=1; | ||
73 | 290 | ||
74 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,&do_defs("SSLEAY",$ssl)) | 291 | /* Test file to check all DEF file symbols are present by trying |
75 | if $do_ssl == 1; | 292 | * to link to all of them. This is *not* intended to be run! |
293 | */ | ||
294 | |||
295 | int main() | ||
296 | { | ||
297 | EOF | ||
298 | &print_test_file(*STDOUT,"SSLEAY",*ssl_list,$do_ctestall,@ssl_symbols) | ||
299 | if $do_ssl == 1; | ||
300 | |||
301 | &print_test_file(*STDOUT,"LIBEAY",*crypto_list,$do_ctestall,@crypto_symbols) | ||
302 | if $do_crypto == 1; | ||
303 | |||
304 | print "}\n"; | ||
305 | |||
306 | } else { | ||
307 | |||
308 | &print_def_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_symbols) | ||
309 | if $do_ssl == 1; | ||
310 | |||
311 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_symbols) | ||
312 | if $do_crypto == 1; | ||
313 | |||
314 | } | ||
76 | 315 | ||
77 | &print_def_file(*STDOUT,"LIBEAY",*crypto_list,&do_defs("LIBEAY",$crypto)) | ||
78 | if $do_crypto == 1; | ||
79 | 316 | ||
80 | sub do_defs | 317 | sub do_defs |
81 | { | 318 | { |
82 | local($name,$files)=@_; | 319 | my($name,$files,$symhacksfile)=@_; |
83 | local(@ret); | 320 | my $file; |
321 | my @ret; | ||
322 | my %syms; | ||
323 | my %platform; # For anything undefined, we assume "" | ||
324 | my %kind; # For anything undefined, we assume "FUNCTION" | ||
325 | my %algorithm; # For anything undefined, we assume "" | ||
326 | my %variant; | ||
327 | my %variant_cnt; # To be able to allocate "name{n}" if "name" | ||
328 | # is the same name as the original. | ||
329 | my $cpp; | ||
330 | my %unknown_algorithms = (); | ||
84 | 331 | ||
85 | $off=-1; | 332 | foreach $file (split(/\s+/,$symhacksfile." ".$files)) |
86 | foreach $file (split(/\s+/,$files)) | ||
87 | { | 333 | { |
88 | # print STDERR "reading $file\n"; | 334 | print STDERR "DEBUG: starting on $file:\n" if $debug; |
89 | open(IN,"<$file") || die "unable to open $file:$!\n"; | 335 | open(IN,"<$file") || die "unable to open $file:$!\n"; |
90 | $depth=0; | 336 | my $line = "", my $def= ""; |
91 | $pr=-1; | 337 | my %tag = ( |
92 | @np=""; | 338 | (map { $_ => 0 } @known_platforms), |
93 | $/=undef; | 339 | (map { "OPENSSL_SYS_".$_ => 0 } @known_ossl_platforms), |
94 | $a=<IN>; | 340 | (map { "OPENSSL_NO_".$_ => 0 } @known_algorithms), |
95 | while (($i=index($a,"/*")) >= 0) | 341 | NOPROTO => 0, |
342 | PERL5 => 0, | ||
343 | _WINDLL => 0, | ||
344 | CONST_STRICT => 0, | ||
345 | TRUE => 1, | ||
346 | ); | ||
347 | my $symhacking = $file eq $symhacksfile; | ||
348 | my @current_platforms = (); | ||
349 | my @current_algorithms = (); | ||
350 | |||
351 | # params: symbol, alias, platforms, kind | ||
352 | # The reason to put this subroutine in a variable is that | ||
353 | # it will otherwise create it's own, unshared, version of | ||
354 | # %tag and %variant... | ||
355 | my $make_variant = sub | ||
356 | { | ||
357 | my ($s, $a, $p, $k) = @_; | ||
358 | my ($a1, $a2); | ||
359 | |||
360 | print STDERR "DEBUG: make_variant: Entered with ",$s,", ",$a,", ",(defined($p)?$p:""),", ",(defined($k)?$k:""),"\n" if $debug; | ||
361 | if (defined($p)) | ||
96 | { | 362 | { |
97 | $j=index($a,"*/"); | 363 | $a1 = join(",",$p, |
98 | break unless ($j >= 0); | 364 | grep(!/^$/, |
99 | $a=substr($a,0,$i).substr($a,$j+2); | 365 | map { $tag{$_} == 1 ? $_ : "" } |
100 | # print "$i $j\n"; | 366 | @known_platforms)); |
101 | } | 367 | } |
102 | foreach (split("\n",$a)) | 368 | else |
369 | { | ||
370 | $a1 = join(",", | ||
371 | grep(!/^$/, | ||
372 | map { $tag{$_} == 1 ? $_ : "" } | ||
373 | @known_platforms)); | ||
374 | } | ||
375 | $a2 = join(",", | ||
376 | grep(!/^$/, | ||
377 | map { $tag{"OPENSSL_SYS_".$_} == 1 ? $_ : "" } | ||
378 | @known_ossl_platforms)); | ||
379 | print STDERR "DEBUG: make_variant: a1 = $a1; a2 = $a2\n" if $debug; | ||
380 | if ($a1 eq "") { $a1 = $a2; } | ||
381 | elsif ($a1 ne "" && $a2 ne "") { $a1 .= ",".$a2; } | ||
382 | if ($a eq $s) | ||
103 | { | 383 | { |
104 | if (/^\#\s*ifndef (.*)/) | 384 | if (!defined($variant_cnt{$s})) |
105 | { | 385 | { |
106 | push(@tag,$1); | 386 | $variant_cnt{$s} = 0; |
107 | $tag{$1}=-1; | ||
108 | next; | ||
109 | } | 387 | } |
110 | elsif (/^\#\s*if !defined\(([^\)]+)\)/) | 388 | $variant_cnt{$s}++; |
111 | { | 389 | $a .= "{$variant_cnt{$s}}"; |
390 | } | ||
391 | my $toadd = $a.":".$a1.(defined($k)?":".$k:""); | ||
392 | my $togrep = $s.'(\{[0-9]+\})?:'.$a1.(defined($k)?":".$k:""); | ||
393 | if (!grep(/^$togrep$/, | ||
394 | split(/;/, defined($variant{$s})?$variant{$s}:""))) { | ||
395 | if (defined($variant{$s})) { $variant{$s} .= ";"; } | ||
396 | $variant{$s} .= $toadd; | ||
397 | } | ||
398 | print STDERR "DEBUG: make_variant: Exit with variant of ",$s," = ",$variant{$s},"\n" if $debug; | ||
399 | }; | ||
400 | |||
401 | print STDERR "DEBUG: parsing ----------\n" if $debug; | ||
402 | while(<IN>) { | ||
403 | last if (/\/\* Error codes for the \w+ functions\. \*\//); | ||
404 | if ($line ne '') { | ||
405 | $_ = $line . $_; | ||
406 | $line = ''; | ||
407 | } | ||
408 | |||
409 | if (/\\$/) { | ||
410 | chomp; # remove eol | ||
411 | chop; # remove ending backslash | ||
412 | $line = $_; | ||
413 | next; | ||
414 | } | ||
415 | |||
416 | $cpp = 1 if /^\#.*ifdef.*cplusplus/; | ||
417 | if ($cpp) { | ||
418 | $cpp = 0 if /^\#.*endif/; | ||
419 | next; | ||
420 | } | ||
421 | |||
422 | s/\/\*.*?\*\///gs; # ignore comments | ||
423 | s/{[^{}]*}//gs; # ignore {} blocks | ||
424 | print STDERR "DEBUG: \$_=\"$_\"\n" if $debug; | ||
425 | if (/^\#\s*ifndef\s+(.*)/) { | ||
426 | push(@tag,"-"); | ||
112 | push(@tag,$1); | 427 | push(@tag,$1); |
113 | $tag{$1}=-1; | 428 | $tag{$1}=-1; |
114 | next; | 429 | print STDERR "DEBUG: $file: found tag $1 = -1\n" if $debug; |
430 | } elsif (/^\#\s*if\s+!defined\(([^\)]+)\)/) { | ||
431 | push(@tag,"-"); | ||
432 | if (/^\#\s*if\s+(!defined\(([^\)]+)\)(\s+\&\&\s+!defined\(([^\)]+)\))*)$/) { | ||
433 | my $tmp_1 = $1; | ||
434 | my $tmp_; | ||
435 | foreach $tmp_ (split '\&\&',$tmp_1) { | ||
436 | $tmp_ =~ /!defined\(([^\)]+)\)/; | ||
437 | print STDERR "DEBUG: $file: found tag $1 = -1\n" if $debug; | ||
438 | push(@tag,$1); | ||
439 | $tag{$1}=-1; | ||
440 | } | ||
441 | } else { | ||
442 | print STDERR "Warning: $file: complicated expression: $_" if $debug; # because it is O... | ||
443 | print STDERR "DEBUG: $file: found tag $1 = -1\n" if $debug; | ||
444 | push(@tag,$1); | ||
445 | $tag{$1}=-1; | ||
115 | } | 446 | } |
116 | elsif (/^\#\s*ifdef (.*)/) | 447 | } elsif (/^\#\s*ifdef\s+(.*)/) { |
117 | { | 448 | push(@tag,"-"); |
118 | push(@tag,$1); | 449 | push(@tag,$1); |
119 | $tag{$1}=1; | 450 | $tag{$1}=1; |
120 | next; | 451 | print STDERR "DEBUG: $file: found tag $1 = 1\n" if $debug; |
452 | } elsif (/^\#\s*if\s+defined\(([^\)]+)\)/) { | ||
453 | push(@tag,"-"); | ||
454 | if (/^\#\s*if\s+(defined\(([^\)]+)\)(\s+\|\|\s+defined\(([^\)]+)\))*)$/) { | ||
455 | my $tmp_1 = $1; | ||
456 | my $tmp_; | ||
457 | foreach $tmp_ (split '\|\|',$tmp_1) { | ||
458 | $tmp_ =~ /defined\(([^\)]+)\)/; | ||
459 | print STDERR "DEBUG: $file: found tag $1 = 1\n" if $debug; | ||
460 | push(@tag,$1); | ||
461 | $tag{$1}=1; | ||
462 | } | ||
463 | } else { | ||
464 | print STDERR "Warning: $file: complicated expression: $_\n" if $debug; # because it is O... | ||
465 | print STDERR "DEBUG: $file: found tag $1 = 1\n" if $debug; | ||
466 | push(@tag,$1); | ||
467 | $tag{$1}=1; | ||
121 | } | 468 | } |
122 | elsif (/^\#\s*if defined(.*)/) | 469 | } elsif (/^\#\s*error\s+(\w+) is disabled\./) { |
123 | { | 470 | my $tag_i = $#tag; |
124 | push(@tag,$1); | 471 | while($tag[$tag_i] ne "-") { |
125 | $tag{$1}=1; | 472 | if ($tag[$tag_i] eq "OPENSSL_NO_".$1) { |
126 | next; | 473 | $tag{$tag[$tag_i]}=2; |
474 | print STDERR "DEBUG: $file: chaged tag $1 = 2\n" if $debug; | ||
475 | } | ||
476 | $tag_i--; | ||
477 | } | ||
478 | } elsif (/^\#\s*endif/) { | ||
479 | my $tag_i = $#tag; | ||
480 | while($tag[$tag_i] ne "-") { | ||
481 | my $t=$tag[$tag_i]; | ||
482 | print STDERR "DEBUG: \$t=\"$t\"\n" if $debug; | ||
483 | if ($tag{$t}==2) { | ||
484 | $tag{$t}=-1; | ||
485 | } else { | ||
486 | $tag{$t}=0; | ||
487 | } | ||
488 | print STDERR "DEBUG: $file: changed tag ",$t," = ",$tag{$t},"\n" if $debug; | ||
489 | pop(@tag); | ||
490 | if ($t =~ /^OPENSSL_NO_([A-Z0-9_]+)$/) { | ||
491 | $t=$1; | ||
492 | } else { | ||
493 | $t=""; | ||
494 | } | ||
495 | if ($t ne "" | ||
496 | && !grep(/^$t$/, @known_algorithms)) { | ||
497 | $unknown_algorithms{$t} = 1; | ||
498 | #print STDERR "DEBUG: Added as unknown algorithm: $t\n" if $debug; | ||
499 | } | ||
500 | $tag_i--; | ||
127 | } | 501 | } |
128 | elsif (/^\#\s*endif/) | ||
129 | { | ||
130 | $tag{$tag[$#tag]}=0; | ||
131 | pop(@tag); | 502 | pop(@tag); |
503 | } elsif (/^\#\s*else/) { | ||
504 | my $tag_i = $#tag; | ||
505 | while($tag[$tag_i] ne "-") { | ||
506 | my $t=$tag[$tag_i]; | ||
507 | $tag{$t}= -$tag{$t}; | ||
508 | print STDERR "DEBUG: $file: changed tag ",$t," = ",$tag{$t},"\n" if $debug; | ||
509 | $tag_i--; | ||
510 | } | ||
511 | } elsif (/^\#\s*if\s+1/) { | ||
512 | push(@tag,"-"); | ||
513 | # Dummy tag | ||
514 | push(@tag,"TRUE"); | ||
515 | $tag{"TRUE"}=1; | ||
516 | print STDERR "DEBUG: $file: found 1\n" if $debug; | ||
517 | } elsif (/^\#\s*if\s+0/) { | ||
518 | push(@tag,"-"); | ||
519 | # Dummy tag | ||
520 | push(@tag,"TRUE"); | ||
521 | $tag{"TRUE"}=-1; | ||
522 | print STDERR "DEBUG: $file: found 0\n" if $debug; | ||
523 | } elsif (/^\#\s*define\s+(\w+)\s+(\w+)/ | ||
524 | && $symhacking && $tag{'TRUE'} != -1) { | ||
525 | # This is for aliasing. When we find an alias, | ||
526 | # we have to invert | ||
527 | &$make_variant($1,$2); | ||
528 | print STDERR "DEBUG: $file: defined $1 = $2\n" if $debug; | ||
529 | } | ||
530 | if (/^\#/) { | ||
531 | @current_platforms = | ||
532 | grep(!/^$/, | ||
533 | map { $tag{$_} == 1 ? $_ : | ||
534 | $tag{$_} == -1 ? "!".$_ : "" } | ||
535 | @known_platforms); | ||
536 | push @current_platforms | ||
537 | , grep(!/^$/, | ||
538 | map { $tag{"OPENSSL_SYS_".$_} == 1 ? $_ : | ||
539 | $tag{"OPENSSL_SYS_".$_} == -1 ? "!".$_ : "" } | ||
540 | @known_ossl_platforms); | ||
541 | @current_algorithms = | ||
542 | grep(!/^$/, | ||
543 | map { $tag{"OPENSSL_NO_".$_} == -1 ? $_ : "" } | ||
544 | @known_algorithms); | ||
545 | $def .= | ||
546 | "#INFO:" | ||
547 | .join(',',@current_platforms).":" | ||
548 | .join(',',@current_algorithms).";"; | ||
132 | next; | 549 | next; |
550 | } | ||
551 | if ($tag{'TRUE'} != -1) { | ||
552 | if (/^\s*DECLARE_STACK_OF\s*\(\s*(\w*)\s*\)/) { | ||
553 | next; | ||
554 | } elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
555 | $def .= "int d2i_$3(void);"; | ||
556 | $def .= "int i2d_$3(void);"; | ||
557 | # Variant for platforms that do not | ||
558 | # have to access globale variables | ||
559 | # in shared libraries through functions | ||
560 | $def .= | ||
561 | "#INFO:" | ||
562 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
563 | .join(',',@current_algorithms).";"; | ||
564 | $def .= "OPENSSL_EXTERN int $2_it;"; | ||
565 | $def .= | ||
566 | "#INFO:" | ||
567 | .join(',',@current_platforms).":" | ||
568 | .join(',',@current_algorithms).";"; | ||
569 | # Variant for platforms that have to | ||
570 | # access globale variables in shared | ||
571 | # libraries through functions | ||
572 | &$make_variant("$2_it","$2_it", | ||
573 | "EXPORT_VAR_AS_FUNCTION", | ||
574 | "FUNCTION"); | ||
575 | next; | ||
576 | } elsif (/^\s*DECLARE_ASN1_FUNCTIONS_fname\s*\(\s*(\w*)\s*,\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
577 | $def .= "int d2i_$3(void);"; | ||
578 | $def .= "int i2d_$3(void);"; | ||
579 | $def .= "int $3_free(void);"; | ||
580 | $def .= "int $3_new(void);"; | ||
581 | # Variant for platforms that do not | ||
582 | # have to access globale variables | ||
583 | # in shared libraries through functions | ||
584 | $def .= | ||
585 | "#INFO:" | ||
586 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
587 | .join(',',@current_algorithms).";"; | ||
588 | $def .= "OPENSSL_EXTERN int $2_it;"; | ||
589 | $def .= | ||
590 | "#INFO:" | ||
591 | .join(',',@current_platforms).":" | ||
592 | .join(',',@current_algorithms).";"; | ||
593 | # Variant for platforms that have to | ||
594 | # access globale variables in shared | ||
595 | # libraries through functions | ||
596 | &$make_variant("$2_it","$2_it", | ||
597 | "EXPORT_VAR_AS_FUNCTION", | ||
598 | "FUNCTION"); | ||
599 | next; | ||
600 | } elsif (/^\s*DECLARE_ASN1_FUNCTIONS\s*\(\s*(\w*)\s*\)/ || | ||
601 | /^\s*DECLARE_ASN1_FUNCTIONS_const\s*\(\s*(\w*)\s*\)/) { | ||
602 | $def .= "int d2i_$1(void);"; | ||
603 | $def .= "int i2d_$1(void);"; | ||
604 | $def .= "int $1_free(void);"; | ||
605 | $def .= "int $1_new(void);"; | ||
606 | # Variant for platforms that do not | ||
607 | # have to access globale variables | ||
608 | # in shared libraries through functions | ||
609 | $def .= | ||
610 | "#INFO:" | ||
611 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
612 | .join(',',@current_algorithms).";"; | ||
613 | $def .= "OPENSSL_EXTERN int $1_it;"; | ||
614 | $def .= | ||
615 | "#INFO:" | ||
616 | .join(',',@current_platforms).":" | ||
617 | .join(',',@current_algorithms).";"; | ||
618 | # Variant for platforms that have to | ||
619 | # access globale variables in shared | ||
620 | # libraries through functions | ||
621 | &$make_variant("$1_it","$1_it", | ||
622 | "EXPORT_VAR_AS_FUNCTION", | ||
623 | "FUNCTION"); | ||
624 | next; | ||
625 | } elsif (/^\s*DECLARE_ASN1_ENCODE_FUNCTIONS_const\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
626 | $def .= "int d2i_$2(void);"; | ||
627 | $def .= "int i2d_$2(void);"; | ||
628 | # Variant for platforms that do not | ||
629 | # have to access globale variables | ||
630 | # in shared libraries through functions | ||
631 | $def .= | ||
632 | "#INFO:" | ||
633 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
634 | .join(',',@current_algorithms).";"; | ||
635 | $def .= "OPENSSL_EXTERN int $2_it;"; | ||
636 | $def .= | ||
637 | "#INFO:" | ||
638 | .join(',',@current_platforms).":" | ||
639 | .join(',',@current_algorithms).";"; | ||
640 | # Variant for platforms that have to | ||
641 | # access globale variables in shared | ||
642 | # libraries through functions | ||
643 | &$make_variant("$2_it","$2_it", | ||
644 | "EXPORT_VAR_AS_FUNCTION", | ||
645 | "FUNCTION"); | ||
646 | next; | ||
647 | } elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
648 | $def .= "int d2i_$2(void);"; | ||
649 | $def .= "int i2d_$2(void);"; | ||
650 | $def .= "int $2_free(void);"; | ||
651 | $def .= "int $2_new(void);"; | ||
652 | # Variant for platforms that do not | ||
653 | # have to access globale variables | ||
654 | # in shared libraries through functions | ||
655 | $def .= | ||
656 | "#INFO:" | ||
657 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
658 | .join(',',@current_algorithms).";"; | ||
659 | $def .= "OPENSSL_EXTERN int $2_it;"; | ||
660 | $def .= | ||
661 | "#INFO:" | ||
662 | .join(',',@current_platforms).":" | ||
663 | .join(',',@current_algorithms).";"; | ||
664 | # Variant for platforms that have to | ||
665 | # access globale variables in shared | ||
666 | # libraries through functions | ||
667 | &$make_variant("$2_it","$2_it", | ||
668 | "EXPORT_VAR_AS_FUNCTION", | ||
669 | "FUNCTION"); | ||
670 | next; | ||
671 | } elsif (/^\s*DECLARE_ASN1_ITEM\s*\(\s*(\w*)\s*\)/) { | ||
672 | # Variant for platforms that do not | ||
673 | # have to access globale variables | ||
674 | # in shared libraries through functions | ||
675 | $def .= | ||
676 | "#INFO:" | ||
677 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
678 | .join(',',@current_algorithms).";"; | ||
679 | $def .= "OPENSSL_EXTERN int $1_it;"; | ||
680 | $def .= | ||
681 | "#INFO:" | ||
682 | .join(',',@current_platforms).":" | ||
683 | .join(',',@current_algorithms).";"; | ||
684 | # Variant for platforms that have to | ||
685 | # access globale variables in shared | ||
686 | # libraries through functions | ||
687 | &$make_variant("$1_it","$1_it", | ||
688 | "EXPORT_VAR_AS_FUNCTION", | ||
689 | "FUNCTION"); | ||
690 | next; | ||
691 | } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { | ||
692 | next; | ||
693 | } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) { | ||
694 | next; | ||
695 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || | ||
696 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { | ||
697 | # Things not in Win16 | ||
698 | $def .= | ||
699 | "#INFO:" | ||
700 | .join(',',"!WIN16",@current_platforms).":" | ||
701 | .join(',',@current_algorithms).";"; | ||
702 | $def .= "int PEM_read_$1(void);"; | ||
703 | $def .= "int PEM_write_$1(void);"; | ||
704 | $def .= | ||
705 | "#INFO:" | ||
706 | .join(',',@current_platforms).":" | ||
707 | .join(',',@current_algorithms).";"; | ||
708 | # Things that are everywhere | ||
709 | $def .= "int PEM_read_bio_$1(void);"; | ||
710 | $def .= "int PEM_write_bio_$1(void);"; | ||
711 | next; | ||
712 | } elsif (/^DECLARE_PEM_write\s*\(\s*(\w*)\s*,/ || | ||
713 | /^DECLARE_PEM_write_cb\s*\(\s*(\w*)\s*,/ ) { | ||
714 | # Things not in Win16 | ||
715 | $def .= | ||
716 | "#INFO:" | ||
717 | .join(',',"!WIN16",@current_platforms).":" | ||
718 | .join(',',@current_algorithms).";"; | ||
719 | $def .= "int PEM_write_$1(void);"; | ||
720 | $def .= | ||
721 | "#INFO:" | ||
722 | .join(',',@current_platforms).":" | ||
723 | .join(',',@current_algorithms).";"; | ||
724 | # Things that are everywhere | ||
725 | $def .= "int PEM_write_bio_$1(void);"; | ||
726 | next; | ||
727 | } elsif (/^DECLARE_PEM_read\s*\(\s*(\w*)\s*,/ || | ||
728 | /^DECLARE_PEM_read_cb\s*\(\s*(\w*)\s*,/ ) { | ||
729 | # Things not in Win16 | ||
730 | $def .= | ||
731 | "#INFO:" | ||
732 | .join(',',"!WIN16",@current_platforms).":" | ||
733 | .join(',',@current_algorithms).";"; | ||
734 | $def .= "int PEM_read_$1(void);"; | ||
735 | $def .= | ||
736 | "#INFO:" | ||
737 | .join(',',@current_platforms).":" | ||
738 | .join(',',@current_algorithms).";"; | ||
739 | # Things that are everywhere | ||
740 | $def .= "int PEM_read_bio_$1(void);"; | ||
741 | next; | ||
742 | } elsif (/^OPENSSL_DECLARE_GLOBAL\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
743 | # Variant for platforms that do not | ||
744 | # have to access globale variables | ||
745 | # in shared libraries through functions | ||
746 | $def .= | ||
747 | "#INFO:" | ||
748 | .join(',',"!EXPORT_VAR_AS_FUNCTION",@current_platforms).":" | ||
749 | .join(',',@current_algorithms).";"; | ||
750 | $def .= "OPENSSL_EXTERN int _shadow_$2;"; | ||
751 | $def .= | ||
752 | "#INFO:" | ||
753 | .join(',',@current_platforms).":" | ||
754 | .join(',',@current_algorithms).";"; | ||
755 | # Variant for platforms that have to | ||
756 | # access globale variables in shared | ||
757 | # libraries through functions | ||
758 | &$make_variant("_shadow_$2","_shadow_$2", | ||
759 | "EXPORT_VAR_AS_FUNCTION", | ||
760 | "FUNCTION"); | ||
761 | } elsif ($tag{'CONST_STRICT'} != 1) { | ||
762 | if (/\{|\/\*|\([^\)]*$/) { | ||
763 | $line = $_; | ||
764 | } else { | ||
765 | $def .= $_; | ||
766 | } | ||
133 | } | 767 | } |
134 | elsif (/^\#\s*else/) | 768 | } |
135 | { | 769 | } |
136 | $t=$tag[$#tag]; | 770 | close(IN); |
137 | $tag{$t}= -$tag{$t}; | 771 | |
772 | my $algs; | ||
773 | my $plays; | ||
774 | |||
775 | print STDERR "DEBUG: postprocessing ----------\n" if $debug; | ||
776 | foreach (split /;/, $def) { | ||
777 | my $s; my $k = "FUNCTION"; my $p; my $a; | ||
778 | s/^[\n\s]*//g; | ||
779 | s/[\n\s]*$//g; | ||
780 | next if(/\#undef/); | ||
781 | next if(/typedef\W/); | ||
782 | next if(/\#define/); | ||
783 | |||
784 | print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; | ||
785 | if (/^\#INFO:([^:]*):(.*)$/) { | ||
786 | $plats = $1; | ||
787 | $algs = $2; | ||
788 | print STDERR "DEBUG: found info on platforms ($plats) and algorithms ($algs)\n" if $debug; | ||
789 | next; | ||
790 | } elsif (/^\s*OPENSSL_EXTERN\s.*?(\w+(\{[0-9]+\})?)(\[[0-9]*\])*\s*$/) { | ||
791 | $s = $1; | ||
792 | $k = "VARIABLE"; | ||
793 | print STDERR "DEBUG: found external variable $s\n" if $debug; | ||
794 | } elsif (/\(\*(\w*(\{[0-9]+\})?)\([^\)]+/) { | ||
795 | $s = $1; | ||
796 | print STDERR "DEBUG: found ANSI C function $s\n" if $debug; | ||
797 | } elsif (/\w+\W+(\w+)\W*\(\s*\)$/s) { | ||
798 | # K&R C | ||
799 | print STDERR "DEBUG: found K&R C function $s\n" if $debug; | ||
138 | next; | 800 | next; |
801 | } elsif (/\w+\W+\w+(\{[0-9]+\})?\W*\(.*\)$/s) { | ||
802 | while (not /\(\)$/s) { | ||
803 | s/[^\(\)]*\)$/\)/s; | ||
804 | s/\([^\(\)]*\)\)$/\)/s; | ||
139 | } | 805 | } |
140 | #printf STDERR "$_\n%2d %2d %2d %2d %2d $NT\n", | 806 | s/\(void\)//; |
141 | #$tag{'NOPROTO'},$tag{'FreeBSD'},$tag{'WIN16'},$tag{'PERL5'},$tag{'NO_FP_API'}; | 807 | /(\w+(\{[0-9]+\})?)\W*\(\)/s; |
142 | 808 | $s = $1; | |
143 | $t=undef; | 809 | print STDERR "DEBUG: found function $s\n" if $debug; |
144 | if (/^extern .*;$/) | 810 | } elsif (/\(/ and not (/=/)) { |
145 | { $t=&do_extern($name,$_); } | 811 | print STDERR "File $file: cannot parse: $_;\n"; |
146 | elsif ( ($tag{'NOPROTO'} == 1) && | 812 | next; |
147 | ($tag{'FreeBSD'} != 1) && | 813 | } else { |
148 | (($NT && ($tag{'WIN16'} != 1)) || | 814 | next; |
149 | (!$NT && ($tag{'WIN16'} != -1))) && | 815 | } |
150 | ($tag{'PERL5'} != 1) && | 816 | |
151 | # ($tag{'_WINDLL'} != -1) && | 817 | $syms{$s} = 1; |
152 | ((!$NT && $tag{'_WINDLL'} != -1) || | 818 | $kind{$s} = $k; |
153 | ($NT && $tag{'_WINDLL'} != 1)) && | 819 | |
154 | ((($tag{'NO_FP_API'} != 1) && $NT) || | 820 | $p = $plats; |
155 | (($tag{'NO_FP_API'} != -1) && !$NT))) | 821 | $a = $algs; |
156 | { $t=&do_line($name,$_); } | 822 | $a .= ",BF" if($s =~ /EVP_bf/); |
157 | else | 823 | $a .= ",CAST" if($s =~ /EVP_cast/); |
158 | { $t=undef; } | 824 | $a .= ",DES" if($s =~ /EVP_des/); |
159 | if (($t ne undef) && (!$done{$name,$t})) | 825 | $a .= ",DSA" if($s =~ /EVP_dss/); |
160 | { | 826 | $a .= ",IDEA" if($s =~ /EVP_idea/); |
161 | $done{$name,$t}++; | 827 | $a .= ",MD2" if($s =~ /EVP_md2/); |
162 | push(@ret,$t); | 828 | $a .= ",MD4" if($s =~ /EVP_md4/); |
163 | #printf STDERR "one:$t\n" if $t =~ /BIO_/; | 829 | $a .= ",MD5" if($s =~ /EVP_md5/); |
830 | $a .= ",RC2" if($s =~ /EVP_rc2/); | ||
831 | $a .= ",RC4" if($s =~ /EVP_rc4/); | ||
832 | $a .= ",RC5" if($s =~ /EVP_rc5/); | ||
833 | $a .= ",RIPEMD" if($s =~ /EVP_ripemd/); | ||
834 | $a .= ",SHA" if($s =~ /EVP_sha/); | ||
835 | $a .= ",RSA" if($s =~ /EVP_(Open|Seal)(Final|Init)/); | ||
836 | $a .= ",RSA" if($s =~ /PEM_Seal(Final|Init|Update)/); | ||
837 | $a .= ",RSA" if($s =~ /RSAPrivateKey/); | ||
838 | $a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/); | ||
839 | |||
840 | $platform{$s} = | ||
841 | &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); | ||
842 | $algorithm{$s} .= ','.$a; | ||
843 | |||
844 | if (defined($variant{$s})) { | ||
845 | foreach $v (split /;/,$variant{$s}) { | ||
846 | (my $r, my $p, my $k) = split(/:/,$v); | ||
847 | my $ip = join ',',map({ /^!(.*)$/ ? $1 : "!".$_ } split /,/, $p); | ||
848 | $syms{$r} = 1; | ||
849 | if (!defined($k)) { $k = $kind{$s}; } | ||
850 | $kind{$r} = $k."(".$s.")"; | ||
851 | $algorithm{$r} = $algorithm{$s}; | ||
852 | $platform{$r} = &reduce_platforms($platform{$s}.",".$p.",".$p); | ||
853 | $platform{$s} = &reduce_platforms($platform{$s}.','.$ip.','.$ip); | ||
854 | print STDERR "DEBUG: \$variant{\"$s\"} = ",$v,"; \$r = $r; \$p = ",$platform{$r},"; \$a = ",$algorithm{$r},"; \$kind = ",$kind{$r},"\n" if $debug; | ||
164 | } | 855 | } |
165 | } | 856 | } |
166 | close(IN); | 857 | print STDERR "DEBUG: \$s = $s; \$p = ",$platform{$s},"; \$a = ",$algorithm{$s},"; \$kind = ",$kind{$s},"\n" if $debug; |
167 | } | 858 | } |
859 | } | ||
860 | |||
861 | # Prune the returned symbols | ||
862 | |||
863 | delete $syms{"bn_dump1"}; | ||
864 | $platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh"; | ||
865 | |||
866 | $platform{"PEM_read_NS_CERT_SEQ"} = "VMS"; | ||
867 | $platform{"PEM_write_NS_CERT_SEQ"} = "VMS"; | ||
868 | $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS"; | ||
869 | $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS"; | ||
870 | |||
871 | # Info we know about | ||
872 | |||
873 | push @ret, map { $_."\\".&info_string($_,"EXIST", | ||
874 | $platform{$_}, | ||
875 | $kind{$_}, | ||
876 | $algorithm{$_}) } keys %syms; | ||
877 | |||
878 | if (keys %unknown_algorithms) { | ||
879 | print STDERR "WARNING: mkdef.pl doesn't know the following algorithms:\n"; | ||
880 | print STDERR "\t",join("\n\t",keys %unknown_algorithms),"\n"; | ||
881 | } | ||
168 | return(@ret); | 882 | return(@ret); |
883 | } | ||
884 | |||
885 | # Param: string of comma-separated platform-specs. | ||
886 | sub reduce_platforms | ||
887 | { | ||
888 | my ($platforms) = @_; | ||
889 | my $pl = defined($platforms) ? $platforms : ""; | ||
890 | my %p = map { $_ => 0 } split /,/, $pl; | ||
891 | my $ret; | ||
892 | |||
893 | print STDERR "DEBUG: Entered reduce_platforms with \"$platforms\"\n" | ||
894 | if $debug; | ||
895 | # We do this, because if there's code like the following, it really | ||
896 | # means the function exists in all cases and should therefore be | ||
897 | # everywhere. By increasing and decreasing, we may attain 0: | ||
898 | # | ||
899 | # ifndef WIN16 | ||
900 | # int foo(); | ||
901 | # else | ||
902 | # int _fat foo(); | ||
903 | # endif | ||
904 | foreach $platform (split /,/, $pl) { | ||
905 | if ($platform =~ /^!(.*)$/) { | ||
906 | $p{$1}--; | ||
907 | } else { | ||
908 | $p{$platform}++; | ||
909 | } | ||
910 | } | ||
911 | foreach $platform (keys %p) { | ||
912 | if ($p{$platform} == 0) { delete $p{$platform}; } | ||
169 | } | 913 | } |
170 | 914 | ||
171 | sub do_line | 915 | delete $p{""}; |
172 | { | 916 | |
173 | local($file,$_)=@_; | 917 | $ret = join(',',sort(map { $p{$_} < 0 ? "!".$_ : $_ } keys %p)); |
174 | local($n); | 918 | print STDERR "DEBUG: Exiting reduce_platforms with \"$ret\"\n" |
175 | 919 | if $debug; | |
176 | return(undef) if /^$/; | 920 | return $ret; |
177 | return(undef) if /^\s/; | 921 | } |
178 | #printf STDERR "two:$_\n" if $_ =~ /BIO_/; | 922 | |
179 | if (/(CRYPTO_get_locking_callback)/) | 923 | sub info_string { |
180 | { return($1); } | 924 | (my $symbol, my $exist, my $platforms, my $kind, my $algorithms) = @_; |
181 | elsif (/(CRYPTO_get_id_callback)/) | 925 | |
182 | { return($1); } | 926 | my %a = defined($algorithms) ? |
183 | elsif (/(CRYPTO_get_add_lock_callback)/) | 927 | map { $_ => 1 } split /,/, $algorithms : (); |
184 | { return($1); } | 928 | my $k = defined($kind) ? $kind : "FUNCTION"; |
185 | elsif (/(SSL_CTX_get_verify_callback)/) | 929 | my $ret; |
186 | { return($1); } | 930 | my $p = &reduce_platforms($platforms); |
187 | elsif (/(SSL_get_info_callback)/) | 931 | |
188 | { return($1); } | 932 | delete $a{""}; |
189 | elsif ((!$NT) && /(ERR_load_CRYPTO_strings)/) | 933 | |
190 | { return("ERR_load_CRYPTOlib_strings"); } | 934 | $ret = $exist; |
191 | elsif (!$NT && /BIO_s_file/) | 935 | $ret .= ":".$p; |
192 | { return(undef); } | 936 | $ret .= ":".$k; |
193 | elsif (!$NT && /BIO_new_file/) | 937 | $ret .= ":".join(',',sort keys %a); |
194 | { return(undef); } | 938 | return $ret; |
195 | elsif (!$NT && /BIO_new_fp/) | 939 | } |
196 | { return(undef); } | 940 | |
197 | elsif ($NT && /BIO_s_file_internal/) | 941 | sub maybe_add_info { |
198 | { return(undef); } | 942 | (my $name, *nums, my @symbols) = @_; |
199 | elsif ($NT && /BIO_new_file_internal/) | 943 | my $sym; |
200 | { return(undef); } | 944 | my $new_info = 0; |
201 | elsif ($NT && /BIO_new_fp_internal/) | 945 | my %syms=(); |
202 | { return(undef); } | 946 | |
203 | else | 947 | print STDERR "Updating $name info\n"; |
204 | { | 948 | foreach $sym (@symbols) { |
205 | /\s\**(\S+)\s*\(/; | 949 | (my $s, my $i) = split /\\/, $sym; |
206 | return($1); | 950 | if (defined($nums{$s})) { |
951 | $i =~ s/^(.*?:.*?:\w+)(\(\w+\))?/$1/; | ||
952 | (my $n, my $dummy) = split /\\/, $nums{$s}; | ||
953 | if (!defined($dummy) || $i ne $dummy) { | ||
954 | $nums{$s} = $n."\\".$i; | ||
955 | $new_info++; | ||
956 | print STDERR "DEBUG: maybe_add_info for $s: \"$dummy\" => \"$i\"\n" if $debug; | ||
957 | } | ||
207 | } | 958 | } |
959 | $syms{$s} = 1; | ||
208 | } | 960 | } |
209 | 961 | ||
210 | sub do_extern | 962 | my @s=sort { &parse_number($nums{$a},"n") <=> &parse_number($nums{$b},"n") } keys %nums; |
963 | foreach $sym (@s) { | ||
964 | (my $n, my $i) = split /\\/, $nums{$sym}; | ||
965 | if (!defined($syms{$sym}) && $i !~ /^NOEXIST:/) { | ||
966 | $new_info++; | ||
967 | print STDERR "DEBUG: maybe_add_info for $sym: -> undefined\n" if $debug; | ||
968 | } | ||
969 | } | ||
970 | if ($new_info) { | ||
971 | print STDERR "$new_info old symbols got an info update\n"; | ||
972 | if (!$do_rewrite) { | ||
973 | print STDERR "You should do a rewrite to fix this.\n"; | ||
974 | } | ||
975 | } else { | ||
976 | print STDERR "No old symbols needed info update\n"; | ||
977 | } | ||
978 | } | ||
979 | |||
980 | # Param: string of comma-separated keywords, each possibly prefixed with a "!" | ||
981 | sub is_valid | ||
982 | { | ||
983 | my ($keywords_txt,$platforms) = @_; | ||
984 | my (@keywords) = split /,/,$keywords_txt; | ||
985 | my ($falsesum, $truesum) = (0, !grep(/^[^!]/,@keywords)); | ||
986 | |||
987 | # Param: one keyword | ||
988 | sub recognise | ||
211 | { | 989 | { |
212 | local($file,$_)=@_; | 990 | my ($keyword,$platforms) = @_; |
213 | local($n); | ||
214 | 991 | ||
215 | /\s\**(\S+);$/; | 992 | if ($platforms) { |
216 | return($1); | 993 | # platforms |
994 | if ($keyword eq "VMS" && $VMS) { return 1; } | ||
995 | if ($keyword eq "WIN32" && $W32) { return 1; } | ||
996 | if ($keyword eq "WIN16" && $W16) { return 1; } | ||
997 | if ($keyword eq "WINNT" && $NT) { return 1; } | ||
998 | # Special platforms: | ||
999 | # EXPORT_VAR_AS_FUNCTION means that global variables | ||
1000 | # will be represented as functions. This currently | ||
1001 | # only happens on VMS-VAX. | ||
1002 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { | ||
1003 | return 1; | ||
1004 | } | ||
1005 | return 0; | ||
1006 | } else { | ||
1007 | # algorithms | ||
1008 | if ($keyword eq "RC2" && $no_rc2) { return 0; } | ||
1009 | if ($keyword eq "RC4" && $no_rc4) { return 0; } | ||
1010 | if ($keyword eq "RC5" && $no_rc5) { return 0; } | ||
1011 | if ($keyword eq "IDEA" && $no_idea) { return 0; } | ||
1012 | if ($keyword eq "DES" && $no_des) { return 0; } | ||
1013 | if ($keyword eq "BF" && $no_bf) { return 0; } | ||
1014 | if ($keyword eq "CAST" && $no_cast) { return 0; } | ||
1015 | if ($keyword eq "MD2" && $no_md2) { return 0; } | ||
1016 | if ($keyword eq "MD4" && $no_md4) { return 0; } | ||
1017 | if ($keyword eq "MD5" && $no_md5) { return 0; } | ||
1018 | if ($keyword eq "SHA" && $no_sha) { return 0; } | ||
1019 | if ($keyword eq "RIPEMD" && $no_ripemd) { return 0; } | ||
1020 | if ($keyword eq "MDC2" && $no_mdc2) { return 0; } | ||
1021 | if ($keyword eq "RSA" && $no_rsa) { return 0; } | ||
1022 | if ($keyword eq "DSA" && $no_dsa) { return 0; } | ||
1023 | if ($keyword eq "DH" && $no_dh) { return 0; } | ||
1024 | if ($keyword eq "EC" && $no_ec) { return 0; } | ||
1025 | if ($keyword eq "HMAC" && $no_hmac) { return 0; } | ||
1026 | if ($keyword eq "AES" && $no_aes) { return 0; } | ||
1027 | if ($keyword eq "EVP" && $no_evp) { return 0; } | ||
1028 | if ($keyword eq "LHASH" && $no_lhash) { return 0; } | ||
1029 | if ($keyword eq "STACK" && $no_stack) { return 0; } | ||
1030 | if ($keyword eq "ERR" && $no_err) { return 0; } | ||
1031 | if ($keyword eq "BUFFER" && $no_buffer) { return 0; } | ||
1032 | if ($keyword eq "BIO" && $no_bio) { return 0; } | ||
1033 | if ($keyword eq "COMP" && $no_comp) { return 0; } | ||
1034 | if ($keyword eq "DSO" && $no_dso) { return 0; } | ||
1035 | if ($keyword eq "KRB5" && $no_krb5) { return 0; } | ||
1036 | if ($keyword eq "FP_API" && $no_fp_api) { return 0; } | ||
1037 | |||
1038 | # Nothing recognise as true | ||
1039 | return 1; | ||
1040 | } | ||
1041 | } | ||
1042 | |||
1043 | foreach $k (@keywords) { | ||
1044 | if ($k =~ /^!(.*)$/) { | ||
1045 | $falsesum += &recognise($1,$platforms); | ||
1046 | } else { | ||
1047 | $truesum += &recognise($k,$platforms); | ||
1048 | } | ||
217 | } | 1049 | } |
1050 | print STDERR "DEBUG: [",$#keywords,",",$#keywords < 0,"] is_valid($keywords_txt) => (\!$falsesum) && $truesum = ",(!$falsesum) && $truesum,"\n" if $debug; | ||
1051 | return (!$falsesum) && $truesum; | ||
1052 | } | ||
1053 | |||
1054 | sub print_test_file | ||
1055 | { | ||
1056 | (*OUT,my $name,*nums,my $testall,my @symbols)=@_; | ||
1057 | my $n = 1; my @e; my @r; | ||
1058 | my $sym; my $prev = ""; my $prefSSLeay; | ||
1059 | |||
1060 | (@e)=grep(/^SSLeay(\{[0-9]+\})?\\.*?:.*?:.*/,@symbols); | ||
1061 | (@r)=grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:.*/ && !/^SSLeay(\{[0-9]+\})?\\.*?:.*?:.*/,@symbols); | ||
1062 | @symbols=((sort @e),(sort @r)); | ||
1063 | |||
1064 | foreach $sym (@symbols) { | ||
1065 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; | ||
1066 | my $v = 0; | ||
1067 | $v = 1 if $i=~ /^.*?:.*?:VARIABLE/; | ||
1068 | my $p = ($i =~ /^[^:]*:([^:]*):/,$1); | ||
1069 | my $a = ($i =~ /^[^:]*:[^:]*:[^:]*:([^:]*)/,$1); | ||
1070 | if (!defined($nums{$s})) { | ||
1071 | print STDERR "Warning: $s does not have a number assigned\n" | ||
1072 | if(!$do_update); | ||
1073 | } elsif (is_valid($p,1) && is_valid($a,0)) { | ||
1074 | my $s2 = ($s =~ /^(.*?)(\{[0-9]+\})?$/, $1); | ||
1075 | if ($prev eq $s2) { | ||
1076 | print OUT "\t/* The following has already appeared previously */\n"; | ||
1077 | print STDERR "Warning: Symbol '",$s2,"' redefined. old=",($nums{$prev} =~ /^(.*?)\\/,$1),", new=",($nums{$s2} =~ /^(.*?)\\/,$1),"\n"; | ||
1078 | } | ||
1079 | $prev = $s2; # To warn about duplicates... | ||
1080 | |||
1081 | ($nn,$ni)=($nums{$s2} =~ /^(.*?)\\(.*)$/); | ||
1082 | if ($v) { | ||
1083 | print OUT "\textern int $s2; /* type unknown */ /* $nn $ni */\n"; | ||
1084 | } else { | ||
1085 | print OUT "\textern int $s2(); /* type unknown */ /* $nn $ni */\n"; | ||
1086 | } | ||
1087 | } | ||
1088 | } | ||
1089 | } | ||
218 | 1090 | ||
219 | sub print_def_file | 1091 | sub print_def_file |
220 | { | 1092 | { |
221 | local(*OUT,$name,*nums,@functions)=@_; | 1093 | (*OUT,my $name,*nums,my @symbols)=@_; |
222 | local($n)=1; | 1094 | my $n = 1; my @e; my @r; my @v; my $prev=""; |
223 | 1095 | ||
224 | if ($NT) | 1096 | if ($W32) |
225 | { $name.="32"; } | 1097 | { $name.="32"; } |
226 | else | 1098 | else |
227 | { $name.="16"; } | 1099 | { $name.="16"; } |
228 | 1100 | ||
229 | print OUT <<"EOF"; | 1101 | print OUT <<"EOF"; |
230 | ; | 1102 | ; |
231 | ; Definition file for the DDL version of the $name library from SSLeay | 1103 | ; Definition file for the DLL version of the $name library from OpenSSL |
232 | ; | 1104 | ; |
233 | 1105 | ||
234 | LIBRARY $name | 1106 | LIBRARY $name |
235 | 1107 | ||
236 | DESCRIPTION 'SSLeay $name - eay\@cryptsoft.com' | 1108 | DESCRIPTION 'OpenSSL $name - http://www.openssl.org/' |
237 | 1109 | ||
238 | EOF | 1110 | EOF |
239 | 1111 | ||
240 | if (!$NT) | 1112 | if (!$W32) { |
241 | { | ||
242 | print <<"EOF"; | 1113 | print <<"EOF"; |
243 | CODE PRELOAD MOVEABLE | 1114 | CODE PRELOAD MOVEABLE |
244 | DATA PRELOAD MOVEABLE SINGLE | 1115 | DATA PRELOAD MOVEABLE SINGLE |
@@ -249,44 +1120,219 @@ HEAPSIZE 4096 | |||
249 | STACKSIZE 8192 | 1120 | STACKSIZE 8192 |
250 | 1121 | ||
251 | EOF | 1122 | EOF |
252 | } | 1123 | } |
253 | 1124 | ||
254 | print "EXPORTS\n"; | 1125 | print "EXPORTS\n"; |
255 | 1126 | ||
1127 | (@e)=grep(/^SSLeay(\{[0-9]+\})?\\.*?:.*?:FUNCTION/,@symbols); | ||
1128 | (@r)=grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:FUNCTION/ && !/^SSLeay(\{[0-9]+\})?\\.*?:.*?:FUNCTION/,@symbols); | ||
1129 | (@v)=grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:VARIABLE/,@symbols); | ||
1130 | @symbols=((sort @e),(sort @r), (sort @v)); | ||
256 | 1131 | ||
257 | (@e)=grep(/^SSLeay/,@functions); | ||
258 | (@r)=grep(!/^SSLeay/,@functions); | ||
259 | @functions=((sort @e),(sort @r)); | ||
260 | 1132 | ||
261 | foreach $func (@functions) | 1133 | foreach $sym (@symbols) { |
262 | { | 1134 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; |
263 | if (!defined($nums{$func})) | 1135 | my $v = 0; |
264 | { | 1136 | $v = 1 if $i =~ /^.*?:.*?:VARIABLE/; |
265 | printf STDERR "$func does not have a number assigned\n"; | 1137 | if (!defined($nums{$s})) { |
266 | } | 1138 | printf STDERR "Warning: $s does not have a number assigned\n" |
267 | else | 1139 | if(!$do_update); |
268 | { | 1140 | } else { |
269 | $n=$nums{$func}; | 1141 | (my $n, my $dummy) = split /\\/, $nums{$s}; |
270 | printf OUT " %s%-35s@%d\n",($NT)?"":"_",$func,$n; | 1142 | my %pf = (); |
1143 | my $p = ($i =~ /^[^:]*:([^:]*):/,$1); | ||
1144 | my $a = ($i =~ /^[^:]*:[^:]*:[^:]*:([^:]*)/,$1); | ||
1145 | if (is_valid($p,1) && is_valid($a,0)) { | ||
1146 | my $s2 = ($s =~ /^(.*?)(\{[0-9]+\})?$/, $1); | ||
1147 | if ($prev eq $s2) { | ||
1148 | print STDERR "Warning: Symbol '",$s2,"' redefined. old=",($nums{$prev} =~ /^(.*?)\\/,$1),", new=",($nums{$s2} =~ /^(.*?)\\/,$1),"\n"; | ||
1149 | } | ||
1150 | $prev = $s2; # To warn about duplicates... | ||
1151 | if($v) { | ||
1152 | printf OUT " %s%-39s @%-8d DATA\n",($W32)?"":"_",$s2,$n; | ||
1153 | } else { | ||
1154 | printf OUT " %s%-39s @%d\n",($W32)?"":"_",$s2,$n; | ||
1155 | } | ||
271 | } | 1156 | } |
272 | } | 1157 | } |
273 | printf OUT "\n"; | ||
274 | } | 1158 | } |
1159 | printf OUT "\n"; | ||
1160 | } | ||
275 | 1161 | ||
276 | sub load_numbers | 1162 | sub load_numbers |
277 | { | 1163 | { |
278 | local($name)=@_; | 1164 | my($name)=@_; |
279 | local($j,@a,%ret); | 1165 | my(@a,%ret); |
1166 | |||
1167 | $max_num = 0; | ||
1168 | $num_noinfo = 0; | ||
1169 | $prev = ""; | ||
1170 | $prev_cnt = 0; | ||
280 | 1171 | ||
281 | open(IN,"<$name") || die "unable to open $name:$!\n"; | 1172 | open(IN,"<$name") || die "unable to open $name:$!\n"; |
282 | while (<IN>) | 1173 | while (<IN>) { |
283 | { | ||
284 | chop; | 1174 | chop; |
285 | s/#.*$//; | 1175 | s/#.*$//; |
286 | next if /^\s*$/; | 1176 | next if /^\s*$/; |
287 | @a=split; | 1177 | @a=split; |
288 | $ret{$a[0]}=$a[1]; | 1178 | if (defined $ret{$a[0]}) { |
1179 | # This is actually perfectly OK | ||
1180 | #print STDERR "Warning: Symbol '",$a[0],"' redefined. old=",$ret{$a[0]},", new=",$a[1],"\n"; | ||
289 | } | 1181 | } |
1182 | if ($max_num > $a[1]) { | ||
1183 | print STDERR "Warning: Number decreased from ",$max_num," to ",$a[1],"\n"; | ||
1184 | } | ||
1185 | elsif ($max_num == $a[1]) { | ||
1186 | # This is actually perfectly OK | ||
1187 | #print STDERR "Warning: Symbol ",$a[0]," has same number as previous ",$prev,": ",$a[1],"\n"; | ||
1188 | if ($a[0] eq $prev) { | ||
1189 | $prev_cnt++; | ||
1190 | $a[0] .= "{$prev_cnt}"; | ||
1191 | } | ||
1192 | } | ||
1193 | else { | ||
1194 | $prev_cnt = 0; | ||
1195 | } | ||
1196 | if ($#a < 2) { | ||
1197 | # Existence will be proven later, in do_defs | ||
1198 | $ret{$a[0]}=$a[1]; | ||
1199 | $num_noinfo++; | ||
1200 | } else { | ||
1201 | $ret{$a[0]}=$a[1]."\\".$a[2]; # \\ is a special marker | ||
1202 | } | ||
1203 | $max_num = $a[1] if $a[1] > $max_num; | ||
1204 | $prev=$a[0]; | ||
1205 | } | ||
1206 | if ($num_noinfo) { | ||
1207 | print STDERR "Warning: $num_noinfo symbols were without info."; | ||
1208 | if ($do_rewrite) { | ||
1209 | printf STDERR " The rewrite will fix this.\n"; | ||
1210 | } else { | ||
1211 | printf STDERR " You should do a rewrite to fix this.\n"; | ||
1212 | } | ||
1213 | } | ||
290 | close(IN); | 1214 | close(IN); |
291 | return(%ret); | 1215 | return(%ret); |
1216 | } | ||
1217 | |||
1218 | sub parse_number | ||
1219 | { | ||
1220 | (my $str, my $what) = @_; | ||
1221 | (my $n, my $i) = split(/\\/,$str); | ||
1222 | if ($what eq "n") { | ||
1223 | return $n; | ||
1224 | } else { | ||
1225 | return $i; | ||
1226 | } | ||
1227 | } | ||
1228 | |||
1229 | sub rewrite_numbers | ||
1230 | { | ||
1231 | (*OUT,$name,*nums,@symbols)=@_; | ||
1232 | my $thing; | ||
1233 | |||
1234 | print STDERR "Rewriting $name\n"; | ||
1235 | |||
1236 | my @r = grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:\w+\(\w+\)/,@symbols); | ||
1237 | my $r; my %r; my %rsyms; | ||
1238 | foreach $r (@r) { | ||
1239 | (my $s, my $i) = split /\\/, $r; | ||
1240 | my $a = $1 if $i =~ /^.*?:.*?:\w+\((\w+)\)/; | ||
1241 | $i =~ s/^(.*?:.*?:\w+)\(\w+\)/$1/; | ||
1242 | $r{$a} = $s."\\".$i; | ||
1243 | $rsyms{$s} = 1; | ||
1244 | } | ||
1245 | |||
1246 | my %syms = (); | ||
1247 | foreach $_ (@symbols) { | ||
1248 | (my $n, my $i) = split /\\/; | ||
1249 | $syms{$n} = 1; | ||
1250 | } | ||
1251 | |||
1252 | my @s=sort { | ||
1253 | &parse_number($nums{$a},"n") <=> &parse_number($nums{$b},"n") | ||
1254 | || $a cmp $b | ||
1255 | } keys %nums; | ||
1256 | foreach $sym (@s) { | ||
1257 | (my $n, my $i) = split /\\/, $nums{$sym}; | ||
1258 | next if defined($i) && $i =~ /^.*?:.*?:\w+\(\w+\)/; | ||
1259 | next if defined($rsyms{$sym}); | ||
1260 | print STDERR "DEBUG: rewrite_numbers for sym = ",$sym,": i = ",$i,", n = ",$n,", rsym{sym} = ",$rsyms{$sym},"syms{sym} = ",$syms{$sym},"\n" if $debug; | ||
1261 | $i="NOEXIST::FUNCTION:" | ||
1262 | if !defined($i) || $i eq "" || !defined($syms{$sym}); | ||
1263 | my $s2 = $sym; | ||
1264 | $s2 =~ s/\{[0-9]+\}$//; | ||
1265 | printf OUT "%s%-39s %d\t%s\n","",$s2,$n,$i; | ||
1266 | if (exists $r{$sym}) { | ||
1267 | (my $s, $i) = split /\\/,$r{$sym}; | ||
1268 | my $s2 = $s; | ||
1269 | $s2 =~ s/\{[0-9]+\}$//; | ||
1270 | printf OUT "%s%-39s %d\t%s\n","",$s2,$n,$i; | ||
1271 | } | ||
1272 | } | ||
1273 | } | ||
1274 | |||
1275 | sub update_numbers | ||
1276 | { | ||
1277 | (*OUT,$name,*nums,my $start_num, my @symbols)=@_; | ||
1278 | my $new_syms = 0; | ||
1279 | |||
1280 | print STDERR "Updating $name numbers\n"; | ||
1281 | |||
1282 | my @r = grep(/^\w+(\{[0-9]+\})?\\.*?:.*?:\w+\(\w+\)/,@symbols); | ||
1283 | my $r; my %r; my %rsyms; | ||
1284 | foreach $r (@r) { | ||
1285 | (my $s, my $i) = split /\\/, $r; | ||
1286 | my $a = $1 if $i =~ /^.*?:.*?:\w+\((\w+)\)/; | ||
1287 | $i =~ s/^(.*?:.*?:\w+)\(\w+\)/$1/; | ||
1288 | $r{$a} = $s."\\".$i; | ||
1289 | $rsyms{$s} = 1; | ||
292 | } | 1290 | } |
1291 | |||
1292 | foreach $sym (@symbols) { | ||
1293 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; | ||
1294 | next if $i =~ /^.*?:.*?:\w+\(\w+\)/; | ||
1295 | next if defined($rsyms{$sym}); | ||
1296 | die "ERROR: Symbol $sym had no info attached to it." | ||
1297 | if $i eq ""; | ||
1298 | if (!exists $nums{$s}) { | ||
1299 | $new_syms++; | ||
1300 | my $s2 = $s; | ||
1301 | $s2 =~ s/\{[0-9]+\}$//; | ||
1302 | printf OUT "%s%-39s %d\t%s\n","",$s2, ++$start_num,$i; | ||
1303 | if (exists $r{$s}) { | ||
1304 | ($s, $i) = split /\\/,$r{$s}; | ||
1305 | $s =~ s/\{[0-9]+\}$//; | ||
1306 | printf OUT "%s%-39s %d\t%s\n","",$s, $start_num,$i; | ||
1307 | } | ||
1308 | } | ||
1309 | } | ||
1310 | if($new_syms) { | ||
1311 | print STDERR "$new_syms New symbols added\n"; | ||
1312 | } else { | ||
1313 | print STDERR "No New symbols Added\n"; | ||
1314 | } | ||
1315 | } | ||
1316 | |||
1317 | sub check_existing | ||
1318 | { | ||
1319 | (*nums, my @symbols)=@_; | ||
1320 | my %existing; my @remaining; | ||
1321 | @remaining=(); | ||
1322 | foreach $sym (@symbols) { | ||
1323 | (my $s, my $i) = $sym =~ /^(.*?)\\(.*)$/; | ||
1324 | $existing{$s}=1; | ||
1325 | } | ||
1326 | foreach $sym (keys %nums) { | ||
1327 | if (!exists $existing{$sym}) { | ||
1328 | push @remaining, $sym; | ||
1329 | } | ||
1330 | } | ||
1331 | if(@remaining) { | ||
1332 | print STDERR "The following symbols do not seem to exist:\n"; | ||
1333 | foreach $sym (@remaining) { | ||
1334 | print STDERR "\t",$sym,"\n"; | ||
1335 | } | ||
1336 | } | ||
1337 | } | ||
1338 | |||
diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl index 6fa424bd19..29e1404c69 100644 --- a/src/lib/libcrypto/util/mkfiles.pl +++ b/src/lib/libcrypto/util/mkfiles.pl | |||
@@ -10,6 +10,7 @@ my @dirs = ( | |||
10 | ".", | 10 | ".", |
11 | "crypto", | 11 | "crypto", |
12 | "crypto/md2", | 12 | "crypto/md2", |
13 | "crypto/md4", | ||
13 | "crypto/md5", | 14 | "crypto/md5", |
14 | "crypto/sha", | 15 | "crypto/sha", |
15 | "crypto/mdc2", | 16 | "crypto/mdc2", |
@@ -22,10 +23,13 @@ my @dirs = ( | |||
22 | "crypto/idea", | 23 | "crypto/idea", |
23 | "crypto/bf", | 24 | "crypto/bf", |
24 | "crypto/cast", | 25 | "crypto/cast", |
26 | "crypto/aes", | ||
25 | "crypto/bn", | 27 | "crypto/bn", |
26 | "crypto/rsa", | 28 | "crypto/rsa", |
27 | "crypto/dsa", | 29 | "crypto/dsa", |
30 | "crypto/dso", | ||
28 | "crypto/dh", | 31 | "crypto/dh", |
32 | "crypto/ec", | ||
29 | "crypto/buffer", | 33 | "crypto/buffer", |
30 | "crypto/bio", | 34 | "crypto/bio", |
31 | "crypto/stack", | 35 | "crypto/stack", |
@@ -43,8 +47,11 @@ my @dirs = ( | |||
43 | "crypto/pkcs7", | 47 | "crypto/pkcs7", |
44 | "crypto/pkcs12", | 48 | "crypto/pkcs12", |
45 | "crypto/comp", | 49 | "crypto/comp", |
50 | "crypto/engine", | ||
51 | "crypto/ocsp", | ||
52 | "crypto/ui", | ||
53 | "crypto/krb5", | ||
46 | "ssl", | 54 | "ssl", |
47 | "rsaref", | ||
48 | "apps", | 55 | "apps", |
49 | "test", | 56 | "test", |
50 | "tools" | 57 | "tools" |
diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl index de555820ec..9e9c9a5146 100644 --- a/src/lib/libcrypto/util/mklink.pl +++ b/src/lib/libcrypto/util/mklink.pl | |||
@@ -48,8 +48,13 @@ foreach $dirname (@from_path) { | |||
48 | my $to = join('/', @to_path); | 48 | my $to = join('/', @to_path); |
49 | 49 | ||
50 | my $file; | 50 | my $file; |
51 | $symlink_exists=eval {symlink("",""); 1}; | ||
51 | foreach $file (@files) { | 52 | foreach $file (@files) { |
52 | # print "ln -s $to/$file $from/$file\n"; | 53 | my $err = ""; |
53 | symlink("$to/$file", "$from/$file"); | 54 | if ($symlink_exists) { |
54 | print $file . " => $from/$file\n"; | 55 | symlink("$to/$file", "$from/$file") or $err = " [$!]"; |
56 | } else { | ||
57 | system ("cp", "$file", "$from/$file") and $err = " [$!]"; | ||
58 | } | ||
59 | print $file . " => $from/$file$err\n"; | ||
55 | } | 60 | } |
diff --git a/src/lib/libcrypto/util/perlpath.pl b/src/lib/libcrypto/util/perlpath.pl index 9e57e10ad4..a1f236bd98 100644 --- a/src/lib/libcrypto/util/perlpath.pl +++ b/src/lib/libcrypto/util/perlpath.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # modify the '#!/usr/local/bin/perl' | 3 | # modify the '#!/usr/local/bin/perl' |
4 | # line in all scripts that rely on perl. | 4 | # line in all scripts that rely on perl. |
@@ -17,7 +17,12 @@ sub wanted | |||
17 | @a=<IN>; | 17 | @a=<IN>; |
18 | close(IN); | 18 | close(IN); |
19 | 19 | ||
20 | $a[0]="#!$ARGV[0]/perl\n"; | 20 | if (-d $ARGV[0]) { |
21 | $a[0]="#!$ARGV[0]/perl\n"; | ||
22 | } | ||
23 | else { | ||
24 | $a[0]="#!$ARGV[0]\n"; | ||
25 | } | ||
21 | 26 | ||
22 | # Playing it safe... | 27 | # Playing it safe... |
23 | $new="$_.new"; | 28 | $new="$_.new"; |
diff --git a/src/lib/libcrypto/util/pl/BC-16.pl b/src/lib/libcrypto/util/pl/BC-16.pl index 7c3fdb68f4..2033f524ca 100644 --- a/src/lib/libcrypto/util/pl/BC-16.pl +++ b/src/lib/libcrypto/util/pl/BC-16.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries |
3 | # | 3 | # |
4 | 4 | ||
@@ -21,14 +21,14 @@ $lflags="$base_lflags"; | |||
21 | if ($win16) | 21 | if ($win16) |
22 | { | 22 | { |
23 | $shlib=1; | 23 | $shlib=1; |
24 | $cflags.=" -DWINDOWS -DWIN16"; | 24 | $cflags.=" -DOPENSSL_SYSNAME_WIN16"; |
25 | $app_cflag="-W"; | 25 | $app_cflag="-W"; |
26 | $lib_cflag="-WD"; | 26 | $lib_cflag="-WD"; |
27 | $lflags.="/Twe"; | 27 | $lflags.="/Twe"; |
28 | } | 28 | } |
29 | else | 29 | else |
30 | { | 30 | { |
31 | $cflags.=" -DMSDOS"; | 31 | $cflags.=" -DOENSSL_SYSNAME_MSDOS"; |
32 | $lflags.=" /Tde"; | 32 | $lflags.=" /Tde"; |
33 | } | 33 | } |
34 | 34 | ||
@@ -66,18 +66,18 @@ $asm='bcc -c -B -Tml'; | |||
66 | $afile='/o'; | 66 | $afile='/o'; |
67 | if ($no_asm) | 67 | if ($no_asm) |
68 | { | 68 | { |
69 | $bn_mulw_obj=''; | 69 | $bn_asm_obj=''; |
70 | $bn_mulw_src=''; | 70 | $bn_asm_src=''; |
71 | } | 71 | } |
72 | elsif ($asmbits == 32) | 72 | elsif ($asmbits == 32) |
73 | { | 73 | { |
74 | $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; | 74 | $bn_asm_obj='crypto\bn\asm\x86w32.obj'; |
75 | $bn_mulw_src='crypto\bn\asm\x86w32.asm'; | 75 | $bn_asm_src='crypto\bn\asm\x86w32.asm'; |
76 | } | 76 | } |
77 | else | 77 | else |
78 | { | 78 | { |
79 | $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; | 79 | $bn_asm_obj='crypto\bn\asm\x86w16.obj'; |
80 | $bn_mulw_src='crypto\bn\asm\x86w16.asm'; | 80 | $bn_asm_src='crypto\bn\asm\x86w16.asm'; |
81 | } | 81 | } |
82 | 82 | ||
83 | sub do_lib_rule | 83 | sub do_lib_rule |
diff --git a/src/lib/libcrypto/util/pl/BC-32.pl b/src/lib/libcrypto/util/pl/BC-32.pl index 3898d16f61..78d60616a6 100644 --- a/src/lib/libcrypto/util/pl/BC-32.pl +++ b/src/lib/libcrypto/util/pl/BC-32.pl | |||
@@ -1,102 +1,120 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si> |
3 | # | 3 | # |
4 | 4 | ||
5 | $ssl= "ssleay32"; | ||
6 | $crypto="libeay32"; | ||
7 | |||
5 | $o='\\'; | 8 | $o='\\'; |
6 | $cp='copy'; | 9 | $cp='copy'; |
7 | $rm='del'; | 10 | $rm='del'; |
8 | 11 | ||
9 | # C compiler stuff | 12 | # C compiler stuff |
10 | $cc='bcc32'; | 13 | $cc='bcc32'; |
11 | 14 | $lflags="-ap -Tpe -x -Gn "; | |
15 | $mlflags=''; | ||
16 | |||
17 | $out_def="out32"; | ||
18 | $tmp_def="tmp32"; | ||
19 | $inc_def="inc32"; | ||
20 | #enable max error messages, disable most common warnings | ||
21 | $cflags="-DWIN32_LEAN_AND_MEAN -q -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 "; | ||
12 | if ($debug) | 22 | if ($debug) |
13 | { $op="-v "; } | 23 | { |
14 | else { $op="-O "; } | 24 | $cflags.="-Od -y -v -vi- -D_DEBUG"; |
15 | 25 | $mlflags.=' '; | |
16 | $cflags="-d $op -DL_ENDIAN "; | 26 | } |
17 | # I add the stack opt | ||
18 | $base_lflags="-c"; | ||
19 | $lflags="$base_lflags"; | ||
20 | |||
21 | $cflags.=" -DWINDOWS -DWIN32"; | ||
22 | $app_cflag="-WC"; | ||
23 | $lib_cflag="-WC"; | ||
24 | $lflags.=" -Tpe"; | ||
25 | |||
26 | if ($shlib) | ||
27 | { | ||
28 | $mlflags="$base_lflags -Tpe"; # stack if defined in .def file | ||
29 | $libs="libw ldllcew"; | ||
30 | } | ||
31 | else | 27 | else |
32 | { $mlflags=''; } | 28 | { |
29 | $cflags.="-O2 -ff -fp"; | ||
30 | } | ||
33 | 31 | ||
34 | $obj='.obj'; | 32 | $obj='.obj'; |
35 | $ofile="-o"; | 33 | $ofile="-o"; |
36 | 34 | ||
37 | # EXE linking stuff | 35 | # EXE linking stuff |
38 | $link="tlink32"; | 36 | $link="ilink32"; |
39 | $efile=""; | 37 | $efile=""; |
40 | $exep='.exe'; | 38 | $exep='.exe'; |
41 | $ex_libs="CW32.LIB IMPORT32.LIB"; | 39 | if ($no_sock) |
42 | $ex_libs.=$no_sock?"":" wsock32.lib"; | 40 | { $ex_libs=""; } |
43 | $shlib_ex_obj="" if $shlib; | 41 | else { $ex_libs="cw32mt.lib import32.lib"; } |
44 | $app_ex_obj="C0X32.OBJ"; | ||
45 | 42 | ||
46 | # static library stuff | 43 | # static library stuff |
47 | $mklib='tlib'; | 44 | $mklib='tlib /P64'; |
48 | $ranlib=''; | 45 | $ranlib=''; |
49 | $plib=""; | 46 | $plib=""; |
50 | $libp=".lib"; | 47 | $libp=".lib"; |
51 | $shlibp=($shlib)?".dll":".lib"; | 48 | $shlibp=($shlib)?".dll":".lib"; |
52 | $lfile=''; | 49 | $lfile=''; |
53 | 50 | ||
54 | $asm='ml /Cp /c /Cx'; | 51 | $shlib_ex_obj=""; |
52 | $app_ex_obj="c0x32.obj"; | ||
53 | |||
54 | $asm='n_o_T_a_s_m'; | ||
55 | $asm.=" /Zi" if $debug; | ||
55 | $afile='/Fo'; | 56 | $afile='/Fo'; |
56 | if ($noasm) | 57 | |
58 | $bn_mulw_obj=''; | ||
59 | $bn_mulw_src=''; | ||
60 | $des_enc_obj=''; | ||
61 | $des_enc_src=''; | ||
62 | $bf_enc_obj=''; | ||
63 | $bf_enc_src=''; | ||
64 | |||
65 | if (!$no_asm) | ||
57 | { | 66 | { |
58 | $bn_mulw_obj=''; | 67 | $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; |
59 | $bn_mulw_src=''; | 68 | $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; |
69 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; | ||
70 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; | ||
71 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; | ||
72 | $bf_enc_src='crypto\bf\asm\b-win32.asm'; | ||
73 | $cast_enc_obj='crypto\cast\asm\c-win32.obj'; | ||
74 | $cast_enc_src='crypto\cast\asm\c-win32.asm'; | ||
75 | $rc4_enc_obj='crypto\rc4\asm\r4-win32.obj'; | ||
76 | $rc4_enc_src='crypto\rc4\asm\r4-win32.asm'; | ||
77 | $rc5_enc_obj='crypto\rc5\asm\r5-win32.obj'; | ||
78 | $rc5_enc_src='crypto\rc5\asm\r5-win32.asm'; | ||
79 | $md5_asm_obj='crypto\md5\asm\m5-win32.obj'; | ||
80 | $md5_asm_src='crypto\md5\asm\m5-win32.asm'; | ||
81 | $sha1_asm_obj='crypto\sha\asm\s1-win32.obj'; | ||
82 | $sha1_asm_src='crypto\sha\asm\s1-win32.asm'; | ||
83 | $rmd160_asm_obj='crypto\ripemd\asm\rm-win32.obj'; | ||
84 | $rmd160_asm_src='crypto\ripemd\asm\rm-win32.asm'; | ||
85 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM"; | ||
60 | } | 86 | } |
61 | else | 87 | |
88 | if ($shlib) | ||
62 | { | 89 | { |
63 | $bn_mulw_obj='crypto\bn\asm\x86b32.obj'; | 90 | $mlflags.=" $lflags /dll"; |
64 | $bn_mulw_src='crypto\bn\asm\x86m32.asm'; | 91 | # $cflags =~ s| /MD| /MT|; |
92 | $lib_cflag=" /GD -D_WINDLL -D_DLL"; | ||
93 | $out_def="out32dll"; | ||
94 | $tmp_def="tmp32dll"; | ||
65 | } | 95 | } |
66 | 96 | ||
67 | sub do_lib_rule | 97 | sub do_lib_rule |
68 | { | 98 | { |
69 | local($target,$name,$shlib)=@_; | 99 | local($objs,$target,$name,$shlib)=@_; |
70 | local($ret,$Name); | 100 | local($ret,$Name); |
71 | 101 | ||
72 | $taget =~ s/\//$o/g if $o ne '/'; | 102 | $taget =~ s/\//$o/g if $o ne '/'; |
73 | ($Name=$name) =~ tr/a-z/A-Z/; | 103 | ($Name=$name) =~ tr/a-z/A-Z/; |
74 | 104 | ||
75 | $ret.="$target: \$(${Name}OBJ)\n"; | 105 | # $target="\$(LIB_D)$o$target"; |
76 | $ret.="\t\$(RM) \$(O_$Name)\n"; | 106 | $ret.="$target: $objs\n"; |
77 | |||
78 | # Due to a pathetic line length limit, I unwrap the args. | ||
79 | local($lib_names)=""; | ||
80 | local($dll_names)=""; | ||
81 | foreach $_ (sort split(/\s+/,$Vars{"${Name}OBJ"})) | ||
82 | { | ||
83 | $lib_names.=" +$_ &\n"; | ||
84 | $dll_names.=" $_\n"; | ||
85 | } | ||
86 | |||
87 | if (!$shlib) | 107 | if (!$shlib) |
88 | { | 108 | { |
89 | $ret.="\t\$(MKLIB) $target & <<|\n$lib_names\n,\n|\n"; | 109 | # $ret.="\t\$(RM) \$(O_$Name)\n"; |
110 | $ret.="\techo LIB $<\n"; | ||
111 | $ret.="\t&\$(MKLIB) $lfile$target -+\$**\n"; | ||
90 | } | 112 | } |
91 | else | 113 | else |
92 | { | 114 | { |
93 | # $(SHLIB_EX_OBJ) | 115 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; |
94 | local($ex)=($Name eq "SSL")?' $(L_CRYPTO) winsock':""; | 116 | $ex.=' wsock32.lib gdi32.lib'; |
95 | $ret.="\t\$(LINK) \$(MLFLAGS) @&&|\n"; | 117 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; |
96 | $ret.=$dll_names; | ||
97 | $ret.="\n $target\n\n $ex $libs\nms$o${name}16.def;\n|\n"; | ||
98 | ($out_lib=$target) =~ s/O_/L_/; | ||
99 | $ret.="\timplib /nowep $out_lib $target\n\n"; | ||
100 | } | 118 | } |
101 | $ret.="\n"; | 119 | $ret.="\n"; |
102 | return($ret); | 120 | return($ret); |
@@ -105,30 +123,12 @@ sub do_lib_rule | |||
105 | sub do_link_rule | 123 | sub do_link_rule |
106 | { | 124 | { |
107 | local($target,$files,$dep_libs,$libs)=@_; | 125 | local($target,$files,$dep_libs,$libs)=@_; |
108 | local($ret,$f,$_,@f); | 126 | local($ret,$_); |
109 | 127 | ||
110 | $file =~ s/\//$o/g if $o ne '/'; | 128 | $file =~ s/\//$o/g if $o ne '/'; |
111 | $n=&bname($targer); | 129 | $n=&bname($targer); |
112 | $ret.="$target: $files $dep_libs\n"; | 130 | $ret.="$target: $files $dep_libs\n"; |
113 | $ret.=" \$(LINK) @&&|"; | 131 | $ret.="\t\$(LINK) \$(LFLAGS) $files \$(APP_EX_OBJ), $target,, $libs\n\n"; |
114 | |||
115 | # Due to a pathetic line length limit, I have to unwrap the args. | ||
116 | $r=" \$(LFLAGS) "; | ||
117 | if ($files =~ /\(([^)]*)\)$/) | ||
118 | { | ||
119 | @a=('$(APP_EX_OBJ)'); | ||
120 | push(@a,sort split(/\s+/,$Vars{$1})); | ||
121 | foreach $_ (@a) | ||
122 | { | ||
123 | $ret.="\n $r $_ +"; | ||
124 | $r=""; | ||
125 | } | ||
126 | chop($ret); | ||
127 | $ret.="\n"; | ||
128 | } | ||
129 | else | ||
130 | { $ret.="\n $r \$(APP_EX_OBJ) $files\n"; } | ||
131 | $ret.=" $target\n\n $libs\n\n|\n\n"; | ||
132 | return($ret); | 132 | return($ret); |
133 | } | 133 | } |
134 | 134 | ||
diff --git a/src/lib/libcrypto/util/pl/Mingw32.pl b/src/lib/libcrypto/util/pl/Mingw32.pl index 84c2a22db3..45ab685974 100644 --- a/src/lib/libcrypto/util/pl/Mingw32.pl +++ b/src/lib/libcrypto/util/pl/Mingw32.pl | |||
@@ -17,9 +17,35 @@ $mkdir='gmkdir'; | |||
17 | 17 | ||
18 | $cc='gcc'; | 18 | $cc='gcc'; |
19 | if ($debug) | 19 | if ($debug) |
20 | { $cflags="-g2 -ggdb"; } | 20 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -g2 -ggdb"; } |
21 | else | 21 | else |
22 | { $cflags="-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall"; } | 22 | { $cflags="-DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3 -m486 -Wall"; } |
23 | |||
24 | if ($gaswin and !$no_asm) | ||
25 | { | ||
26 | $bn_asm_obj='$(OBJ_D)/bn-win32.o'; | ||
27 | $bn_asm_src='crypto/bn/asm/bn-win32.s'; | ||
28 | $bnco_asm_obj='$(OBJ_D)/co-win32.o'; | ||
29 | $bnco_asm_src='crypto/bn/asm/co-win32.s'; | ||
30 | $des_enc_obj='$(OBJ_D)/d-win32.o $(OBJ_D)/y-win32.o'; | ||
31 | $des_enc_src='crypto/des/asm/d-win32.s crypto/des/asm/y-win32.s'; | ||
32 | $bf_enc_obj='$(OBJ_D)/b-win32.o'; | ||
33 | $bf_enc_src='crypto/bf/asm/b-win32.s'; | ||
34 | # $cast_enc_obj='$(OBJ_D)/c-win32.o'; | ||
35 | # $cast_enc_src='crypto/cast/asm/c-win32.s'; | ||
36 | $rc4_enc_obj='$(OBJ_D)/r4-win32.o'; | ||
37 | $rc4_enc_src='crypto/rc4/asm/r4-win32.s'; | ||
38 | $rc5_enc_obj='$(OBJ_D)/r5-win32.o'; | ||
39 | $rc5_enc_src='crypto/rc5/asm/r5-win32.s'; | ||
40 | $md5_asm_obj='$(OBJ_D)/m5-win32.o'; | ||
41 | $md5_asm_src='crypto/md5/asm/m5-win32.s'; | ||
42 | $rmd160_asm_obj='$(OBJ_D)/rm-win32.o'; | ||
43 | $rmd160_asm_src='crypto/ripemd/asm/rm-win32.s'; | ||
44 | $sha1_asm_obj='$(OBJ_D)/s1-win32.o'; | ||
45 | $sha1_asm_src='crypto/sha/asm/s1-win32.s'; | ||
46 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; | ||
47 | } | ||
48 | |||
23 | 49 | ||
24 | $obj='.o'; | 50 | $obj='.o'; |
25 | $ofile='-o '; | 51 | $ofile='-o '; |
@@ -42,12 +68,12 @@ $lfile=''; | |||
42 | 68 | ||
43 | $asm='as'; | 69 | $asm='as'; |
44 | $afile='-o '; | 70 | $afile='-o '; |
45 | $bn_asm_obj=""; | 71 | #$bn_asm_obj=""; |
46 | $bn_asm_src=""; | 72 | #$bn_asm_src=""; |
47 | $des_enc_obj=""; | 73 | #$des_enc_obj=""; |
48 | $des_enc_src=""; | 74 | #$des_enc_src=""; |
49 | $bf_enc_obj=""; | 75 | #$bf_enc_obj=""; |
50 | $bf_enc_src=""; | 76 | #$bf_enc_src=""; |
51 | 77 | ||
52 | sub do_lib_rule | 78 | sub do_lib_rule |
53 | { | 79 | { |
@@ -76,4 +102,3 @@ sub do_link_rule | |||
76 | return($ret); | 102 | return($ret); |
77 | } | 103 | } |
78 | 1; | 104 | 1; |
79 | |||
diff --git a/src/lib/libcrypto/util/pl/VC-16.pl b/src/lib/libcrypto/util/pl/VC-16.pl index a6e6c0241c..7cda5e67a9 100644 --- a/src/lib/libcrypto/util/pl/VC-16.pl +++ b/src/lib/libcrypto/util/pl/VC-16.pl | |||
@@ -1,10 +1,9 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries | 2 | # VCw16lib.pl - the file for Visual C++ 1.52b for windows, static libraries |
3 | # | 3 | # |
4 | 4 | ||
5 | $ssl= "ssleay16"; | 5 | $ssl= "ssleay16"; |
6 | $crypto="libeay16"; | 6 | $crypto="libeay16"; |
7 | $RSAref="RSAref16"; | ||
8 | 7 | ||
9 | $o='\\'; | 8 | $o='\\'; |
10 | $cp='copy'; | 9 | $cp='copy'; |
@@ -34,7 +33,7 @@ $lflags="$base_lflags /STACK:20000"; | |||
34 | 33 | ||
35 | if ($win16) | 34 | if ($win16) |
36 | { | 35 | { |
37 | $cflags.=" -DWINDOWS -DWIN16"; | 36 | $cflags.=" -DOPENSSL_SYSNAME_WIN16"; |
38 | $app_cflag="/Gw /FPi87"; | 37 | $app_cflag="/Gw /FPi87"; |
39 | $lib_cflag="/Gw"; | 38 | $lib_cflag="/Gw"; |
40 | $lib_cflag.=" -D_WINDLL -D_DLL" if $shlib; | 39 | $lib_cflag.=" -D_WINDLL -D_DLL" if $shlib; |
@@ -84,8 +83,8 @@ $lfile=''; | |||
84 | $asm='ml /Cp /c /Cx'; | 83 | $asm='ml /Cp /c /Cx'; |
85 | $afile='/Fo'; | 84 | $afile='/Fo'; |
86 | 85 | ||
87 | $bn_mulw_obj=''; | 86 | $bn_asm_obj=''; |
88 | $bn_mulw_src=''; | 87 | $bn_asm_src=''; |
89 | $des_enc_obj=''; | 88 | $des_enc_obj=''; |
90 | $des_enc_src=''; | 89 | $des_enc_src=''; |
91 | $bf_enc_obj=''; | 90 | $bf_enc_obj=''; |
@@ -95,13 +94,13 @@ if (!$no_asm) | |||
95 | { | 94 | { |
96 | if ($asmbits == 32) | 95 | if ($asmbits == 32) |
97 | { | 96 | { |
98 | $bn_mulw_obj='crypto\bn\asm\x86w32.obj'; | 97 | $bn_asm_obj='crypto\bn\asm\x86w32.obj'; |
99 | $bn_mulw_src='crypto\bn\asm\x86w32.asm'; | 98 | $bn_asm_src='crypto\bn\asm\x86w32.asm'; |
100 | } | 99 | } |
101 | else | 100 | else |
102 | { | 101 | { |
103 | $bn_mulw_obj='crypto\bn\asm\x86w16.obj'; | 102 | $bn_asm_obj='crypto\bn\asm\x86w16.obj'; |
104 | $bn_mulw_src='crypto\bn\asm\x86w16.asm'; | 103 | $bn_asm_src='crypto\bn\asm\x86w16.asm'; |
105 | } | 104 | } |
106 | } | 105 | } |
107 | 106 | ||
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl index 701e282c33..50bfb34385 100644 --- a/src/lib/libcrypto/util/pl/VC-32.pl +++ b/src/lib/libcrypto/util/pl/VC-32.pl | |||
@@ -1,18 +1,17 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries | 2 | # VCw32lib.pl - the file for Visual C++ 4.[01] for windows NT, static libraries |
3 | # | 3 | # |
4 | 4 | ||
5 | $ssl= "ssleay32"; | 5 | $ssl= "ssleay32"; |
6 | $crypto="libeay32"; | 6 | $crypto="libeay32"; |
7 | $RSAref="RSAref32"; | ||
8 | 7 | ||
9 | $o='\\'; | 8 | $o='\\'; |
10 | $cp='copy'; | 9 | $cp='copy nul+'; # Timestamps get stuffed otherwise |
11 | $rm='del'; | 10 | $rm='del'; |
12 | 11 | ||
13 | # C compiler stuff | 12 | # C compiler stuff |
14 | $cc='cl'; | 13 | $cc='cl'; |
15 | $cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN'; | 14 | $cflags=' /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32'; |
16 | $lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; | 15 | $lflags="/nologo /subsystem:console /machine:I386 /opt:ref"; |
17 | $mlflags=''; | 16 | $mlflags=''; |
18 | 17 | ||
@@ -22,10 +21,11 @@ $inc_def="inc32"; | |||
22 | 21 | ||
23 | if ($debug) | 22 | if ($debug) |
24 | { | 23 | { |
25 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DWINDOWS -DWIN32 -D_DEBUG -DL_ENDIAN"; | 24 | $cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DOPENSSL_SYSNAME_WIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32"; |
26 | $lflags.=" /debug"; | 25 | $lflags.=" /debug"; |
27 | $mlflags.=' /debug'; | 26 | $mlflags.=' /debug'; |
28 | } | 27 | } |
28 | $cflags .= " -DOPENSSL_SYSNAME_WINNT" if $NT == 1; | ||
29 | 29 | ||
30 | $obj='.obj'; | 30 | $obj='.obj'; |
31 | $ofile="/Fo"; | 31 | $ofile="/Fo"; |
@@ -48,13 +48,17 @@ $lfile='/out:'; | |||
48 | 48 | ||
49 | $shlib_ex_obj=""; | 49 | $shlib_ex_obj=""; |
50 | $app_ex_obj="setargv.obj"; | 50 | $app_ex_obj="setargv.obj"; |
51 | 51 | if ($nasm) { | |
52 | $asm='ml /Cp /coff /c /Cx'; | 52 | $asm='nasmw -f win32'; |
53 | $asm.=" /Zi" if $debug; | 53 | $afile='-o '; |
54 | $afile='/Fo'; | 54 | } else { |
55 | 55 | $asm='ml /Cp /coff /c /Cx'; | |
56 | $bn_mulw_obj=''; | 56 | $asm.=" /Zi" if $debug; |
57 | $bn_mulw_src=''; | 57 | $afile='/Fo'; |
58 | } | ||
59 | |||
60 | $bn_asm_obj=''; | ||
61 | $bn_asm_src=''; | ||
58 | $des_enc_obj=''; | 62 | $des_enc_obj=''; |
59 | $des_enc_src=''; | 63 | $des_enc_src=''; |
60 | $bf_enc_obj=''; | 64 | $bf_enc_obj=''; |
@@ -62,8 +66,8 @@ $bf_enc_src=''; | |||
62 | 66 | ||
63 | if (!$no_asm) | 67 | if (!$no_asm) |
64 | { | 68 | { |
65 | $bn_mulw_obj='crypto\bn\asm\bn-win32.obj'; | 69 | $bn_asm_obj='crypto\bn\asm\bn-win32.obj'; |
66 | $bn_mulw_src='crypto\bn\asm\bn-win32.asm'; | 70 | $bn_asm_src='crypto\bn\asm\bn-win32.asm'; |
67 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; | 71 | $des_enc_obj='crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj'; |
68 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; | 72 | $des_enc_src='crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm'; |
69 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; | 73 | $bf_enc_obj='crypto\bf\asm\b-win32.obj'; |
@@ -87,11 +91,13 @@ if ($shlib) | |||
87 | { | 91 | { |
88 | $mlflags.=" $lflags /dll"; | 92 | $mlflags.=" $lflags /dll"; |
89 | # $cflags =~ s| /MD| /MT|; | 93 | # $cflags =~ s| /MD| /MT|; |
90 | $lib_cflag=" /GD -D_WINDLL -D_DLL"; | 94 | $lib_cflag=" -D_WINDLL -D_DLL"; |
91 | $out_def="out32dll"; | 95 | $out_def="out32dll"; |
92 | $tmp_def="tmp32dll"; | 96 | $tmp_def="tmp32dll"; |
93 | } | 97 | } |
94 | 98 | ||
99 | $cflags.=" /Fd$out_def"; | ||
100 | |||
95 | sub do_lib_rule | 101 | sub do_lib_rule |
96 | { | 102 | { |
97 | local($objs,$target,$name,$shlib)=@_; | 103 | local($objs,$target,$name,$shlib)=@_; |
@@ -105,12 +111,13 @@ sub do_lib_rule | |||
105 | if (!$shlib) | 111 | if (!$shlib) |
106 | { | 112 | { |
107 | # $ret.="\t\$(RM) \$(O_$Name)\n"; | 113 | # $ret.="\t\$(RM) \$(O_$Name)\n"; |
108 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; | 114 | $ex =' advapi32.lib'; |
115 | $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs $ex\n<<\n"; | ||
109 | } | 116 | } |
110 | else | 117 | else |
111 | { | 118 | { |
112 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; | 119 | local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':''; |
113 | $ex.=' wsock32.lib gdi32.lib'; | 120 | $ex.=' wsock32.lib gdi32.lib advapi32.lib'; |
114 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; | 121 | $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n"; |
115 | } | 122 | } |
116 | $ret.="\n"; | 123 | $ret.="\n"; |
diff --git a/src/lib/libcrypto/util/pl/linux.pl b/src/lib/libcrypto/util/pl/linux.pl index 2b13da1bfc..8924ed5480 100644 --- a/src/lib/libcrypto/util/pl/linux.pl +++ b/src/lib/libcrypto/util/pl/linux.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # linux.pl - the standard unix makefile stuff. | 3 | # linux.pl - the standard unix makefile stuff. |
4 | # | 4 | # |
@@ -12,13 +12,17 @@ $rm='/bin/rm -f'; | |||
12 | $cc='gcc'; | 12 | $cc='gcc'; |
13 | if ($debug) | 13 | if ($debug) |
14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } | 14 | { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; } |
15 | elsif ($profile) | ||
16 | { $cflags="-pg -O3"; } | ||
15 | else | 17 | else |
16 | { $cflags="-O3 -fomit-frame-pointer"; } | 18 | { $cflags="-O3 -fomit-frame-pointer"; } |
17 | 19 | ||
18 | if (!$no_asm) | 20 | if (!$no_asm) |
19 | { | 21 | { |
20 | $bn_mulw_obj='$(OBJ_D)/bn86-elf.o'; | 22 | $bn_asm_obj='$(OBJ_D)/bn86-elf.o'; |
21 | $bn_mulw_src='crypto/bn/asm/bn86unix.cpp'; | 23 | $bn_asm_src='crypto/bn/asm/bn86unix.cpp'; |
24 | $bnco_asm_obj='$(OBJ_D)/co86-elf.o'; | ||
25 | $bnco_asm_src='crypto/bn/asm/co86unix.cpp'; | ||
22 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; | 26 | $des_enc_obj='$(OBJ_D)/dx86-elf.o $(OBJ_D)/yx86-elf.o'; |
23 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; | 27 | $des_enc_src='crypto/des/asm/dx86unix.cpp crypto/des/asm/yx86unix.cpp'; |
24 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; | 28 | $bf_enc_obj='$(OBJ_D)/bx86-elf.o'; |
@@ -27,8 +31,12 @@ if (!$no_asm) | |||
27 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; | 31 | $cast_enc_src='crypto/cast/asm/cx86unix.cpp'; |
28 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; | 32 | $rc4_enc_obj='$(OBJ_D)/rx86-elf.o'; |
29 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; | 33 | $rc4_enc_src='crypto/rc4/asm/rx86unix.cpp'; |
34 | $rc5_enc_obj='$(OBJ_D)/r586-elf.o'; | ||
35 | $rc5_enc_src='crypto/rc5/asm/r586unix.cpp'; | ||
30 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; | 36 | $md5_asm_obj='$(OBJ_D)/mx86-elf.o'; |
31 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; | 37 | $md5_asm_src='crypto/md5/asm/mx86unix.cpp'; |
38 | $rmd160_asm_obj='$(OBJ_D)/rm86-elf.o'; | ||
39 | $rmd160_asm_src='crypto/ripemd/asm/rm86unix.cpp'; | ||
32 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; | 40 | $sha1_asm_obj='$(OBJ_D)/sx86-elf.o'; |
33 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; | 41 | $sha1_asm_src='crypto/sha/asm/sx86unix.cpp'; |
34 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; | 42 | $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM"; |
@@ -51,9 +59,9 @@ sub do_shlib_rule | |||
51 | $target =~ s/\//$o/g if $o ne '/'; | 59 | $target =~ s/\//$o/g if $o ne '/'; |
52 | ($Name=$name) =~ tr/a-z/A-Z/; | 60 | ($Name=$name) =~ tr/a-z/A-Z/; |
53 | 61 | ||
54 | $ret.="\$(LIB_D)$o$target: \$(${Name}OBJ)\n"; | 62 | $ret.="$target: \$(${Name}OBJ)\n"; |
55 | $ret.="\t\$(RM) \$(LIB_D)$o$target\n"; | 63 | $ret.="\t\$(RM) target\n"; |
56 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o \$(LIB_D)$o$target \$(${Name}OBJ)\n"; | 64 | $ret.="\tgcc \${CFLAGS} -shared -Wl,-soname,$target -o $target \$(${Name}OBJ)\n"; |
57 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; | 65 | ($t=$target) =~ s/(^.*)\/[^\/]*$/$1/; |
58 | if ($so_name ne "") | 66 | if ($so_name ne "") |
59 | { | 67 | { |
diff --git a/src/lib/libcrypto/util/pl/unix.pl b/src/lib/libcrypto/util/pl/unix.pl index ab4978fd20..146611ad99 100644 --- a/src/lib/libcrypto/util/pl/unix.pl +++ b/src/lib/libcrypto/util/pl/unix.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # unix.pl - the standard unix makefile stuff. | 3 | # unix.pl - the standard unix makefile stuff. |
4 | # | 4 | # |
@@ -38,7 +38,7 @@ $ex_libs=""; | |||
38 | # static library stuff | 38 | # static library stuff |
39 | $mklib='ar r'; | 39 | $mklib='ar r'; |
40 | $mlflags=''; | 40 | $mlflags=''; |
41 | $ranlib='util/ranlib.sh'; | 41 | $ranlib=&which("ranlib") or $ranlib="true"; |
42 | $plib='lib'; | 42 | $plib='lib'; |
43 | $libp=".a"; | 43 | $libp=".a"; |
44 | $shlibp=".a"; | 44 | $shlibp=".a"; |
@@ -46,8 +46,8 @@ $lfile=''; | |||
46 | 46 | ||
47 | $asm='as'; | 47 | $asm='as'; |
48 | $afile='-o '; | 48 | $afile='-o '; |
49 | $bn_mulw_obj=""; | 49 | $bn_asm_obj=""; |
50 | $bn_mulw_src=""; | 50 | $bn_asm_src=""; |
51 | $des_enc_obj=""; | 51 | $des_enc_obj=""; |
52 | $des_enc_src=""; | 52 | $des_enc_src=""; |
53 | $bf_enc_obj=""; | 53 | $bf_enc_obj=""; |
@@ -59,7 +59,7 @@ sub do_lib_rule | |||
59 | local($ret,$_,$Name); | 59 | local($ret,$_,$Name); |
60 | 60 | ||
61 | $target =~ s/\//$o/g if $o ne '/'; | 61 | $target =~ s/\//$o/g if $o ne '/'; |
62 | $target="\$(LIB_D)$o$target"; | 62 | $target="$target"; |
63 | ($Name=$name) =~ tr/a-z/A-Z/; | 63 | ($Name=$name) =~ tr/a-z/A-Z/; |
64 | 64 | ||
65 | $ret.="$target: \$(${Name}OBJ)\n"; | 65 | $ret.="$target: \$(${Name}OBJ)\n"; |
@@ -80,4 +80,17 @@ sub do_link_rule | |||
80 | return($ret); | 80 | return($ret); |
81 | } | 81 | } |
82 | 82 | ||
83 | sub which | ||
84 | { | ||
85 | my ($name)=@_; | ||
86 | my $path; | ||
87 | foreach $path (split /:/, $ENV{PATH}) | ||
88 | { | ||
89 | if (-x "$path/$name") | ||
90 | { | ||
91 | return "$path/$name"; | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | |||
83 | 1; | 96 | 1; |
diff --git a/src/lib/libcrypto/util/pod2man.pl b/src/lib/libcrypto/util/pod2man.pl index f5ec0767ed..657e4e264e 100644 --- a/src/lib/libcrypto/util/pod2man.pl +++ b/src/lib/libcrypto/util/pod2man.pl | |||
@@ -416,6 +416,8 @@ if ($name ne 'something') { | |||
416 | warn "$0: Improper man page - malformed NAME header in paragraph $. of $ARGV[0]\n" | 416 | warn "$0: Improper man page - malformed NAME header in paragraph $. of $ARGV[0]\n" |
417 | } | 417 | } |
418 | else { | 418 | else { |
419 | $n[0] =~ s/\n/ /g; | ||
420 | $n[1] =~ s/\n/ /g; | ||
419 | %namedesc = @n; | 421 | %namedesc = @n; |
420 | } | 422 | } |
421 | } | 423 | } |
diff --git a/src/lib/libcrypto/util/pod2mantest b/src/lib/libcrypto/util/pod2mantest new file mode 100644 index 0000000000..79aefafac0 --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest | |||
@@ -0,0 +1,53 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This script is used by test/Makefile.ssl to check whether a sane 'pod2man' | ||
4 | # is installed. | ||
5 | # ('make install' should not try to run 'pod2man' if it does not exist or if | ||
6 | # it is a broken 'pod2man' version that is known to cause trouble. if we find | ||
7 | # the system 'pod2man' to be broken, we use our own copy instead) | ||
8 | # | ||
9 | # In any case, output an appropriate command line for running (or not | ||
10 | # running) pod2man. | ||
11 | |||
12 | |||
13 | IFS=: | ||
14 | try_without_dir=true | ||
15 | # First we try "pod2man", then "$dir/pod2man" for each item in $PATH. | ||
16 | for dir in dummy:$PATH; do | ||
17 | if [ "$try_without_dir" = true ]; then | ||
18 | # first iteration | ||
19 | pod2man=pod2man | ||
20 | try_without_dir=false | ||
21 | else | ||
22 | # second and later iterations | ||
23 | pod2man="$dir/pod2man" | ||
24 | if [ ! -f "$pod2man" ]; then # '-x' is not available on Ultrix | ||
25 | pod2man='' | ||
26 | fi | ||
27 | fi | ||
28 | |||
29 | if [ ! "$pod2man" = '' ]; then | ||
30 | failure=none | ||
31 | |||
32 | |||
33 | if "$pod2man" --section=1 --center=OpenSSL --release=dev pod2mantest.pod | grep '^MARKER - ' >/dev/null 2>&1; then | ||
34 | failure=MultilineTest | ||
35 | fi | ||
36 | |||
37 | |||
38 | if [ "$failure" = none ]; then | ||
39 | echo "$pod2man" | ||
40 | exit 0 | ||
41 | fi | ||
42 | |||
43 | echo "$pod2man does not work properly ('$failure' failed). Looking for another pod2man ..." >&2 | ||
44 | fi | ||
45 | done | ||
46 | |||
47 | echo "No working pod2man found. Consider installing a new version." >&2 | ||
48 | if [ "$1" = ignore ]; then | ||
49 | echo "As a workaround, we'll use a bundled old copy of pod2man.pl." >&2 | ||
50 | echo "util/pod2man.pl" | ||
51 | exit 0 | ||
52 | fi | ||
53 | exit 1 | ||
diff --git a/src/lib/libcrypto/util/pod2mantest.pod b/src/lib/libcrypto/util/pod2mantest.pod new file mode 100644 index 0000000000..5d2539a17f --- /dev/null +++ b/src/lib/libcrypto/util/pod2mantest.pod | |||
@@ -0,0 +1,15 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | foo, bar, | ||
6 | MARKER - test of multiline name section | ||
7 | |||
8 | =head1 DESCRIPTION | ||
9 | |||
10 | This is a test .pod file to see if we have a buggy pod2man or not. | ||
11 | If we have a buggy implementation, we will get a line matching the | ||
12 | regular expression "^ +MARKER - test of multiline name section *$" | ||
13 | at the end of the resulting document. | ||
14 | |||
15 | =cut | ||
diff --git a/src/lib/libcrypto/util/point.sh b/src/lib/libcrypto/util/point.sh index 92c12e8282..47543c88e2 100644 --- a/src/lib/libcrypto/util/point.sh +++ b/src/lib/libcrypto/util/point.sh | |||
@@ -1,4 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | /bin/rm -f $2 | 3 | rm -f $2 |
4 | ln -s $1 $2 | 4 | ln -s $1 $2 |
5 | echo "$2 => $1" | ||
6 | |||
diff --git a/src/lib/libcrypto/util/selftest.pl b/src/lib/libcrypto/util/selftest.pl index 91e962a312..276b81183d 100644 --- a/src/lib/libcrypto/util/selftest.pl +++ b/src/lib/libcrypto/util/selftest.pl | |||
@@ -19,13 +19,14 @@ my $ok=0; | |||
19 | my $cc="cc"; | 19 | my $cc="cc"; |
20 | my $cversion="??"; | 20 | my $cversion="??"; |
21 | my $sep="-----------------------------------------------------------------------------\n"; | 21 | my $sep="-----------------------------------------------------------------------------\n"; |
22 | my $not_our_fault="\nPlease ask your system administrator/vendor for more information.\n[Problems with your operating system setup should not be reported\nto the OpenSSL project.]\n"; | ||
22 | 23 | ||
23 | open(OUT,">$report") or die; | 24 | open(OUT,">$report") or die; |
24 | 25 | ||
25 | print OUT "OpenSSL self-test report:\n\n"; | 26 | print OUT "OpenSSL self-test report:\n\n"; |
26 | 27 | ||
27 | $uname=`uname -a`; | 28 | $uname=`uname -a`; |
28 | $uname="??" if $uname eq ""; | 29 | $uname="??\n" if $uname eq ""; |
29 | 30 | ||
30 | $c=`sh config -t`; | 31 | $c=`sh config -t`; |
31 | foreach $_ (split("\n",$c)) { | 32 | foreach $_ (split("\n",$c)) { |
@@ -49,6 +50,7 @@ if (open(IN,"<Makefile.ssl")) { | |||
49 | 50 | ||
50 | $cversion=`$cc -v 2>&1`; | 51 | $cversion=`$cc -v 2>&1`; |
51 | $cversion=`$cc -V 2>&1` if $cversion =~ "usage"; | 52 | $cversion=`$cc -V 2>&1` if $cversion =~ "usage"; |
53 | $cversion=`$cc -V |head -1` if $cversion =~ "Error"; | ||
52 | $cversion=`$cc --version` if $cversion eq ""; | 54 | $cversion=`$cc --version` if $cversion eq ""; |
53 | $cversion =~ s/Reading specs.*\n//; | 55 | $cversion =~ s/Reading specs.*\n//; |
54 | $cversion =~ s/usage.*\n//; | 56 | $cversion =~ s/usage.*\n//; |
@@ -56,7 +58,7 @@ chomp $cversion; | |||
56 | 58 | ||
57 | if (open(IN,"<CHANGES")) { | 59 | if (open(IN,"<CHANGES")) { |
58 | while(<IN>) { | 60 | while(<IN>) { |
59 | if (/\*\) (.{0,55})/) { | 61 | if (/\*\) (.{0,55})/ && !/applies to/) { |
60 | $last=$1; | 62 | $last=$1; |
61 | last; | 63 | last; |
62 | } | 64 | } |
@@ -76,11 +78,18 @@ print OUT "\n"; | |||
76 | 78 | ||
77 | print "Checking compiler...\n"; | 79 | print "Checking compiler...\n"; |
78 | if (open(TEST,">cctest.c")) { | 80 | if (open(TEST,">cctest.c")) { |
79 | print TEST "#include <stdio.h>\nmain(){printf(\"Hello world\\n\");}\n"; | 81 | print TEST "#include <stdio.h>\n#include <errno.h>\nmain(){printf(\"Hello world\\n\");}\n"; |
80 | close(TEST); | 82 | close(TEST); |
81 | system("$cc -o cctest cctest.c"); | 83 | system("$cc -o cctest cctest.c"); |
82 | if (`./cctest` !~ /Hello world/) { | 84 | if (`./cctest` !~ /Hello world/) { |
83 | print OUT "Compiler doesn't work.\n"; | 85 | print OUT "Compiler doesn't work.\n"; |
86 | print OUT $not_our_fault; | ||
87 | goto err; | ||
88 | } | ||
89 | system("ar r cctest.a /dev/null"); | ||
90 | if (not -f "cctest.a") { | ||
91 | print OUT "Check your archive tool (ar).\n"; | ||
92 | print OUT $not_our_fault; | ||
84 | goto err; | 93 | goto err; |
85 | } | 94 | } |
86 | } else { | 95 | } else { |
@@ -97,6 +106,7 @@ if (open(TEST,">cctest.c")) { | |||
97 | } else { | 106 | } else { |
98 | print OUT "Can't compile test program!\n"; | 107 | print OUT "Can't compile test program!\n"; |
99 | } | 108 | } |
109 | print OUT $not_our_fault; | ||
100 | goto err; | 110 | goto err; |
101 | } | 111 | } |
102 | } else { | 112 | } else { |
@@ -122,6 +132,8 @@ if (system("make 2>&1 | tee make.log") > 255) { | |||
122 | 132 | ||
123 | $_=$options; | 133 | $_=$options; |
124 | s/no-asm//; | 134 | s/no-asm//; |
135 | s/no-shared//; | ||
136 | s/no-krb5//; | ||
125 | if (/no-/) | 137 | if (/no-/) |
126 | { | 138 | { |
127 | print OUT "Test skipped.\n"; | 139 | print OUT "Test skipped.\n"; |
@@ -129,14 +141,14 @@ if (/no-/) | |||
129 | } | 141 | } |
130 | 142 | ||
131 | print "Running make test...\n"; | 143 | print "Running make test...\n"; |
132 | if (system("make test 2>&1 | tee make.log") > 255) | 144 | if (system("make test 2>&1 | tee maketest.log") > 255) |
133 | { | 145 | { |
134 | print OUT "make test failed!\n"; | 146 | print OUT "make test failed!\n"; |
135 | } else { | 147 | } else { |
136 | $ok=1; | 148 | $ok=1; |
137 | } | 149 | } |
138 | 150 | ||
139 | if ($ok and open(IN,"<make.log")) { | 151 | if ($ok and open(IN,"<maketest.log")) { |
140 | while (<IN>) { | 152 | while (<IN>) { |
141 | $ok=2 if /^platform: $platform/; | 153 | $ok=2 if /^platform: $platform/; |
142 | } | 154 | } |
@@ -155,6 +167,15 @@ if ($ok != 2) { | |||
155 | } else { | 167 | } else { |
156 | print OUT "make.log not found!\n"; | 168 | print OUT "make.log not found!\n"; |
157 | } | 169 | } |
170 | if (open(IN,"<maketest.log")) { | ||
171 | while (<IN>) { | ||
172 | print OUT; | ||
173 | } | ||
174 | close(IN); | ||
175 | print OUT $sep; | ||
176 | } else { | ||
177 | print OUT "maketest.log not found!\n"; | ||
178 | } | ||
158 | } else { | 179 | } else { |
159 | print OUT "Test passed.\n"; | 180 | print OUT "Test passed.\n"; |
160 | } | 181 | } |
diff --git a/src/lib/libcrypto/util/sp-diff.pl b/src/lib/libcrypto/util/sp-diff.pl index 2c88336858..9d6c60387f 100644 --- a/src/lib/libcrypto/util/sp-diff.pl +++ b/src/lib/libcrypto/util/sp-diff.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | # | 2 | # |
3 | # This file takes as input, the files that have been output from | 3 | # This file takes as input, the files that have been output from |
4 | # ssleay speed. | 4 | # ssleay speed. |
@@ -11,7 +11,7 @@ | |||
11 | %two=&loadfile($ARGV[1]); | 11 | %two=&loadfile($ARGV[1]); |
12 | 12 | ||
13 | $line=0; | 13 | $line=0; |
14 | foreach $a ("md2","md5","sha","sha1","rc4","des cfb","des cbc","des ede3", | 14 | foreach $a ("md2","md4","md5","sha","sha1","rc4","des cfb","des cbc","des ede3", |
15 | "idea cfb","idea cbc","rc2 cfb","rc2 cbc","blowfish cbc","cast cbc") | 15 | "idea cfb","idea cbc","rc2 cfb","rc2 cbc","blowfish cbc","cast cbc") |
16 | { | 16 | { |
17 | if (defined($one{$a,8}) && defined($two{$a,8})) | 17 | if (defined($one{$a,8}) && defined($two{$a,8})) |
diff --git a/src/lib/libcrypto/util/src-dep.pl b/src/lib/libcrypto/util/src-dep.pl index 91242f7bb6..ad997e4746 100644 --- a/src/lib/libcrypto/util/src-dep.pl +++ b/src/lib/libcrypto/util/src-dep.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | # we make up an array of | 3 | # we make up an array of |
4 | # $file{function_name}=filename; | 4 | # $file{function_name}=filename; |
diff --git a/src/lib/libcrypto/util/ssleay.num b/src/lib/libcrypto/util/ssleay.num index 359fa15df1..fdea47205d 100644 --- a/src/lib/libcrypto/util/ssleay.num +++ b/src/lib/libcrypto/util/ssleay.num | |||
@@ -1,156 +1,217 @@ | |||
1 | ERR_load_SSL_strings 1 | 1 | ERR_load_SSL_strings 1 EXIST::FUNCTION: |
2 | SSL_CIPHER_description 2 | 2 | SSL_CIPHER_description 2 EXIST::FUNCTION: |
3 | SSL_CTX_add_client_CA 3 | 3 | SSL_CTX_add_client_CA 3 EXIST::FUNCTION: |
4 | SSL_CTX_add_session 4 | 4 | SSL_CTX_add_session 4 EXIST::FUNCTION: |
5 | SSL_CTX_check_private_key 5 | 5 | SSL_CTX_check_private_key 5 EXIST::FUNCTION: |
6 | SSL_CTX_ctrl 6 | 6 | SSL_CTX_ctrl 6 EXIST::FUNCTION: |
7 | SSL_CTX_flush_sessions 7 | 7 | SSL_CTX_flush_sessions 7 EXIST::FUNCTION: |
8 | SSL_CTX_free 8 | 8 | SSL_CTX_free 8 EXIST::FUNCTION: |
9 | SSL_CTX_get_client_CA_list 9 | 9 | SSL_CTX_get_client_CA_list 9 EXIST::FUNCTION: |
10 | SSL_CTX_get_verify_callback 10 | 10 | SSL_CTX_get_verify_callback 10 EXIST::FUNCTION: |
11 | SSL_CTX_get_verify_mode 11 | 11 | SSL_CTX_get_verify_mode 11 EXIST::FUNCTION: |
12 | SSL_CTX_new 12 | 12 | SSL_CTX_new 12 EXIST::FUNCTION: |
13 | SSL_CTX_remove_session 13 | 13 | SSL_CTX_remove_session 13 EXIST::FUNCTION: |
14 | SSL_CTX_set_cert_verify_cb 14 | 14 | SSL_CTX_set_cipher_list 15 EXIST::FUNCTION: |
15 | SSL_CTX_set_cipher_list 15 | 15 | SSL_CTX_set_client_CA_list 16 EXIST::FUNCTION: |
16 | SSL_CTX_set_client_CA_list 16 | 16 | SSL_CTX_set_default_passwd_cb 17 EXIST::FUNCTION: |
17 | SSL_CTX_set_default_passwd_cb 17 | 17 | SSL_CTX_set_ssl_version 19 EXIST::FUNCTION: |
18 | SSL_CTX_set_ssl_version 19 | 18 | SSL_CTX_set_verify 21 EXIST::FUNCTION: |
19 | SSL_CTX_set_verify 21 | 19 | SSL_CTX_use_PrivateKey 22 EXIST::FUNCTION: |
20 | SSL_CTX_use_PrivateKey 22 | 20 | SSL_CTX_use_PrivateKey_ASN1 23 EXIST::FUNCTION: |
21 | SSL_CTX_use_PrivateKey_ASN1 23 | 21 | SSL_CTX_use_PrivateKey_file 24 EXIST::FUNCTION:STDIO |
22 | SSL_CTX_use_PrivateKey_file 24 | 22 | SSL_CTX_use_RSAPrivateKey 25 EXIST::FUNCTION:RSA |
23 | SSL_CTX_use_RSAPrivateKey 25 | 23 | SSL_CTX_use_RSAPrivateKey_ASN1 26 EXIST::FUNCTION:RSA |
24 | SSL_CTX_use_RSAPrivateKey_ASN1 26 | 24 | SSL_CTX_use_RSAPrivateKey_file 27 EXIST::FUNCTION:RSA,STDIO |
25 | SSL_CTX_use_RSAPrivateKey_file 27 | 25 | SSL_CTX_use_certificate 28 EXIST::FUNCTION: |
26 | SSL_CTX_use_certificate 28 | 26 | SSL_CTX_use_certificate_ASN1 29 EXIST::FUNCTION: |
27 | SSL_CTX_use_certificate_ASN1 29 | 27 | SSL_CTX_use_certificate_file 30 EXIST::FUNCTION:STDIO |
28 | SSL_CTX_use_certificate_file 30 | 28 | SSL_SESSION_free 31 EXIST::FUNCTION: |
29 | SSL_SESSION_free 31 | 29 | SSL_SESSION_new 32 EXIST::FUNCTION: |
30 | SSL_SESSION_new 32 | 30 | SSL_SESSION_print 33 EXIST::FUNCTION:BIO |
31 | SSL_SESSION_print 33 | 31 | SSL_SESSION_print_fp 34 EXIST::FUNCTION:FP_API |
32 | SSL_SESSION_print_fp 34 | 32 | SSL_accept 35 EXIST::FUNCTION: |
33 | SSL_accept 35 | 33 | SSL_add_client_CA 36 EXIST::FUNCTION: |
34 | SSL_add_client_CA 36 | 34 | SSL_alert_desc_string 37 EXIST::FUNCTION: |
35 | SSL_alert_desc_string 37 | 35 | SSL_alert_desc_string_long 38 EXIST::FUNCTION: |
36 | SSL_alert_desc_string_long 38 | 36 | SSL_alert_type_string 39 EXIST::FUNCTION: |
37 | SSL_alert_type_string 39 | 37 | SSL_alert_type_string_long 40 EXIST::FUNCTION: |
38 | SSL_alert_type_string_long 40 | 38 | SSL_check_private_key 41 EXIST::FUNCTION: |
39 | SSL_check_private_key 41 | 39 | SSL_clear 42 EXIST::FUNCTION: |
40 | SSL_clear 42 | 40 | SSL_connect 43 EXIST::FUNCTION: |
41 | SSL_connect 43 | 41 | SSL_copy_session_id 44 EXIST::FUNCTION: |
42 | SSL_copy_session_id 44 | 42 | SSL_ctrl 45 EXIST::FUNCTION: |
43 | SSL_ctrl 45 | 43 | SSL_dup 46 EXIST::FUNCTION: |
44 | SSL_dup 46 | 44 | SSL_dup_CA_list 47 EXIST::FUNCTION: |
45 | SSL_dup_CA_list 47 | 45 | SSL_free 48 EXIST::FUNCTION: |
46 | SSL_free 48 | 46 | SSL_get_certificate 49 EXIST::FUNCTION: |
47 | SSL_get_certificate 49 | 47 | SSL_get_cipher_list 52 EXIST::FUNCTION: |
48 | SSL_get_cipher_list 52 | 48 | SSL_get_ciphers 55 EXIST::FUNCTION: |
49 | SSL_get_ciphers 55 | 49 | SSL_get_client_CA_list 56 EXIST::FUNCTION: |
50 | SSL_get_client_CA_list 56 | 50 | SSL_get_default_timeout 57 EXIST::FUNCTION: |
51 | SSL_get_default_timeout 57 | 51 | SSL_get_error 58 EXIST::FUNCTION: |
52 | SSL_get_error 58 | 52 | SSL_get_fd 59 EXIST::FUNCTION: |
53 | SSL_get_fd 59 | 53 | SSL_get_peer_cert_chain 60 EXIST::FUNCTION: |
54 | SSL_get_peer_cert_chain 60 | 54 | SSL_get_peer_certificate 61 EXIST::FUNCTION: |
55 | SSL_get_peer_certificate 61 | 55 | SSL_get_rbio 63 EXIST::FUNCTION:BIO |
56 | SSL_get_rbio 63 | 56 | SSL_get_read_ahead 64 EXIST::FUNCTION: |
57 | SSL_get_read_ahead 64 | 57 | SSL_get_shared_ciphers 65 EXIST::FUNCTION: |
58 | SSL_get_shared_ciphers 65 | 58 | SSL_get_ssl_method 66 EXIST::FUNCTION: |
59 | SSL_get_ssl_method 66 | 59 | SSL_get_verify_callback 69 EXIST::FUNCTION: |
60 | SSL_get_verify_callback 69 | 60 | SSL_get_verify_mode 70 EXIST::FUNCTION: |
61 | SSL_get_verify_mode 70 | 61 | SSL_get_version 71 EXIST::FUNCTION: |
62 | SSL_get_version 71 | 62 | SSL_get_wbio 72 EXIST::FUNCTION:BIO |
63 | SSL_get_wbio 72 | 63 | SSL_load_client_CA_file 73 EXIST::FUNCTION:STDIO |
64 | SSL_load_client_CA_file 73 | 64 | SSL_load_error_strings 74 EXIST::FUNCTION: |
65 | SSL_load_error_strings 74 | 65 | SSL_new 75 EXIST::FUNCTION: |
66 | SSL_new 75 | 66 | SSL_peek 76 EXIST::FUNCTION: |
67 | SSL_peek 76 | 67 | SSL_pending 77 EXIST::FUNCTION: |
68 | SSL_pending 77 | 68 | SSL_read 78 EXIST::FUNCTION: |
69 | SSL_read 78 | 69 | SSL_renegotiate 79 EXIST::FUNCTION: |
70 | SSL_renegotiate 79 | 70 | SSL_rstate_string 80 EXIST::FUNCTION: |
71 | SSL_rstate_string 80 | 71 | SSL_rstate_string_long 81 EXIST::FUNCTION: |
72 | SSL_rstate_string_long 81 | 72 | SSL_set_accept_state 82 EXIST::FUNCTION: |
73 | SSL_set_accept_state 82 | 73 | SSL_set_bio 83 EXIST::FUNCTION:BIO |
74 | SSL_set_bio 83 | 74 | SSL_set_cipher_list 84 EXIST::FUNCTION: |
75 | SSL_set_cipher_list 84 | 75 | SSL_set_client_CA_list 85 EXIST::FUNCTION: |
76 | SSL_set_client_CA_list 85 | 76 | SSL_set_connect_state 86 EXIST::FUNCTION: |
77 | SSL_set_connect_state 86 | 77 | SSL_set_fd 87 EXIST::FUNCTION:SOCK |
78 | SSL_set_fd 87 | 78 | SSL_set_read_ahead 88 EXIST::FUNCTION: |
79 | SSL_set_read_ahead 88 | 79 | SSL_set_rfd 89 EXIST::FUNCTION:SOCK |
80 | SSL_set_rfd 89 | 80 | SSL_set_session 90 EXIST::FUNCTION: |
81 | SSL_set_session 90 | 81 | SSL_set_ssl_method 91 EXIST::FUNCTION: |
82 | SSL_set_ssl_method 91 | 82 | SSL_set_verify 94 EXIST::FUNCTION: |
83 | SSL_set_verify 94 | 83 | SSL_set_wfd 95 EXIST::FUNCTION:SOCK |
84 | SSL_set_wfd 95 | 84 | SSL_shutdown 96 EXIST::FUNCTION: |
85 | SSL_shutdown 96 | 85 | SSL_state_string 97 EXIST::FUNCTION: |
86 | SSL_state_string 97 | 86 | SSL_state_string_long 98 EXIST::FUNCTION: |
87 | SSL_state_string_long 98 | 87 | SSL_use_PrivateKey 99 EXIST::FUNCTION: |
88 | SSL_use_PrivateKey 99 | 88 | SSL_use_PrivateKey_ASN1 100 EXIST::FUNCTION: |
89 | SSL_use_PrivateKey_ASN1 100 | 89 | SSL_use_PrivateKey_file 101 EXIST::FUNCTION:STDIO |
90 | SSL_use_PrivateKey_file 101 | 90 | SSL_use_RSAPrivateKey 102 EXIST::FUNCTION:RSA |
91 | SSL_use_RSAPrivateKey 102 | 91 | SSL_use_RSAPrivateKey_ASN1 103 EXIST::FUNCTION:RSA |
92 | SSL_use_RSAPrivateKey_ASN1 103 | 92 | SSL_use_RSAPrivateKey_file 104 EXIST::FUNCTION:RSA,STDIO |
93 | SSL_use_RSAPrivateKey_file 104 | 93 | SSL_use_certificate 105 EXIST::FUNCTION: |
94 | SSL_use_certificate 105 | 94 | SSL_use_certificate_ASN1 106 EXIST::FUNCTION: |
95 | SSL_use_certificate_ASN1 106 | 95 | SSL_use_certificate_file 107 EXIST::FUNCTION:STDIO |
96 | SSL_use_certificate_file 107 | 96 | SSL_write 108 EXIST::FUNCTION: |
97 | SSL_write 108 | 97 | SSLeay_add_ssl_algorithms 109 NOEXIST::FUNCTION: |
98 | SSLeay_add_ssl_algorithms 109 | 98 | SSLv23_client_method 110 EXIST::FUNCTION:RSA |
99 | SSLv23_client_method 110 | 99 | SSLv23_method 111 EXIST::FUNCTION:RSA |
100 | SSLv23_method 111 | 100 | SSLv23_server_method 112 EXIST::FUNCTION:RSA |
101 | SSLv23_server_method 112 | 101 | SSLv2_client_method 113 EXIST::FUNCTION:RSA |
102 | SSLv2_client_method 113 | 102 | SSLv2_method 114 EXIST::FUNCTION:RSA |
103 | SSLv2_method 114 | 103 | SSLv2_server_method 115 EXIST::FUNCTION:RSA |
104 | SSLv2_server_method 115 | 104 | SSLv3_client_method 116 EXIST::FUNCTION: |
105 | SSLv3_client_method 116 | 105 | SSLv3_method 117 EXIST::FUNCTION: |
106 | SSLv3_method 117 | 106 | SSLv3_server_method 118 EXIST::FUNCTION: |
107 | SSLv3_server_method 118 | 107 | d2i_SSL_SESSION 119 EXIST::FUNCTION: |
108 | d2i_SSL_SESSION 119 | 108 | i2d_SSL_SESSION 120 EXIST::FUNCTION: |
109 | i2d_SSL_SESSION 120 | 109 | BIO_f_ssl 121 EXIST::FUNCTION:BIO |
110 | BIO_f_ssl 121 | 110 | BIO_new_ssl 122 EXIST::FUNCTION:BIO |
111 | BIO_new_ssl 122 | 111 | BIO_proxy_ssl_copy_session_id 123 NOEXIST::FUNCTION: |
112 | BIO_proxy_ssl_copy_session_id 123 | 112 | BIO_ssl_copy_session_id 124 EXIST::FUNCTION:BIO |
113 | BIO_ssl_copy_session_id 124 | 113 | SSL_do_handshake 125 EXIST::FUNCTION: |
114 | SSL_do_handshake 125 | 114 | SSL_get_privatekey 126 EXIST::FUNCTION: |
115 | SSL_get_privatekey 126 | 115 | SSL_get_current_cipher 127 EXIST::FUNCTION: |
116 | SSL_get_current_cipher 127 | 116 | SSL_CIPHER_get_bits 128 EXIST::FUNCTION: |
117 | SSL_CIPHER_get_bits 128 | 117 | SSL_CIPHER_get_version 129 EXIST::FUNCTION: |
118 | SSL_CIPHER_get_version 129 | 118 | SSL_CIPHER_get_name 130 EXIST::FUNCTION: |
119 | SSL_CIPHER_get_name 130 | 119 | BIO_ssl_shutdown 131 EXIST::FUNCTION:BIO |
120 | BIO_ssl_shutdown 131 | 120 | SSL_SESSION_cmp 132 EXIST::FUNCTION: |
121 | SSL_SESSION_cmp 132 | 121 | SSL_SESSION_hash 133 EXIST::FUNCTION: |
122 | SSL_SESSION_hash 133 | 122 | SSL_SESSION_get_time 134 EXIST::FUNCTION: |
123 | SSL_SESSION_get_time 134 | 123 | SSL_SESSION_set_time 135 EXIST::FUNCTION: |
124 | SSL_SESSION_set_time 135 | 124 | SSL_SESSION_get_timeout 136 EXIST::FUNCTION: |
125 | SSL_SESSION_get_timeout 136 | 125 | SSL_SESSION_set_timeout 137 EXIST::FUNCTION: |
126 | SSL_SESSION_set_timeout 137 | 126 | SSL_CTX_get_ex_data 138 EXIST::FUNCTION: |
127 | SSL_CTX_get_ex_data 138 | 127 | SSL_CTX_get_quiet_shutdown 140 EXIST::FUNCTION: |
128 | SSL_CTX_get_quiet_shutdown 140 | 128 | SSL_CTX_load_verify_locations 141 EXIST::FUNCTION: |
129 | SSL_CTX_load_verify_locations 141 | 129 | SSL_CTX_set_default_verify_paths 142 EXIST:!VMS:FUNCTION: |
130 | SSL_CTX_set_default_verify_paths 142 | 130 | SSL_CTX_set_def_verify_paths 142 EXIST:VMS:FUNCTION: |
131 | SSL_CTX_set_ex_data 143 | 131 | SSL_CTX_set_ex_data 143 EXIST::FUNCTION: |
132 | SSL_CTX_set_quiet_shutdown 145 | 132 | SSL_CTX_set_quiet_shutdown 145 EXIST::FUNCTION: |
133 | SSL_SESSION_get_ex_data 146 | 133 | SSL_SESSION_get_ex_data 146 EXIST::FUNCTION: |
134 | SSL_SESSION_set_ex_data 148 | 134 | SSL_SESSION_set_ex_data 148 EXIST::FUNCTION: |
135 | SSL_get_SSL_CTX 150 | 135 | SSL_get_SSL_CTX 150 EXIST::FUNCTION: |
136 | SSL_get_ex_data 151 | 136 | SSL_get_ex_data 151 EXIST::FUNCTION: |
137 | SSL_get_quiet_shutdown 153 | 137 | SSL_get_quiet_shutdown 153 EXIST::FUNCTION: |
138 | SSL_get_session 154 | 138 | SSL_get_session 154 EXIST::FUNCTION: |
139 | SSL_get_shutdown 155 | 139 | SSL_get_shutdown 155 EXIST::FUNCTION: |
140 | SSL_get_verify_result 157 | 140 | SSL_get_verify_result 157 EXIST::FUNCTION: |
141 | SSL_set_ex_data 158 | 141 | SSL_set_ex_data 158 EXIST::FUNCTION: |
142 | SSL_set_info_callback 160 | 142 | SSL_set_info_callback 160 EXIST::FUNCTION: |
143 | SSL_set_quiet_shutdown 161 | 143 | SSL_set_quiet_shutdown 161 EXIST::FUNCTION: |
144 | SSL_set_shutdown 162 | 144 | SSL_set_shutdown 162 EXIST::FUNCTION: |
145 | SSL_set_verify_result 163 | 145 | SSL_set_verify_result 163 EXIST::FUNCTION: |
146 | SSL_version 164 | 146 | SSL_version 164 EXIST::FUNCTION: |
147 | SSL_get_info_callback 165 | 147 | SSL_get_info_callback 165 EXIST::FUNCTION: |
148 | SSL_state 166 | 148 | SSL_state 166 EXIST::FUNCTION: |
149 | SSL_CTX_get_ex_new_index 167 | 149 | SSL_CTX_get_ex_new_index 167 EXIST::FUNCTION: |
150 | SSL_SESSION_get_ex_new_index 168 | 150 | SSL_SESSION_get_ex_new_index 168 EXIST::FUNCTION: |
151 | SSL_get_ex_new_index 169 | 151 | SSL_get_ex_new_index 169 EXIST::FUNCTION: |
152 | TLSv1_method 170 | 152 | TLSv1_method 170 EXIST::FUNCTION: |
153 | TLSv1_server_method 171 | 153 | TLSv1_server_method 171 EXIST::FUNCTION: |
154 | TLSv1_client_method 172 | 154 | TLSv1_client_method 172 EXIST::FUNCTION: |
155 | BIO_new_buffer_ssl_connect 173 | 155 | BIO_new_buffer_ssl_connect 173 EXIST::FUNCTION:BIO |
156 | BIO_new_ssl_connect 174 | 156 | BIO_new_ssl_connect 174 EXIST::FUNCTION:BIO |
157 | SSL_get_ex_data_X509_STORE_CTX_idx 175 EXIST:!VMS:FUNCTION: | ||
158 | SSL_get_ex_d_X509_STORE_CTX_idx 175 EXIST:VMS:FUNCTION: | ||
159 | SSL_CTX_set_tmp_dh_callback 176 EXIST::FUNCTION:DH | ||
160 | SSL_CTX_set_tmp_rsa_callback 177 EXIST::FUNCTION:RSA | ||
161 | SSL_CTX_set_timeout 178 EXIST::FUNCTION: | ||
162 | SSL_CTX_get_timeout 179 EXIST::FUNCTION: | ||
163 | SSL_CTX_get_cert_store 180 EXIST::FUNCTION: | ||
164 | SSL_CTX_set_cert_store 181 EXIST::FUNCTION: | ||
165 | SSL_want 182 EXIST::FUNCTION: | ||
166 | SSL_library_init 183 EXIST::FUNCTION: | ||
167 | SSL_COMP_add_compression_method 184 EXIST::FUNCTION:COMP | ||
168 | SSL_add_file_cert_subjects_to_stack 185 EXIST:!VMS:FUNCTION:STDIO | ||
169 | SSL_add_file_cert_subjs_to_stk 185 EXIST:VMS:FUNCTION:STDIO | ||
170 | SSL_set_tmp_rsa_callback 186 EXIST::FUNCTION:RSA | ||
171 | SSL_set_tmp_dh_callback 187 EXIST::FUNCTION:DH | ||
172 | SSL_add_dir_cert_subjects_to_stack 188 EXIST:!VMS,!WIN32:FUNCTION:STDIO | ||
173 | SSL_add_dir_cert_subjs_to_stk 188 NOEXIST::FUNCTION: | ||
174 | SSL_set_session_id_context 189 EXIST::FUNCTION: | ||
175 | SSL_CTX_use_certificate_chain_file 222 EXIST:!VMS:FUNCTION:STDIO | ||
176 | SSL_CTX_use_cert_chain_file 222 EXIST:VMS:FUNCTION:STDIO | ||
177 | SSL_CTX_set_verify_depth 225 EXIST::FUNCTION: | ||
178 | SSL_set_verify_depth 226 EXIST::FUNCTION: | ||
179 | SSL_CTX_get_verify_depth 228 EXIST::FUNCTION: | ||
180 | SSL_get_verify_depth 229 EXIST::FUNCTION: | ||
181 | SSL_CTX_set_session_id_context 231 EXIST::FUNCTION: | ||
182 | SSL_CTX_set_cert_verify_callback 232 EXIST:!VMS:FUNCTION: | ||
183 | SSL_CTX_set_cert_verify_cb 232 EXIST:VMS:FUNCTION: | ||
184 | SSL_CTX_set_default_passwd_cb_userdata 235 EXIST:!VMS:FUNCTION: | ||
185 | SSL_CTX_set_def_passwd_cb_ud 235 EXIST:VMS:FUNCTION: | ||
186 | SSL_set_purpose 236 EXIST::FUNCTION: | ||
187 | SSL_CTX_set_trust 237 EXIST::FUNCTION: | ||
188 | SSL_CTX_set_purpose 238 EXIST::FUNCTION: | ||
189 | SSL_set_trust 239 EXIST::FUNCTION: | ||
190 | SSL_get_finished 240 EXIST::FUNCTION: | ||
191 | SSL_get_peer_finished 241 EXIST::FUNCTION: | ||
192 | SSL_get1_session 242 EXIST::FUNCTION: | ||
193 | SSL_CTX_callback_ctrl 243 EXIST::FUNCTION: | ||
194 | SSL_callback_ctrl 244 EXIST::FUNCTION: | ||
195 | SSL_CTX_sessions 245 EXIST::FUNCTION: | ||
196 | SSL_get_rfd 246 EXIST::FUNCTION: | ||
197 | SSL_get_wfd 247 EXIST::FUNCTION: | ||
198 | kssl_cget_tkt 248 EXIST::FUNCTION:KRB5 | ||
199 | SSL_has_matching_session_id 249 EXIST::FUNCTION: | ||
200 | kssl_err_set 250 EXIST::FUNCTION:KRB5 | ||
201 | kssl_ctx_show 251 EXIST::FUNCTION:KRB5 | ||
202 | kssl_validate_times 252 EXIST::FUNCTION:KRB5 | ||
203 | kssl_check_authent 253 EXIST::FUNCTION:KRB5 | ||
204 | kssl_ctx_new 254 EXIST::FUNCTION:KRB5 | ||
205 | kssl_build_principal_2 255 EXIST::FUNCTION:KRB5 | ||
206 | kssl_skip_confound 256 EXIST::FUNCTION:KRB5 | ||
207 | kssl_sget_tkt 257 EXIST::FUNCTION:KRB5 | ||
208 | SSL_set_generate_session_id 258 EXIST::FUNCTION: | ||
209 | kssl_ctx_setkey 259 EXIST::FUNCTION:KRB5 | ||
210 | kssl_ctx_setprinc 260 EXIST::FUNCTION:KRB5 | ||
211 | kssl_ctx_free 261 EXIST::FUNCTION:KRB5 | ||
212 | kssl_krb5_free_data_contents 262 EXIST::FUNCTION:KRB5 | ||
213 | kssl_ctx_setstring 263 EXIST::FUNCTION:KRB5 | ||
214 | SSL_CTX_set_generate_session_id 264 EXIST::FUNCTION: | ||
215 | SSL_renegotiate_pending 265 EXIST::FUNCTION: | ||
216 | SSL_CTX_set_msg_callback 266 EXIST::FUNCTION: | ||
217 | SSL_set_msg_callback 267 EXIST::FUNCTION: | ||
diff --git a/src/lib/libcrypto/util/tab_num.pl b/src/lib/libcrypto/util/tab_num.pl index 77b591d92f..a81ed0edc2 100644 --- a/src/lib/libcrypto/util/tab_num.pl +++ b/src/lib/libcrypto/util/tab_num.pl | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/local/bin/perl |
2 | 2 | ||
3 | $num=1; | 3 | $num=1; |
4 | $width=40; | 4 | $width=40; |
diff --git a/src/lib/libcrypto/util/x86asm.sh b/src/lib/libcrypto/util/x86asm.sh index 81d3289860..d2090a9849 100644 --- a/src/lib/libcrypto/util/x86asm.sh +++ b/src/lib/libcrypto/util/x86asm.sh | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | echo Generating x86 assember | 3 | echo Generating x86 assember |
4 | echo Bignum | 4 | echo Bignum |
5 | (cd crypto/bn/asm; perl bn-586.pl cpp > bn86unix.cpp) | 5 | (cd crypto/bn/asm; perl x86.pl cpp > bn86unix.cpp) |
6 | (cd crypto/bn/asm; perl bn-586.pl win32 > bn-win32.asm) | 6 | (cd crypto/bn/asm; perl x86.pl win32 > bn-win32.asm) |
7 | 7 | ||
8 | echo DES | 8 | echo DES |
9 | (cd crypto/des/asm; perl des-586.pl cpp > dx86unix.cpp) | 9 | (cd crypto/des/asm; perl des-586.pl cpp > dx86unix.cpp) |
diff --git a/src/lib/libcrypto/x509v3/v3conf.c b/src/lib/libcrypto/x509v3/v3conf.c index 21cf746f45..67ee14f334 100644 --- a/src/lib/libcrypto/x509v3/v3conf.c +++ b/src/lib/libcrypto/x509v3/v3conf.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | ||
64 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
65 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
66 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
diff --git a/src/lib/libcrypto/x509v3/v3prin.c b/src/lib/libcrypto/x509v3/v3prin.c index ee798859f0..b529814319 100644 --- a/src/lib/libcrypto/x509v3/v3prin.c +++ b/src/lib/libcrypto/x509v3/v3prin.c | |||
@@ -59,9 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include "cryptlib.h" | ||
63 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
64 | #include <openssl/asn1_mac.h> | ||
65 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
67 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |