Backport of zlib compression BIO from HEAD. Update mkdef.pl script to handle
[oweals/openssl.git] / util / mkdef.pl
index 3f3ae343f3e609bf15fa76e1e71a836dd3f4d934..cb69983d7469837c0f7010d8cc1d923345451616 100755 (executable)
@@ -79,7 +79,7 @@ my $OS2=0;
 my $safe_stack_def = 0;
 
 my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
-                       "EXPORT_VAR_AS_FUNCTION" );
+                       "EXPORT_VAR_AS_FUNCTION", "ZLIB" );
 my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
 my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
@@ -96,6 +96,8 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         "STATIC_ENGINE", "ENGINE", "HW", "GMP",
                         # RFC3779 support 
                         "RFC3779",
+                        # TLS extension support
+                        "TLSEXT",
                         # Deprecated functions
                         "DEPRECATED" );
 
@@ -116,7 +118,7 @@ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
 my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; my $no_camellia;
 my $no_seed;
 my $no_fp_api; my $no_static_engine; my $no_gmp; my $no_deprecated;
-my $no_rfc3779;
+my $no_rfc3779; my $no_tlsext;
 
 
 foreach (@ARGV, split(/ /, $options))
@@ -138,6 +140,11 @@ foreach (@ARGV, split(/ /, $options))
        }
        $VMS=1 if $_ eq "VMS";
        $OS2=1 if $_ eq "OS2";
+       if ($_ eq "zlib" || $_ eq "zlib-dynamic"
+                        || $_ eq "enable-zlib-dynamic") {
+               $zlib = 1;
+       }
+
 
        $do_ssl=1 if $_ eq "ssleay";
        if ($_ eq "ssl") {
@@ -195,6 +202,7 @@ foreach (@ARGV, split(/ /, $options))
        elsif (/^no-hw$/)       { $no_hw=1; }
        elsif (/^no-gmp$/)      { $no_gmp=1; }
        elsif (/^no-rfc3779$/)  { $no_rfc3779=1; }
+       elsif (/^no-tlsext$/)   { $no_tlsext=1; }
        }
 
 
@@ -230,6 +238,7 @@ $max_crypto = $max_num;
 
 my $ssl="ssl/ssl.h";
 $ssl.=" ssl/kssl.h";
+$ssl.=" ssl/tls1.h";
 
 my $crypto ="crypto/crypto.h";
 $crypto.=" crypto/o_dir.h";
@@ -1074,6 +1083,7 @@ sub is_valid
                        if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
                                return 1;
                        }
+                       if ($keyword eq "ZLIB" && $zlib) { return 1; }
                        return 0;
                } else {
                        # algorithms
@@ -1115,6 +1125,7 @@ sub is_valid
                        if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; }
                        if ($keyword eq "GMP" && $no_gmp) { return 0; }
                        if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; }
+                       if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
                        if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
 
                        # Nothing recognise as true
@@ -1218,8 +1229,6 @@ EOO
 
 LIBRARY         $libname       $liboptions
 
-DESCRIPTION     '$description'
-
 EOF
 
        if ($W16) {