diff options
Diffstat (limited to 'src/lib/libcrypto/util/mkdef.pl')
-rw-r--r-- | src/lib/libcrypto/util/mkdef.pl | 142 |
1 files changed, 100 insertions, 42 deletions
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl index 6c1e53bb14..ef1cc6e513 100644 --- a/src/lib/libcrypto/util/mkdef.pl +++ b/src/lib/libcrypto/util/mkdef.pl | |||
@@ -79,19 +79,29 @@ my $OS2=0; | |||
79 | my $safe_stack_def = 0; | 79 | my $safe_stack_def = 0; |
80 | 80 | ||
81 | my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", | 81 | my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", |
82 | "EXPORT_VAR_AS_FUNCTION", "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", "HMAC", "AES", | 87 | "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMAC", "AES", "CAMELLIA", "SEED", |
88 | # Envelope "algorithms" | 88 | # Envelope "algorithms" |
89 | "EVP", "X509", "ASN1_TYPEDEFS", | 89 | "EVP", "X509", "ASN1_TYPEDEFS", |
90 | # Helper "algorithms" | 90 | # Helper "algorithms" |
91 | "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", | 91 | "BIO", "COMP", "BUFFER", "LHASH", "STACK", "ERR", |
92 | "LOCKING", | 92 | "LOCKING", |
93 | # External "algorithms" | 93 | # External "algorithms" |
94 | "FP_API", "STDIO", "SOCK", "KRB5", "ENGINE", "HW" ); | 94 | "FP_API", "STDIO", "SOCK", "KRB5", "DGRAM", |
95 | # Engines | ||
96 | "STATIC_ENGINE", "ENGINE", "HW", "GMP", | ||
97 | # RFC3779 support | ||
98 | "RFC3779", | ||
99 | # TLS extension support | ||
100 | "TLSEXT", | ||
101 | # CMS | ||
102 | "CMS", | ||
103 | # Deprecated functions | ||
104 | "DEPRECATED" ); | ||
95 | 105 | ||
96 | my $options=""; | 106 | my $options=""; |
97 | open(IN,"<Makefile") || die "unable to open Makefile!\n"; | 107 | open(IN,"<Makefile") || die "unable to open Makefile!\n"; |
@@ -107,9 +117,11 @@ my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf; | |||
107 | my $no_cast; | 117 | my $no_cast; |
108 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; | 118 | my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2; |
109 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; | 119 | my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5; |
110 | my $no_ec; my $no_engine; my $no_hw; | 120 | my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia; |
111 | my $no_fp_api; | 121 | my $no_seed; |
112 | my $fips; | 122 | my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated; |
123 | my $no_rfc3779; my $no_tlsext; my $no_cms; | ||
124 | |||
113 | 125 | ||
114 | foreach (@ARGV, split(/ /, $options)) | 126 | foreach (@ARGV, split(/ /, $options)) |
115 | { | 127 | { |
@@ -130,7 +142,11 @@ foreach (@ARGV, split(/ /, $options)) | |||
130 | } | 142 | } |
131 | $VMS=1 if $_ eq "VMS"; | 143 | $VMS=1 if $_ eq "VMS"; |
132 | $OS2=1 if $_ eq "OS2"; | 144 | $OS2=1 if $_ eq "OS2"; |
133 | $fips=1 if $_ eq "fips"; | 145 | if ($_ eq "zlib" || $_ eq "zlib-dynamic" |
146 | || $_ eq "enable-zlib-dynamic") { | ||
147 | $zlib = 1; | ||
148 | } | ||
149 | |||
134 | 150 | ||
135 | $do_ssl=1 if $_ eq "ssleay"; | 151 | $do_ssl=1 if $_ eq "ssleay"; |
136 | if ($_ eq "ssl") { | 152 | if ($_ eq "ssl") { |
@@ -142,6 +158,8 @@ foreach (@ARGV, split(/ /, $options)) | |||
142 | $do_crypto=1; | 158 | $do_crypto=1; |
143 | $libname=$_; | 159 | $libname=$_; |
144 | } | 160 | } |
161 | $no_static_engine=1 if $_ eq "no-static-engine"; | ||
162 | $no_static_engine=0 if $_ eq "enable-static-engine"; | ||
145 | $do_update=1 if $_ eq "update"; | 163 | $do_update=1 if $_ eq "update"; |
146 | $do_rewrite=1 if $_ eq "rewrite"; | 164 | $do_rewrite=1 if $_ eq "rewrite"; |
147 | $do_ctest=1 if $_ eq "ctest"; | 165 | $do_ctest=1 if $_ eq "ctest"; |
@@ -166,8 +184,12 @@ foreach (@ARGV, split(/ /, $options)) | |||
166 | elsif (/^no-dsa$/) { $no_dsa=1; } | 184 | elsif (/^no-dsa$/) { $no_dsa=1; } |
167 | elsif (/^no-dh$/) { $no_dh=1; } | 185 | elsif (/^no-dh$/) { $no_dh=1; } |
168 | elsif (/^no-ec$/) { $no_ec=1; } | 186 | elsif (/^no-ec$/) { $no_ec=1; } |
187 | elsif (/^no-ecdsa$/) { $no_ecdsa=1; } | ||
188 | elsif (/^no-ecdh$/) { $no_ecdh=1; } | ||
169 | elsif (/^no-hmac$/) { $no_hmac=1; } | 189 | elsif (/^no-hmac$/) { $no_hmac=1; } |
170 | elsif (/^no-aes$/) { $no_aes=1; } | 190 | elsif (/^no-aes$/) { $no_aes=1; } |
191 | elsif (/^no-camellia$/) { $no_camellia=1; } | ||
192 | elsif (/^no-seed$/) { $no_seed=1; } | ||
171 | elsif (/^no-evp$/) { $no_evp=1; } | 193 | elsif (/^no-evp$/) { $no_evp=1; } |
172 | elsif (/^no-lhash$/) { $no_lhash=1; } | 194 | elsif (/^no-lhash$/) { $no_lhash=1; } |
173 | elsif (/^no-stack$/) { $no_stack=1; } | 195 | elsif (/^no-stack$/) { $no_stack=1; } |
@@ -180,6 +202,10 @@ foreach (@ARGV, split(/ /, $options)) | |||
180 | elsif (/^no-krb5$/) { $no_krb5=1; } | 202 | elsif (/^no-krb5$/) { $no_krb5=1; } |
181 | elsif (/^no-engine$/) { $no_engine=1; } | 203 | elsif (/^no-engine$/) { $no_engine=1; } |
182 | elsif (/^no-hw$/) { $no_hw=1; } | 204 | elsif (/^no-hw$/) { $no_hw=1; } |
205 | elsif (/^no-gmp$/) { $no_gmp=1; } | ||
206 | elsif (/^no-rfc3779$/) { $no_rfc3779=1; } | ||
207 | elsif (/^no-tlsext$/) { $no_tlsext=1; } | ||
208 | elsif (/^no-cms$/) { $no_cms=1; } | ||
183 | } | 209 | } |
184 | 210 | ||
185 | 211 | ||
@@ -215,8 +241,10 @@ $max_crypto = $max_num; | |||
215 | 241 | ||
216 | my $ssl="ssl/ssl.h"; | 242 | my $ssl="ssl/ssl.h"; |
217 | $ssl.=" ssl/kssl.h"; | 243 | $ssl.=" ssl/kssl.h"; |
244 | $ssl.=" ssl/tls1.h"; | ||
218 | 245 | ||
219 | my $crypto ="crypto/crypto.h"; | 246 | my $crypto ="crypto/crypto.h"; |
247 | $crypto.=" crypto/o_dir.h"; | ||
220 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; | 248 | $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des; |
221 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; | 249 | $crypto.=" crypto/idea/idea.h" ; # unless $no_idea; |
222 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; | 250 | $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4; |
@@ -231,12 +259,16 @@ $crypto.=" crypto/mdc2/mdc2.h" ; # unless $no_mdc2; | |||
231 | $crypto.=" crypto/sha/sha.h" ; # unless $no_sha; | 259 | $crypto.=" crypto/sha/sha.h" ; # unless $no_sha; |
232 | $crypto.=" crypto/ripemd/ripemd.h" ; # unless $no_ripemd; | 260 | $crypto.=" crypto/ripemd/ripemd.h" ; # unless $no_ripemd; |
233 | $crypto.=" crypto/aes/aes.h" ; # unless $no_aes; | 261 | $crypto.=" crypto/aes/aes.h" ; # unless $no_aes; |
262 | $crypto.=" crypto/camellia/camellia.h" ; # unless $no_camellia; | ||
263 | $crypto.=" crypto/seed/seed.h"; # unless $no_seed; | ||
234 | 264 | ||
235 | $crypto.=" crypto/bn/bn.h"; | 265 | $crypto.=" crypto/bn/bn.h"; |
236 | $crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; | 266 | $crypto.=" crypto/rsa/rsa.h" ; # unless $no_rsa; |
237 | $crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; | 267 | $crypto.=" crypto/dsa/dsa.h" ; # unless $no_dsa; |
238 | $crypto.=" crypto/dh/dh.h" ; # unless $no_dh; | 268 | $crypto.=" crypto/dh/dh.h" ; # unless $no_dh; |
239 | $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; | 269 | $crypto.=" crypto/ec/ec.h" ; # unless $no_ec; |
270 | $crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; | ||
271 | $crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; | ||
240 | $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; | 272 | $crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; |
241 | 273 | ||
242 | $crypto.=" crypto/engine/engine.h"; # unless $no_engine; | 274 | $crypto.=" crypto/engine/engine.h"; # unless $no_engine; |
@@ -267,7 +299,9 @@ $crypto.=" crypto/ocsp/ocsp.h"; | |||
267 | $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; | 299 | $crypto.=" crypto/ui/ui.h crypto/ui/ui_compat.h"; |
268 | $crypto.=" crypto/krb5/krb5_asn.h"; | 300 | $crypto.=" crypto/krb5/krb5_asn.h"; |
269 | $crypto.=" crypto/tmdiff.h"; | 301 | $crypto.=" crypto/tmdiff.h"; |
270 | $crypto.=" fips-1.0/fips.h fips-1.0/rand/fips_rand.h fips-1.0/sha/fips_sha.h"; | 302 | $crypto.=" crypto/store/store.h"; |
303 | $crypto.=" crypto/pqueue/pqueue.h"; | ||
304 | $crypto.=" crypto/cms/cms.h"; | ||
271 | 305 | ||
272 | my $symhacks="crypto/symhacks.h"; | 306 | my $symhacks="crypto/symhacks.h"; |
273 | 307 | ||
@@ -423,7 +457,11 @@ sub do_defs | |||
423 | 457 | ||
424 | print STDERR "DEBUG: parsing ----------\n" if $debug; | 458 | print STDERR "DEBUG: parsing ----------\n" if $debug; |
425 | while(<IN>) { | 459 | while(<IN>) { |
426 | last if (/\/\* Error codes for the \w+ functions\. \*\//); | 460 | if (/\/\* Error codes for the \w+ functions\. \*\//) |
461 | { | ||
462 | undef @tag; | ||
463 | last; | ||
464 | } | ||
427 | if ($line ne '') { | 465 | if ($line ne '') { |
428 | $_ = $line . $_; | 466 | $_ = $line . $_; |
429 | $line = ''; | 467 | $line = ''; |
@@ -436,17 +474,22 @@ sub do_defs | |||
436 | next; | 474 | next; |
437 | } | 475 | } |
438 | 476 | ||
439 | $cpp = 1 if /^\#.*ifdef.*cplusplus/; | 477 | if(/\/\*/) { |
478 | if (not /\*\//) { # multiline comment... | ||
479 | $line = $_; # ... just accumulate | ||
480 | next; | ||
481 | } else { | ||
482 | s/\/\*.*?\*\///gs;# wipe it | ||
483 | } | ||
484 | } | ||
485 | |||
440 | if ($cpp) { | 486 | if ($cpp) { |
441 | $cpp = 0 if /^\#.*endif/; | 487 | $cpp++ if /^#\s*if/; |
488 | $cpp-- if /^#\s*endif/; | ||
442 | next; | 489 | next; |
443 | } | 490 | } |
491 | $cpp = 1 if /^#.*ifdef.*cplusplus/; | ||
444 | 492 | ||
445 | s/\/\*.*?\*\///gs; # ignore comments | ||
446 | if (/\/\*/) { # if we have part | ||
447 | $line = $_; # of a comment, | ||
448 | next; # continue reading | ||
449 | } | ||
450 | s/{[^{}]*}//gs; # ignore {} blocks | 493 | s/{[^{}]*}//gs; # ignore {} blocks |
451 | print STDERR "DEBUG: \$def=\"$def\"\n" if $debug && $def ne ""; | 494 | print STDERR "DEBUG: \$def=\"$def\"\n" if $debug && $def ne ""; |
452 | print STDERR "DEBUG: \$_=\"$_\"\n" if $debug; | 495 | print STDERR "DEBUG: \$_=\"$_\"\n" if $debug; |
@@ -505,7 +548,7 @@ sub do_defs | |||
505 | } | 548 | } |
506 | } elsif (/^\#\s*endif/) { | 549 | } elsif (/^\#\s*endif/) { |
507 | my $tag_i = $#tag; | 550 | my $tag_i = $#tag; |
508 | while($tag[$tag_i] ne "-") { | 551 | while($tag_i > 0 && $tag[$tag_i] ne "-") { |
509 | my $t=$tag[$tag_i]; | 552 | my $t=$tag[$tag_i]; |
510 | print STDERR "DEBUG: \$t=\"$t\"\n" if $debug; | 553 | print STDERR "DEBUG: \$t=\"$t\"\n" if $debug; |
511 | if ($tag{$t}==2) { | 554 | if ($tag{$t}==2) { |
@@ -672,6 +715,10 @@ sub do_defs | |||
672 | "EXPORT_VAR_AS_FUNCTION", | 715 | "EXPORT_VAR_AS_FUNCTION", |
673 | "FUNCTION"); | 716 | "FUNCTION"); |
674 | next; | 717 | next; |
718 | } elsif (/^\s*DECLARE_ASN1_ALLOC_FUNCTIONS\s*\(\s*(\w*)\s*\)/) { | ||
719 | $def .= "int $1_free(void);"; | ||
720 | $def .= "int $1_new(void);"; | ||
721 | next; | ||
675 | } elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { | 722 | } elsif (/^\s*DECLARE_ASN1_FUNCTIONS_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { |
676 | $def .= "int d2i_$2(void);"; | 723 | $def .= "int d2i_$2(void);"; |
677 | $def .= "int i2d_$2(void);"; | 724 | $def .= "int i2d_$2(void);"; |
@@ -716,12 +763,21 @@ sub do_defs | |||
716 | "EXPORT_VAR_AS_FUNCTION", | 763 | "EXPORT_VAR_AS_FUNCTION", |
717 | "FUNCTION"); | 764 | "FUNCTION"); |
718 | next; | 765 | next; |
766 | } elsif (/^\s*DECLARE_ASN1_NDEF_FUNCTION\s*\(\s*(\w*)\s*\)/) { | ||
767 | $def .= "int i2d_$1_NDEF(void);"; | ||
719 | } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { | 768 | } elsif (/^\s*DECLARE_ASN1_SET_OF\s*\(\s*(\w*)\s*\)/) { |
720 | next; | 769 | next; |
770 | } elsif (/^\s*DECLARE_ASN1_PRINT_FUNCTION\s*\(\s*(\w*)\s*\)/) { | ||
771 | $def .= "int $1_print_ctx(void);"; | ||
772 | next; | ||
773 | } elsif (/^\s*DECLARE_ASN1_PRINT_FUNCTION_name\s*\(\s*(\w*)\s*,\s*(\w*)\s*\)/) { | ||
774 | $def .= "int $2_print_ctx(void);"; | ||
775 | next; | ||
721 | } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) { | 776 | } elsif (/^\s*DECLARE_PKCS12_STACK_OF\s*\(\s*(\w*)\s*\)/) { |
722 | next; | 777 | next; |
723 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || | 778 | } elsif (/^DECLARE_PEM_rw\s*\(\s*(\w*)\s*,/ || |
724 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ ) { | 779 | /^DECLARE_PEM_rw_cb\s*\(\s*(\w*)\s*,/ || |
780 | /^DECLARE_PEM_rw_const\s*\(\s*(\w*)\s*,/ ) { | ||
725 | # Things not in Win16 | 781 | # Things not in Win16 |
726 | $def .= | 782 | $def .= |
727 | "#INFO:" | 783 | "#INFO:" |
@@ -797,7 +853,7 @@ sub do_defs | |||
797 | } | 853 | } |
798 | close(IN); | 854 | close(IN); |
799 | 855 | ||
800 | my $algs = ''; | 856 | my $algs; |
801 | my $plays; | 857 | my $plays; |
802 | 858 | ||
803 | print STDERR "DEBUG: postprocessing ----------\n" if $debug; | 859 | print STDERR "DEBUG: postprocessing ----------\n" if $debug; |
@@ -809,6 +865,17 @@ sub do_defs | |||
809 | next if(/typedef\W/); | 865 | next if(/typedef\W/); |
810 | next if(/\#define/); | 866 | next if(/\#define/); |
811 | 867 | ||
868 | # Reduce argument lists to empty () | ||
869 | # fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {} | ||
870 | while(/\(.*\)/s) { | ||
871 | s/\([^\(\)]+\)/\{\}/gs; | ||
872 | s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{}) -> f | ||
873 | } | ||
874 | # pretend as we didn't use curly braces: {} -> () | ||
875 | s/\{\}/\(\)/gs; | ||
876 | |||
877 | s/STACK_OF\(\)/void/gs; | ||
878 | |||
812 | print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; | 879 | print STDERR "DEBUG: \$_ = \"$_\"\n" if $debug; |
813 | if (/^\#INFO:([^:]*):(.*)$/) { | 880 | if (/^\#INFO:([^:]*):(.*)$/) { |
814 | $plats = $1; | 881 | $plats = $1; |
@@ -819,21 +886,10 @@ sub do_defs | |||
819 | $s = $1; | 886 | $s = $1; |
820 | $k = "VARIABLE"; | 887 | $k = "VARIABLE"; |
821 | print STDERR "DEBUG: found external variable $s\n" if $debug; | 888 | print STDERR "DEBUG: found external variable $s\n" if $debug; |
822 | } elsif (/\(\*(\w*(\{[0-9]+\})?)\([^\)]+/) { | 889 | } elsif (/TYPEDEF_\w+_OF/s) { |
823 | $s = $1; | ||
824 | print STDERR "DEBUG: found ANSI C function $s\n" if $debug; | ||
825 | } elsif (/\w+\W+(\w+)\W*\(\s*\)(\s*__attribute__\(.*\)\s*)?$/s) { | ||
826 | # K&R C | ||
827 | print STDERR "DEBUG: found K&R C function $s\n" if $debug; | ||
828 | next; | 890 | next; |
829 | } elsif (/\w+\W+\w+(\{[0-9]+\})?\W*\(.*\)(\s*__attribute__\(.*\)\s*)?$/s) { | 891 | } elsif (/(\w+)\s*\(\).*/s) { # first token prior [first] () is |
830 | while (not /\(\)(\s*__attribute__\(.*\)\s*)?$/s) { | 892 | $s = $1; # a function name! |
831 | s/[^\(\)]*\)(\s*__attribute__\(.*\)\s*)?$/\)/s; | ||
832 | s/\([^\(\)]*\)\)(\s*__attribute__\(.*\)\s*)?$/\)/s; | ||
833 | } | ||
834 | s/\(void\)//; | ||
835 | /(\w+(\{[0-9]+\})?)\W*\(\)/s; | ||
836 | $s = $1; | ||
837 | print STDERR "DEBUG: found function $s\n" if $debug; | 893 | print STDERR "DEBUG: found function $s\n" if $debug; |
838 | } elsif (/\(/ and not (/=/)) { | 894 | } elsif (/\(/ and not (/=/)) { |
839 | print STDERR "File $file: cannot parse: $_;\n"; | 895 | print STDERR "File $file: cannot parse: $_;\n"; |
@@ -864,13 +920,9 @@ sub do_defs | |||
864 | $a .= ",RSA" if($s =~ /PEM_Seal(Final|Init|Update)/); | 920 | $a .= ",RSA" if($s =~ /PEM_Seal(Final|Init|Update)/); |
865 | $a .= ",RSA" if($s =~ /RSAPrivateKey/); | 921 | $a .= ",RSA" if($s =~ /RSAPrivateKey/); |
866 | $a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/); | 922 | $a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/); |
867 | # SHA2 algorithms only defined in FIPS mode for | ||
868 | # OpenSSL 0.9.7 | ||
869 | $p .= "OPENSSL_FIPS" if($s =~ /SHA[235]/); | ||
870 | 923 | ||
871 | $platform{$s} = | 924 | $platform{$s} = |
872 | &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); | 925 | &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p); |
873 | $algorithm{$s} = '' if !defined $algorithm{$s}; | ||
874 | $algorithm{$s} .= ','.$a; | 926 | $algorithm{$s} .= ','.$a; |
875 | 927 | ||
876 | if (defined($variant{$s})) { | 928 | if (defined($variant{$s})) { |
@@ -1035,9 +1087,7 @@ sub is_valid | |||
1035 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { | 1087 | if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { |
1036 | return 1; | 1088 | return 1; |
1037 | } | 1089 | } |
1038 | if ($keyword eq "OPENSSL_FIPS" && $fips) { | 1090 | if ($keyword eq "ZLIB" && $zlib) { return 1; } |
1039 | return 1; | ||
1040 | } | ||
1041 | return 0; | 1091 | return 0; |
1042 | } else { | 1092 | } else { |
1043 | # algorithms | 1093 | # algorithms |
@@ -1058,8 +1108,12 @@ sub is_valid | |||
1058 | if ($keyword eq "DSA" && $no_dsa) { return 0; } | 1108 | if ($keyword eq "DSA" && $no_dsa) { return 0; } |
1059 | if ($keyword eq "DH" && $no_dh) { return 0; } | 1109 | if ($keyword eq "DH" && $no_dh) { return 0; } |
1060 | if ($keyword eq "EC" && $no_ec) { return 0; } | 1110 | if ($keyword eq "EC" && $no_ec) { return 0; } |
1111 | if ($keyword eq "ECDSA" && $no_ecdsa) { return 0; } | ||
1112 | if ($keyword eq "ECDH" && $no_ecdh) { return 0; } | ||
1061 | if ($keyword eq "HMAC" && $no_hmac) { return 0; } | 1113 | if ($keyword eq "HMAC" && $no_hmac) { return 0; } |
1062 | if ($keyword eq "AES" && $no_aes) { return 0; } | 1114 | if ($keyword eq "AES" && $no_aes) { return 0; } |
1115 | if ($keyword eq "CAMELLIA" && $no_camellia) { return 0; } | ||
1116 | if ($keyword eq "SEED" && $no_seed) { return 0; } | ||
1063 | if ($keyword eq "EVP" && $no_evp) { return 0; } | 1117 | if ($keyword eq "EVP" && $no_evp) { return 0; } |
1064 | if ($keyword eq "LHASH" && $no_lhash) { return 0; } | 1118 | if ($keyword eq "LHASH" && $no_lhash) { return 0; } |
1065 | if ($keyword eq "STACK" && $no_stack) { return 0; } | 1119 | if ($keyword eq "STACK" && $no_stack) { return 0; } |
@@ -1072,6 +1126,12 @@ sub is_valid | |||
1072 | if ($keyword eq "ENGINE" && $no_engine) { return 0; } | 1126 | if ($keyword eq "ENGINE" && $no_engine) { return 0; } |
1073 | if ($keyword eq "HW" && $no_hw) { return 0; } | 1127 | if ($keyword eq "HW" && $no_hw) { return 0; } |
1074 | if ($keyword eq "FP_API" && $no_fp_api) { return 0; } | 1128 | if ($keyword eq "FP_API" && $no_fp_api) { return 0; } |
1129 | if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; } | ||
1130 | if ($keyword eq "GMP" && $no_gmp) { return 0; } | ||
1131 | if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; } | ||
1132 | if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } | ||
1133 | if ($keyword eq "CMS" && $no_cms) { return 0; } | ||
1134 | if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } | ||
1075 | 1135 | ||
1076 | # Nothing recognise as true | 1136 | # Nothing recognise as true |
1077 | return 1; | 1137 | return 1; |
@@ -1174,8 +1234,6 @@ EOO | |||
1174 | 1234 | ||
1175 | LIBRARY $libname $liboptions | 1235 | LIBRARY $libname $liboptions |
1176 | 1236 | ||
1177 | DESCRIPTION '$description' | ||
1178 | |||
1179 | EOF | 1237 | EOF |
1180 | 1238 | ||
1181 | if ($W16) { | 1239 | if ($W16) { |