OLD | NEW |
1 #!/usr/local/bin/perl -w | 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 # prototyped functions: it then prunes the output. | 6 # prototyped functions: it then prunes the output. |
7 # | 7 # |
8 # Intermediary files are created, call libeay.num and ssleay.num,... | 8 # Intermediary files are created, call libeay.num and ssleay.num,... |
9 # Previously, they had the following format: | 9 # Previously, they had the following format: |
10 # | 10 # |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 my $VMSVAX=0; | 71 my $VMSVAX=0; |
72 my $VMSNonVAX=0; | 72 my $VMSNonVAX=0; |
73 my $VMS=0; | 73 my $VMS=0; |
74 my $W32=0; | 74 my $W32=0; |
75 my $W16=0; | 75 my $W16=0; |
76 my $NT=0; | 76 my $NT=0; |
77 my $OS2=0; | 77 my $OS2=0; |
78 # Set this to make typesafe STACK definitions appear in DEF | 78 # Set this to make typesafe STACK definitions appear in DEF |
79 my $safe_stack_def = 0; | 79 my $safe_stack_def = 0; |
80 | 80 |
81 my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", "NETWARE", | 81 my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", |
82 » » » "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS"); | 82 » » » "EXPORT_VAR_AS_FUNCTION", "ZLIB" ); |
83 my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); | 83 my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); |
84 my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", | 84 my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", |
85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", | 85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", |
86 "SHA256", "SHA512", "RIPEMD", | 86 "SHA256", "SHA512", "RIPEMD", |
87 » » » "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMA
C", "AES", "CAMELLIA", "SEED", | 87 » » » "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH",
"ECDSA", |
| 88 » » » "HMAC", "AES", "CAMELLIA", "SEED", "GOST", |
88 # Envelope "algorithms" | 89 # Envelope "algorithms" |
89 "EVP", "X509", "ASN1_TYPEDEFS", | 90 "EVP", "X509", "ASN1_TYPEDEFS", |
90 # Helper "algorithms" | 91 # Helper "algorithms" |
91 "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", | 92 "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", |
92 "LOCKING", | 93 "LOCKING", |
93 # External "algorithms" | 94 # External "algorithms" |
94 "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", | 95 "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", |
95 # Engines | 96 # Engines |
96 "STATIC_ENGINE", "ENGINE", "HW", "GMP", | 97 "STATIC_ENGINE", "ENGINE", "HW", "GMP", |
97 » » » # RFC3779 support | 98 » » » # RFC3779 |
98 "RFC3779", | 99 "RFC3779", |
99 » » » # TLS extension support | 100 » » » # TLS |
100 » » » "TLSEXT", | 101 » » » "TLSEXT", "PSK", |
101 # CMS | 102 # CMS |
102 "CMS", | 103 "CMS", |
103 # CryptoAPI Engine | 104 # CryptoAPI Engine |
104 "CAPIENG", | 105 "CAPIENG", |
| 106 # SSL v2 |
| 107 "SSL2", |
105 # JPAKE | 108 # JPAKE |
106 "JPAKE", | 109 "JPAKE", |
107 # Deprecated functions | 110 # Deprecated functions |
108 "DEPRECATED" ); | 111 "DEPRECATED" ); |
109 | 112 |
110 my $options=""; | 113 my $options=""; |
111 open(IN,"<Makefile") || die "unable to open Makefile!\n"; | 114 open(IN,"<Makefile") || die "unable to open Makefile!\n"; |
112 while(<IN>) { | 115 while(<IN>) { |
113 $options=$1 if (/^OPTIONS=(.*)$/); | 116 $options=$1 if (/^OPTIONS=(.*)$/); |
114 } | 117 } |
115 close(IN); | 118 close(IN); |
116 | 119 |
117 # The following ciphers may be excluded (by Configure). This means functions | 120 # The following ciphers may be excluded (by Configure). This means functions |
118 # defined with ifndef(NO_XXX) are not included in the .def file, and everything | 121 # defined with ifndef(NO_XXX) are not included in the .def file, and everything |
119 # in directory xxx is ignored. | 122 # in directory xxx is ignored. |
120 my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; | 123 my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; |
121 my $no_cast; | 124 my $no_cast; my $no_whirlpool; my $no_camellia; my $no_seed; |
122 my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | 125 my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; |
123 my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | 126 my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; |
124 my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia; | 127 my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; |
125 my $no_seed; | 128 my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; |
126 my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; | 129 my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; |
127 my $no_rfc3779; my $no_tlsext; my $no_cms; my $no_capieng; my $no_jpake; | 130 my $no_jpake; my $no_ssl2; |
128 my $fips; | 131 |
| 132 my $zlib; |
129 | 133 |
130 | 134 |
131 foreach (@ARGV, split(/ /, $options)) | 135 foreach (@ARGV, split(/ /, $options)) |
132 { | 136 { |
133 $debug=1 if $_ eq "debug"; | 137 $debug=1 if $_ eq "debug"; |
134 $W32=1 if $_ eq "32"; | 138 $W32=1 if $_ eq "32"; |
135 $W16=1 if $_ eq "16"; | 139 $W16=1 if $_ eq "16"; |
136 if($_ eq "NT") { | 140 if($_ eq "NT") { |
137 $W32 = 1; | 141 $W32 = 1; |
138 $NT = 1; | 142 $NT = 1; |
139 } | 143 } |
140 if ($_ eq "VMS-VAX") { | 144 if ($_ eq "VMS-VAX") { |
141 $VMS=1; | 145 $VMS=1; |
142 $VMSVAX=1; | 146 $VMSVAX=1; |
143 } | 147 } |
144 if ($_ eq "VMS-NonVAX") { | 148 if ($_ eq "VMS-NonVAX") { |
145 $VMS=1; | 149 $VMS=1; |
146 $VMSNonVAX=1; | 150 $VMSNonVAX=1; |
147 } | 151 } |
148 $VMS=1 if $_ eq "VMS"; | 152 $VMS=1 if $_ eq "VMS"; |
149 $OS2=1 if $_ eq "OS2"; | 153 $OS2=1 if $_ eq "OS2"; |
150 » $fips=1 if /^fips/; | 154 » if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic" |
151 | 155 » » » || $_ eq "enable-zlib-dynamic") { |
152 » if ($_ eq "zlib" || $_ eq "zlib-dynamic" | 156 » » $zlib = 1; |
153 » » » || $_ eq "enable-zlib-dynamic") { | |
154 » » $zlib = 1; | |
155 } | 157 } |
156 | 158 |
157 $do_ssl=1 if $_ eq "ssleay"; | 159 $do_ssl=1 if $_ eq "ssleay"; |
158 if ($_ eq "ssl") { | 160 if ($_ eq "ssl") { |
159 $do_ssl=1; | 161 $do_ssl=1; |
160 $libname=$_ | 162 $libname=$_ |
161 } | 163 } |
162 $do_crypto=1 if $_ eq "libeay"; | 164 $do_crypto=1 if $_ eq "libeay"; |
163 if ($_ eq "crypto") { | 165 if ($_ eq "crypto") { |
164 $do_crypto=1; | 166 $do_crypto=1; |
165 $libname=$_; | 167 $libname=$_; |
166 } | 168 } |
167 $no_static_engine=1 if $_ eq "no-static-engine"; | 169 $no_static_engine=1 if $_ eq "no-static-engine"; |
168 $no_static_engine=0 if $_ eq "enable-static-engine"; | 170 $no_static_engine=0 if $_ eq "enable-static-engine"; |
169 $do_update=1 if $_ eq "update"; | 171 $do_update=1 if $_ eq "update"; |
170 $do_rewrite=1 if $_ eq "rewrite"; | 172 $do_rewrite=1 if $_ eq "rewrite"; |
171 $do_ctest=1 if $_ eq "ctest"; | 173 $do_ctest=1 if $_ eq "ctest"; |
172 $do_ctestall=1 if $_ eq "ctestall"; | 174 $do_ctestall=1 if $_ eq "ctestall"; |
173 $do_checkexist=1 if $_ eq "exist"; | 175 $do_checkexist=1 if $_ eq "exist"; |
174 #$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK"; | 176 #$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK"; |
175 | 177 |
176 if (/^no-rc2$/) { $no_rc2=1; } | 178 if (/^no-rc2$/) { $no_rc2=1; } |
177 elsif (/^no-rc4$/) { $no_rc4=1; } | 179 elsif (/^no-rc4$/) { $no_rc4=1; } |
178 elsif (/^no-rc5$/) { $no_rc5=1; } | 180 elsif (/^no-rc5$/) { $no_rc5=1; } |
179 elsif (/^no-idea$/) { $no_idea=1; } | 181 elsif (/^no-idea$/) { $no_idea=1; } |
180 elsif (/^no-des$/) { $no_des=1; $no_mdc2=1; } | 182 elsif (/^no-des$/) { $no_des=1; $no_mdc2=1; } |
181 elsif (/^no-bf$/) { $no_bf=1; } | 183 elsif (/^no-bf$/) { $no_bf=1; } |
182 elsif (/^no-cast$/) { $no_cast=1; } | 184 elsif (/^no-cast$/) { $no_cast=1; } |
| 185 elsif (/^no-whirlpool$/) { $no_whirlpool=1; } |
183 elsif (/^no-md2$/) { $no_md2=1; } | 186 elsif (/^no-md2$/) { $no_md2=1; } |
184 elsif (/^no-md4$/) { $no_md4=1; } | 187 elsif (/^no-md4$/) { $no_md4=1; } |
185 elsif (/^no-md5$/) { $no_md5=1; } | 188 elsif (/^no-md5$/) { $no_md5=1; } |
186 elsif (/^no-sha$/) { $no_sha=1; } | 189 elsif (/^no-sha$/) { $no_sha=1; } |
187 elsif (/^no-ripemd$/) { $no_ripemd=1; } | 190 elsif (/^no-ripemd$/) { $no_ripemd=1; } |
188 elsif (/^no-mdc2$/) { $no_mdc2=1; } | 191 elsif (/^no-mdc2$/) { $no_mdc2=1; } |
189 elsif (/^no-rsa$/) { $no_rsa=1; } | 192 elsif (/^no-rsa$/) { $no_rsa=1; } |
190 elsif (/^no-dsa$/) { $no_dsa=1; } | 193 elsif (/^no-dsa$/) { $no_dsa=1; } |
191 elsif (/^no-dh$/) { $no_dh=1; } | 194 elsif (/^no-dh$/) { $no_dh=1; } |
192 elsif (/^no-ec$/) { $no_ec=1; } | 195 elsif (/^no-ec$/) { $no_ec=1; } |
(...skipping 12 matching lines...) Expand all Loading... |
205 #elsif (/^no-locking$/) { $no_locking=1; } | 208 #elsif (/^no-locking$/) { $no_locking=1; } |
206 elsif (/^no-comp$/) { $no_comp=1; } | 209 elsif (/^no-comp$/) { $no_comp=1; } |
207 elsif (/^no-dso$/) { $no_dso=1; } | 210 elsif (/^no-dso$/) { $no_dso=1; } |
208 elsif (/^no-krb5$/) { $no_krb5=1; } | 211 elsif (/^no-krb5$/) { $no_krb5=1; } |
209 elsif (/^no-engine$/) { $no_engine=1; } | 212 elsif (/^no-engine$/) { $no_engine=1; } |
210 elsif (/^no-hw$/) { $no_hw=1; } | 213 elsif (/^no-hw$/) { $no_hw=1; } |
211 elsif (/^no-gmp$/) { $no_gmp=1; } | 214 elsif (/^no-gmp$/) { $no_gmp=1; } |
212 elsif (/^no-rfc3779$/) { $no_rfc3779=1; } | 215 elsif (/^no-rfc3779$/) { $no_rfc3779=1; } |
213 elsif (/^no-tlsext$/) { $no_tlsext=1; } | 216 elsif (/^no-tlsext$/) { $no_tlsext=1; } |
214 elsif (/^no-cms$/) { $no_cms=1; } | 217 elsif (/^no-cms$/) { $no_cms=1; } |
| 218 elsif (/^no-ssl2$/) { $no_ssl2=1; } |
215 elsif (/^no-capieng$/) { $no_capieng=1; } | 219 elsif (/^no-capieng$/) { $no_capieng=1; } |
216 elsif (/^no-jpake$/) { $no_jpake=1; } | 220 elsif (/^no-jpake$/) { $no_jpake=1; } |
217 } | 221 } |
218 | 222 |
219 | 223 |
220 if (!$libname) { | 224 if (!$libname) { |
221 if ($do_ssl) { | 225 if ($do_ssl) { |
222 $libname="SSLEAY"; | 226 $libname="SSLEAY"; |
223 } | 227 } |
224 if ($do_crypto) { | 228 if ($do_crypto) { |
(...skipping 21 matching lines...) Expand all Loading... |
246 $max_ssl = $max_num; | 250 $max_ssl = $max_num; |
247 %crypto_list=&load_numbers($crypto_num); | 251 %crypto_list=&load_numbers($crypto_num); |
248 $max_crypto = $max_num; | 252 $max_crypto = $max_num; |
249 | 253 |
250 my $ssl="ssl/ssl.h"; | 254 my $ssl="ssl/ssl.h"; |
251 $ssl.=" ssl/kssl.h"; | 255 $ssl.=" ssl/kssl.h"; |
252 $ssl.=" ssl/tls1.h"; | 256 $ssl.=" ssl/tls1.h"; |
253 | 257 |
254 my $crypto ="crypto/crypto.h"; | 258 my $crypto ="crypto/crypto.h"; |
255 $crypto.=" crypto/o_dir.h"; | 259 $crypto.=" crypto/o_dir.h"; |
| 260 $crypto.=" crypto/o_str.h"; |
| 261 $crypto.=" crypto/o_time.h"; |
256 $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; | 262 $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; |
257 $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; | 263 $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; |
258 $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; | 264 $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; |
259 $crypto.=" crypto/rc5/rc5.h" ; # unless $no_rc5; | 265 $crypto.=" crypto/rc5/rc5.h" ; # unless $no_rc5; |
260 $crypto.=" crypto/rc2/rc2.h" ; # unless $no_rc2; | 266 $crypto.=" crypto/rc2/rc2.h" ; # unless $no_rc2; |
261 $crypto.=" crypto/bf/blowfish.h" ; # unless $no_bf; | 267 $crypto.=" crypto/bf/blowfish.h" ; # unless $no_bf; |
262 $crypto.=" crypto/cast/cast.h" ; # unless $no_cast; | 268 $crypto.=" crypto/cast/cast.h" ; # unless $no_cast; |
| 269 $crypto.=" crypto/whrlpool/whrlpool.h" ; |
263 $crypto.=" crypto/md2/md2.h" ; # unless $no_md2; | 270 $crypto.=" crypto/md2/md2.h" ; # unless $no_md2; |
264 $crypto.=" crypto/md4/md4.h" ; # unless $no_md4; | 271 $crypto.=" crypto/md4/md4.h" ; # unless $no_md4; |
265 $crypto.=" crypto/md5/md5.h" ; # unless $no_md5; | 272 $crypto.=" crypto/md5/md5.h" ; # unless $no_md5; |
266 $crypto.=" crypto/mdc2/mdc2.h" ; # unless $no_mdc2; | 273 $crypto.=" crypto/mdc2/mdc2.h" ; # unless $no_mdc2; |
267 $crypto.=" crypto/sha/sha.h" ; # unless $no_sha; | 274 $crypto.=" crypto/sha/sha.h" ; # unless $no_sha; |
268 $crypto.=" crypto/ripemd/ripemd.h" ; # unless $no_ripemd; | 275 $crypto.=" crypto/ripemd/ripemd.h" ; # unless $no_ripemd; |
269 $crypto.=" crypto/aes/aes.h" ; # unless $no_aes; | 276 $crypto.=" crypto/aes/aes.h" ; # unless $no_aes; |
270 $crypto.=" crypto/camellia/camellia.h" ; # unless $no_camellia; | 277 $crypto.=" crypto/camellia/camellia.h" ; # unless $no_camellia; |
271 $crypto.=" crypto/seed/seed.h"; # unless $no_seed; | 278 $crypto.=" crypto/seed/seed.h"; # unless $no_seed; |
272 | 279 |
(...skipping 21 matching lines...) Expand all Loading... |
294 #$crypto.=" crypto/meth/meth.h"; | 301 #$crypto.=" crypto/meth/meth.h"; |
295 $crypto.=" crypto/asn1/asn1.h"; | 302 $crypto.=" crypto/asn1/asn1.h"; |
296 $crypto.=" crypto/asn1/asn1t.h"; | 303 $crypto.=" crypto/asn1/asn1t.h"; |
297 $crypto.=" crypto/asn1/asn1_mac.h"; | 304 $crypto.=" crypto/asn1/asn1_mac.h"; |
298 $crypto.=" crypto/err/err.h" ; # unless $no_err; | 305 $crypto.=" crypto/err/err.h" ; # unless $no_err; |
299 $crypto.=" crypto/pkcs7/pkcs7.h"; | 306 $crypto.=" crypto/pkcs7/pkcs7.h"; |
300 $crypto.=" crypto/pkcs12/pkcs12.h"; | 307 $crypto.=" crypto/pkcs12/pkcs12.h"; |
301 $crypto.=" crypto/x509/x509.h"; | 308 $crypto.=" crypto/x509/x509.h"; |
302 $crypto.=" crypto/x509/x509_vfy.h"; | 309 $crypto.=" crypto/x509/x509_vfy.h"; |
303 $crypto.=" crypto/x509v3/x509v3.h"; | 310 $crypto.=" crypto/x509v3/x509v3.h"; |
| 311 $crypto.=" crypto/ts/ts.h"; |
304 $crypto.=" crypto/rand/rand.h"; | 312 $crypto.=" crypto/rand/rand.h"; |
305 $crypto.=" crypto/comp/comp.h" ; # unless $no_comp; | 313 $crypto.=" crypto/comp/comp.h" ; # unless $no_comp; |
306 $crypto.=" crypto/ocsp/ocsp.h"; | 314 $crypto.=" crypto/ocsp/ocsp.h"; |
307 $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; | 315 $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; |
308 $crypto.=" crypto/krb5/krb5_asn.h"; | 316 $crypto.=" crypto/krb5/krb5_asn.h"; |
309 $crypto.=" crypto/tmdiff.h"; | 317 #$crypto.=" crypto/store/store.h"; |
310 $crypto.=" crypto/store/store.h"; | |
311 $crypto.=" crypto/pqueue/pqueue.h"; | 318 $crypto.=" crypto/pqueue/pqueue.h"; |
312 $crypto.=" crypto/cms/cms.h"; | 319 $crypto.=" crypto/cms/cms.h"; |
313 $crypto.=" crypto/jpake/jpake.h"; | 320 $crypto.=" crypto/jpake/jpake.h"; |
314 $crypto.=" fips/fips.h fips/rand/fips_rand.h"; | 321 $crypto.=" crypto/modes/modes.h"; |
315 | 322 |
316 my $symhacks="crypto/symhacks.h"; | 323 my $symhacks="crypto/symhacks.h"; |
317 | 324 |
318 my @ssl_symbols = &do_defs("SSLEAY", $ssl, $symhacks); | 325 my @ssl_symbols = &do_defs("SSLEAY", $ssl, $symhacks); |
319 my @crypto_symbols = &do_defs("LIBEAY", $crypto, $symhacks); | 326 my @crypto_symbols = &do_defs("LIBEAY", $crypto, $symhacks); |
320 | 327 |
321 if ($do_update) { | 328 if ($do_update) { |
322 | 329 |
323 if ($do_ssl == 1) { | 330 if ($do_ssl == 1) { |
324 | 331 |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 # Reduce argument lists to empty () | 885 # Reduce argument lists to empty () |
879 # fold round brackets recursively: (t(*v)(t),t) -> (t{}{
},t) -> {} | 886 # fold round brackets recursively: (t(*v)(t),t) -> (t{}{
},t) -> {} |
880 while(/\(.*\)/s) { | 887 while(/\(.*\)/s) { |
881 s/\([^\(\)]+\)/\{\}/gs; | 888 s/\([^\(\)]+\)/\{\}/gs; |
882 s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{})
-> f | 889 s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{})
-> f |
883 } | 890 } |
884 # pretend as we didn't use curly braces: {} -> () | 891 # pretend as we didn't use curly braces: {} -> () |
885 s/\{\}/\(\)/gs; | 892 s/\{\}/\(\)/gs; |
886 | 893 |
887 s/STACK_OF\(\)/void/gs; | 894 s/STACK_OF\(\)/void/gs; |
| 895 s/LHASH_OF\(\)/void/gs; |
888 | 896 |
889 print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; | 897 print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; |
890 if (/^\#INFO:([^:]*):(.*)$/) { | 898 if (/^\#INFO:([^:]*):(.*)$/) { |
891 $plats = $1; | 899 $plats = $1; |
892 $algs = $2; | 900 $algs = $2; |
893 print STDERR "DEBUG: found info on platforms ($p
lats) and algorithms ($algs)\n" if $debug; | 901 print STDERR "DEBUG: found info on platforms ($p
lats) and algorithms ($algs)\n" if $debug; |
894 next; | 902 next; |
895 } elsif (/^\s*OPENSSL_EXTERN\s.*?(\w+(\{[0-9]+\})?)(\[[0
-9]*\])*\s*$/) { | 903 } elsif (/^\s*OPENSSL_EXTERN\s.*?(\w+(\{[0-9]+\})?)(\[[0
-9]*\])*\s*$/) { |
896 $s = $1; | 904 $s = $1; |
897 $k = "VARIABLE"; | 905 $k = "VARIABLE"; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 | 962 |
955 # Prune the returned symbols | 963 # Prune the returned symbols |
956 | 964 |
957 delete $syms{"bn_dump1"}; | 965 delete $syms{"bn_dump1"}; |
958 $platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh"; | 966 $platform{"BIO_s_log"} .= ",!WIN32,!WIN16,!macintosh"; |
959 | 967 |
960 $platform{"PEM_read_NS_CERT_SEQ"} = "VMS"; | 968 $platform{"PEM_read_NS_CERT_SEQ"} = "VMS"; |
961 $platform{"PEM_write_NS_CERT_SEQ"} = "VMS"; | 969 $platform{"PEM_write_NS_CERT_SEQ"} = "VMS"; |
962 $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS"; | 970 $platform{"PEM_read_P8_PRIV_KEY_INFO"} = "VMS"; |
963 $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS"; | 971 $platform{"PEM_write_P8_PRIV_KEY_INFO"} = "VMS"; |
964 | |
965 $platform{"EVP_sha384"} = "!VMSVAX"; | 972 $platform{"EVP_sha384"} = "!VMSVAX"; |
966 $platform{"EVP_sha512"} = "!VMSVAX"; | 973 $platform{"EVP_sha512"} = "!VMSVAX"; |
967 $platform{"SHA384_Init"} = "!VMSVAX"; | 974 $platform{"SHA384_Init"} = "!VMSVAX"; |
968 $platform{"SHA384_Transform"} = "!VMSVAX"; | 975 $platform{"SHA384_Transform"} = "!VMSVAX"; |
969 $platform{"SHA384_Update"} = "!VMSVAX"; | 976 $platform{"SHA384_Update"} = "!VMSVAX"; |
970 $platform{"SHA384_Final"} = "!VMSVAX"; | 977 $platform{"SHA384_Final"} = "!VMSVAX"; |
971 $platform{"SHA384"} = "!VMSVAX"; | 978 $platform{"SHA384"} = "!VMSVAX"; |
972 $platform{"SHA512_Init"} = "!VMSVAX"; | 979 $platform{"SHA512_Init"} = "!VMSVAX"; |
973 $platform{"SHA512_Transform"} = "!VMSVAX"; | 980 $platform{"SHA512_Transform"} = "!VMSVAX"; |
974 $platform{"SHA512_Update"} = "!VMSVAX"; | 981 $platform{"SHA512_Update"} = "!VMSVAX"; |
975 $platform{"SHA512_Final"} = "!VMSVAX"; | 982 $platform{"SHA512_Final"} = "!VMSVAX"; |
976 $platform{"SHA512"} = "!VMSVAX"; | 983 $platform{"SHA512"} = "!VMSVAX"; |
| 984 $platform{"WHIRLPOOL_Init"} = "!VMSVAX"; |
| 985 $platform{"WHIRLPOOL"} = "!VMSVAX"; |
| 986 $platform{"WHIRLPOOL_BitUpdate"} = "!VMSVAX"; |
| 987 $platform{"EVP_whirlpool"} = "!VMSVAX"; |
| 988 $platform{"WHIRLPOOL_Final"} = "!VMSVAX"; |
| 989 $platform{"WHIRLPOOL_Update"} = "!VMSVAX"; |
977 | 990 |
978 $platform{"pqueue_print"} = "!VMSVAX"; | |
979 | 991 |
980 # Info we know about | 992 # Info we know about |
981 | 993 |
982 push @ret, map { $_."\\".&info_string($_,"EXIST", | 994 push @ret, map { $_."\\".&info_string($_,"EXIST", |
983 $platform{$_}, | 995 $platform{$_}, |
984 $kind{$_}, | 996 $kind{$_}, |
985 $algorithm{$_}) } keys %syms; | 997 $algorithm{$_}) } keys %syms; |
986 | 998 |
987 if (keys %unknown_algorithms) { | 999 if (keys %unknown_algorithms) { |
988 print STDERR "WARNING: mkdef.pl doesn't know the following algor
ithms:\n"; | 1000 print STDERR "WARNING: mkdef.pl doesn't know the following algor
ithms:\n"; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 my (@keywords) = split /,/,$keywords_txt; | 1105 my (@keywords) = split /,/,$keywords_txt; |
1094 my ($falsesum, $truesum) = (0, 1); | 1106 my ($falsesum, $truesum) = (0, 1); |
1095 | 1107 |
1096 # Param: one keyword | 1108 # Param: one keyword |
1097 sub recognise | 1109 sub recognise |
1098 { | 1110 { |
1099 my ($keyword,$platforms) = @_; | 1111 my ($keyword,$platforms) = @_; |
1100 | 1112 |
1101 if ($platforms) { | 1113 if ($platforms) { |
1102 # platforms | 1114 # platforms |
1103 if ($keyword eq "VMS" && $VMS) { return 1; } | |
1104 if ($keyword eq "VMSVAX" && $VMSVAX) { return 1; } | 1115 if ($keyword eq "VMSVAX" && $VMSVAX) { return 1; } |
1105 if ($keyword eq "VMSNonVAX" && $VMSNonVAX) { return 1; } | 1116 if ($keyword eq "VMSNonVAX" && $VMSNonVAX) { return 1; } |
| 1117 if ($keyword eq "VMS" && $VMS) { return 1; } |
1106 if ($keyword eq "WIN32" && $W32) { return 1; } | 1118 if ($keyword eq "WIN32" && $W32) { return 1; } |
1107 if ($keyword eq "WIN16" && $W16) { return 1; } | 1119 if ($keyword eq "WIN16" && $W16) { return 1; } |
1108 if ($keyword eq "WINNT" && $NT) { return 1; } | 1120 if ($keyword eq "WINNT" && $NT) { return 1; } |
1109 if ($keyword eq "OS2" && $OS2) { return 1; } | 1121 if ($keyword eq "OS2" && $OS2) { return 1; } |
1110 # Special platforms: | 1122 # Special platforms: |
1111 # EXPORT_VAR_AS_FUNCTION means that global variables | 1123 # EXPORT_VAR_AS_FUNCTION means that global variables |
1112 # will be represented as functions. This currently | 1124 # will be represented as functions. This currently |
1113 # only happens on VMS-VAX. | 1125 # only happens on VMS-VAX. |
1114 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX ||
$W32 || $W16)) { | 1126 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX ||
$W32 || $W16)) { |
1115 return 1; | 1127 return 1; |
1116 } | 1128 } |
1117 if ($keyword eq "OPENSSL_FIPS" && $fips) { | |
1118 return 1; | |
1119 } | |
1120 if ($keyword eq "ZLIB" && $zlib) { return 1; } | 1129 if ($keyword eq "ZLIB" && $zlib) { return 1; } |
1121 return 0; | 1130 return 0; |
1122 } else { | 1131 } else { |
1123 # algorithms | 1132 # algorithms |
1124 if ($keyword eq "RC2" && $no_rc2) { return 0; } | 1133 if ($keyword eq "RC2" && $no_rc2) { return 0; } |
1125 if ($keyword eq "RC4" && $no_rc4) { return 0; } | 1134 if ($keyword eq "RC4" && $no_rc4) { return 0; } |
1126 if ($keyword eq "RC5" && $no_rc5) { return 0; } | 1135 if ($keyword eq "RC5" && $no_rc5) { return 0; } |
1127 if ($keyword eq "IDEA" && $no_idea) { return 0; } | 1136 if ($keyword eq "IDEA" && $no_idea) { return 0; } |
1128 if ($keyword eq "DES" && $no_des) { return 0; } | 1137 if ($keyword eq "DES" && $no_des) { return 0; } |
1129 if ($keyword eq "BF" && $no_bf) { return 0; } | 1138 if ($keyword eq "BF" && $no_bf) { return 0; } |
1130 if ($keyword eq "CAST" && $no_cast) { return 0; } | 1139 if ($keyword eq "CAST" && $no_cast) { return 0; } |
1131 if ($keyword eq "MD2" && $no_md2) { return 0; } | 1140 if ($keyword eq "MD2" && $no_md2) { return 0; } |
1132 if ($keyword eq "MD4" && $no_md4) { return 0; } | 1141 if ($keyword eq "MD4" && $no_md4) { return 0; } |
1133 if ($keyword eq "MD5" && $no_md5) { return 0; } | 1142 if ($keyword eq "MD5" && $no_md5) { return 0; } |
1134 if ($keyword eq "SHA" && $no_sha) { return 0; } | 1143 if ($keyword eq "SHA" && $no_sha) { return 0; } |
1135 if ($keyword eq "RIPEMD" && $no_ripemd) { return 0; } | 1144 if ($keyword eq "RIPEMD" && $no_ripemd) { return 0; } |
1136 if ($keyword eq "MDC2" && $no_mdc2) { return 0; } | 1145 if ($keyword eq "MDC2" && $no_mdc2) { return 0; } |
| 1146 if ($keyword eq "WHIRLPOOL" && $no_whirlpool) { return 0
; } |
1137 if ($keyword eq "RSA" && $no_rsa) { return 0; } | 1147 if ($keyword eq "RSA" && $no_rsa) { return 0; } |
1138 if ($keyword eq "DSA" && $no_dsa) { return 0; } | 1148 if ($keyword eq "DSA" && $no_dsa) { return 0; } |
1139 if ($keyword eq "DH" && $no_dh) { return 0; } | 1149 if ($keyword eq "DH" && $no_dh) { return 0; } |
1140 if ($keyword eq "EC" && $no_ec) { return 0; } | 1150 if ($keyword eq "EC" && $no_ec) { return 0; } |
1141 if ($keyword eq "ECDSA" && $no_ecdsa) { return 0; } | 1151 if ($keyword eq "ECDSA" && $no_ecdsa) { return 0; } |
1142 if ($keyword eq "ECDH" && $no_ecdh) { return 0; } | 1152 if ($keyword eq "ECDH" && $no_ecdh) { return 0; } |
1143 if ($keyword eq "HMAC" && $no_hmac) { return 0; } | 1153 if ($keyword eq "HMAC" && $no_hmac) { return 0; } |
1144 if ($keyword eq "AES" && $no_aes) { return 0; } | 1154 if ($keyword eq "AES" && $no_aes) { return 0; } |
1145 if ($keyword eq "CAMELLIA" && $no_camellia) { return 0;
} | 1155 if ($keyword eq "CAMELLIA" && $no_camellia) { return 0;
} |
1146 if ($keyword eq "SEED" && $no_seed) { return 0; } | 1156 if ($keyword eq "SEED" && $no_seed) { return 0; } |
1147 if ($keyword eq "EVP" && $no_evp) { return 0; } | 1157 if ($keyword eq "EVP" && $no_evp) { return 0; } |
1148 if ($keyword eq "LHASH" && $no_lhash) { return 0; } | 1158 if ($keyword eq "LHASH" && $no_lhash) { return 0; } |
1149 if ($keyword eq "STACK" && $no_stack) { return 0; } | 1159 if ($keyword eq "STACK" && $no_stack) { return 0; } |
1150 if ($keyword eq "ERR" && $no_err) { return 0; } | 1160 if ($keyword eq "ERR" && $no_err) { return 0; } |
1151 if ($keyword eq "BUFFER" && $no_buffer) { return 0; } | 1161 if ($keyword eq "BUFFER" && $no_buffer) { return 0; } |
1152 if ($keyword eq "BIO" && $no_bio) { return 0; } | 1162 if ($keyword eq "BIO" && $no_bio) { return 0; } |
1153 if ($keyword eq "COMP" && $no_comp) { return 0; } | 1163 if ($keyword eq "COMP" && $no_comp) { return 0; } |
1154 if ($keyword eq "DSO" && $no_dso) { return 0; } | 1164 if ($keyword eq "DSO" && $no_dso) { return 0; } |
1155 if ($keyword eq "KRB5" && $no_krb5) { return 0; } | 1165 if ($keyword eq "KRB5" && $no_krb5) { return 0; } |
1156 if ($keyword eq "ENGINE" && $no_engine) { return 0; } | 1166 if ($keyword eq "ENGINE" && $no_engine) { return 0; } |
1157 if ($keyword eq "HW" && $no_hw) { return 0; } | 1167 if ($keyword eq "HW" && $no_hw) { return 0; } |
1158 if ($keyword eq "FP_API" && $no_fp_api) { return 0; } | 1168 if ($keyword eq "FP_API" && $no_fp_api) { return 0; } |
1159 if ($keyword eq "STATIC_ENGINE" && $no_static_engine) {
return 0; } | 1169 if ($keyword eq "STATIC_ENGINE" && $no_static_engine) {
return 0; } |
1160 if ($keyword eq "GMP" && $no_gmp) { return 0; } | 1170 if ($keyword eq "GMP" && $no_gmp) { return 0; } |
1161 if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; } | 1171 if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; } |
1162 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } | 1172 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } |
| 1173 if ($keyword eq "PSK" && $no_psk) { return 0; } |
1163 if ($keyword eq "CMS" && $no_cms) { return 0; } | 1174 if ($keyword eq "CMS" && $no_cms) { return 0; } |
| 1175 if ($keyword eq "SSL2" && $no_ssl2) { return 0; } |
1164 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } | 1176 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } |
1165 if ($keyword eq "JPAKE" && $no_jpake) { return 0; } | 1177 if ($keyword eq "JPAKE" && $no_jpake) { return 0; } |
1166 if ($keyword eq "DEPRECATED" && $no_deprecated) { return
0; } | 1178 if ($keyword eq "DEPRECATED" && $no_deprecated) { return
0; } |
1167 | 1179 |
1168 # Nothing recognise as true | 1180 # Nothing recognise as true |
1169 return 1; | 1181 return 1; |
1170 } | 1182 } |
1171 } | 1183 } |
1172 | 1184 |
1173 foreach $k (@keywords) { | 1185 foreach $k (@keywords) { |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1488 } | 1500 } |
1489 } | 1501 } |
1490 if(@remaining) { | 1502 if(@remaining) { |
1491 print STDERR "The following symbols do not seem to exist:\n"; | 1503 print STDERR "The following symbols do not seem to exist:\n"; |
1492 foreach $sym (@remaining) { | 1504 foreach $sym (@remaining) { |
1493 print STDERR "\t",$sym,"\n"; | 1505 print STDERR "\t",$sym,"\n"; |
1494 } | 1506 } |
1495 } | 1507 } |
1496 } | 1508 } |
1497 | 1509 |
OLD | NEW |