mkdef.pl (109998) | mkdef.pl (111147) |
---|---|
1#!/usr/local/bin/perl -w 2# 3# generate a .def file 4# 5# It does this by parsing the header files and looking for the 6# prototyped functions: it then prunes the output. 7# 8# Intermediary files are created, call libeay.num and ssleay.num,... --- 77 unchanged lines hidden (view full) --- 86 "RIPEMD", 87 "MDC2", "RSA", "DSA", "DH", "EC", "HMAC", "AES", 88 # Envelope "algorithms" 89 "EVP", "X509", "ASN1_TYPEDEFS", 90 # Helper "algorithms" 91 "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", 92 "LOCKING", 93 # External "algorithms" | 1#!/usr/local/bin/perl -w 2# 3# generate a .def file 4# 5# It does this by parsing the header files and looking for the 6# prototyped functions: it then prunes the output. 7# 8# Intermediary files are created, call libeay.num and ssleay.num,... --- 77 unchanged lines hidden (view full) --- 86 "RIPEMD", 87 "MDC2", "RSA", "DSA", "DH", "EC", "HMAC", "AES", 88 # Envelope "algorithms" 89 "EVP", "X509", "ASN1_TYPEDEFS", 90 # Helper "algorithms" 91 "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", 92 "LOCKING", 93 # External "algorithms" |
94 "FP_API", "STDIO", "SOCK", "KRB5" ); | 94 "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); |
95 96my $options=""; 97open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; 98while(<IN>) { 99 $options=$1 if (/^OPTIONS=(.*)$/); 100} 101close(IN); 102 103# The following ciphers may be excluded (by Configure). This means functions 104# defined with ifndef(NO_XXX) are not included in the .def file, and everything 105# in directory xxx is ignored. 106my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; 107my $no_cast; 108my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; 109my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | 95 96my $options=""; 97open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n"; 98while(<IN>) { 99 $options=$1 if (/^OPTIONS=(.*)$/); 100} 101close(IN); 102 103# The following ciphers may be excluded (by Configure). This means functions 104# defined with ifndef(NO_XXX) are not included in the .def file, and everything 105# in directory xxx is ignored. 106my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; 107my $no_cast; 108my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; 109my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; |
110my $no_ec; | 110my $no_ec; my $no_engine; my $no_hw; |
111my $no_fp_api; 112 113foreach (@ARGV, split(/ /, $options)) 114 { 115 $debug=1 if $_ eq "debug"; 116 $W32=1 if $_ eq "32"; 117 $W16=1 if $_ eq "16"; 118 if($_ eq "NT") { --- 52 unchanged lines hidden (view full) --- 171 elsif (/^no-stack$/) { $no_stack=1; } 172 elsif (/^no-err$/) { $no_err=1; } 173 elsif (/^no-buffer$/) { $no_buffer=1; } 174 elsif (/^no-bio$/) { $no_bio=1; } 175 #elsif (/^no-locking$/) { $no_locking=1; } 176 elsif (/^no-comp$/) { $no_comp=1; } 177 elsif (/^no-dso$/) { $no_dso=1; } 178 elsif (/^no-krb5$/) { $no_krb5=1; } | 111my $no_fp_api; 112 113foreach (@ARGV, split(/ /, $options)) 114 { 115 $debug=1 if $_ eq "debug"; 116 $W32=1 if $_ eq "32"; 117 $W16=1 if $_ eq "16"; 118 if($_ eq "NT") { --- 52 unchanged lines hidden (view full) --- 171 elsif (/^no-stack$/) { $no_stack=1; } 172 elsif (/^no-err$/) { $no_err=1; } 173 elsif (/^no-buffer$/) { $no_buffer=1; } 174 elsif (/^no-bio$/) { $no_bio=1; } 175 #elsif (/^no-locking$/) { $no_locking=1; } 176 elsif (/^no-comp$/) { $no_comp=1; } 177 elsif (/^no-dso$/) { $no_dso=1; } 178 elsif (/^no-krb5$/) { $no_krb5=1; } |
179 elsif (/^no-engine$/) { $no_engine=1; } 180 elsif (/^no-hw$/) { $no_hw=1; } |
|
179 } 180 181 182if (!$libname) { 183 if ($do_ssl) { 184 $libname="SSLEAY"; 185 } 186 if ($do_crypto) { --- 43 unchanged lines hidden (view full) --- 230 231$crypto.=" crypto/bn/bn.h"; 232$crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; 233$crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; 234$crypto.=" crypto/dh/dh.h" ; # unless $no_dh; 235$crypto.=" crypto/ec/ec.h" ; # unless $no_ec; 236$crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; 237 | 181 } 182 183 184if (!$libname) { 185 if ($do_ssl) { 186 $libname="SSLEAY"; 187 } 188 if ($do_crypto) { --- 43 unchanged lines hidden (view full) --- 232 233$crypto.=" crypto/bn/bn.h"; 234$crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; 235$crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; 236$crypto.=" crypto/dh/dh.h" ; # unless $no_dh; 237$crypto.=" crypto/ec/ec.h" ; # unless $no_ec; 238$crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; 239 |
238$crypto.=" crypto/engine/engine.h"; | 240$crypto.=" crypto/engine/engine.h"; # unless $no_engine; |
239$crypto.=" crypto/stack/stack.h" ; # unless $no_stack; 240$crypto.=" crypto/buffer/buffer.h" ; # unless $no_buffer; 241$crypto.=" crypto/bio/bio.h" ; # unless $no_bio; 242$crypto.=" crypto/dso/dso.h" ; # unless $no_dso; 243$crypto.=" crypto/lhash/lhash.h" ; # unless $no_lhash; 244$crypto.=" crypto/conf/conf.h"; 245$crypto.=" crypto/txt_db/txt_db.h"; 246 --- 800 unchanged lines hidden (view full) --- 1047 if ($keyword eq "LHASH" && $no_lhash) { return 0; } 1048 if ($keyword eq "STACK" && $no_stack) { return 0; } 1049 if ($keyword eq "ERR" && $no_err) { return 0; } 1050 if ($keyword eq "BUFFER" && $no_buffer) { return 0; } 1051 if ($keyword eq "BIO" && $no_bio) { return 0; } 1052 if ($keyword eq "COMP" && $no_comp) { return 0; } 1053 if ($keyword eq "DSO" && $no_dso) { return 0; } 1054 if ($keyword eq "KRB5" && $no_krb5) { return 0; } | 241$crypto.=" crypto/stack/stack.h" ; # unless $no_stack; 242$crypto.=" crypto/buffer/buffer.h" ; # unless $no_buffer; 243$crypto.=" crypto/bio/bio.h" ; # unless $no_bio; 244$crypto.=" crypto/dso/dso.h" ; # unless $no_dso; 245$crypto.=" crypto/lhash/lhash.h" ; # unless $no_lhash; 246$crypto.=" crypto/conf/conf.h"; 247$crypto.=" crypto/txt_db/txt_db.h"; 248 --- 800 unchanged lines hidden (view full) --- 1049 if ($keyword eq "LHASH" && $no_lhash) { return 0; } 1050 if ($keyword eq "STACK" && $no_stack) { return 0; } 1051 if ($keyword eq "ERR" && $no_err) { return 0; } 1052 if ($keyword eq "BUFFER" && $no_buffer) { return 0; } 1053 if ($keyword eq "BIO" && $no_bio) { return 0; } 1054 if ($keyword eq "COMP" && $no_comp) { return 0; } 1055 if ($keyword eq "DSO" && $no_dso) { return 0; } 1056 if ($keyword eq "KRB5" && $no_krb5) { return 0; } |
1057 if ($keyword eq "ENGINE" && $no_engine) { return 0; } 1058 if ($keyword eq "HW" && $no_hw) { return 0; } |
|
1055 if ($keyword eq "FP_API" && $no_fp_api) { return 0; } 1056 1057 # Nothing recognise as true 1058 return 1; 1059 } 1060 } 1061 1062 foreach $k (@keywords) { --- 298 unchanged lines hidden --- | 1059 if ($keyword eq "FP_API" && $no_fp_api) { return 0; } 1060 1061 # Nothing recognise as true 1062 return 1; 1063 } 1064 } 1065 1066 foreach $k (@keywords) { --- 298 unchanged lines hidden --- |