fix memory leak
[openssl.git] / util / mkdef.pl
index 8d3f97060e064fedbcc3638c26ca223995ad8d8f..696365d08afbb38b6b710a86115087127b79bdeb 100755 (executable)
@@ -79,7 +79,8 @@ my $OS2=0;
 my $safe_stack_def = 0;
 
 my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
-                       "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS" );
+                       "EXPORT_VAR_AS_FUNCTION", "ZLIB",
+                       "OPENSSL_FIPS", "OPENSSL_FIPSCAPABLE" );
 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",
@@ -226,8 +227,7 @@ foreach (@ARGV, split(/ /, $options))
        elsif (/^no-tlsext$/)   { $no_tlsext=1; }
        elsif (/^no-cms$/)      { $no_cms=1; }
        elsif (/^no-ec2m$/)     { $no_ec2m=1; }
-       elsif (/^no-nistp224-64-gcc-128$/)      { $no_nistp_gcc=1; }
-       elsif (/^no-ec2m$/)     { $no_nistp_gcc=1; }
+       elsif (/^no-ec-nistp224-64-gcc-128$/)   { $no_nistp_gcc=1; }
        elsif (/^no-nextprotoneg$/)     { $no_nextprotoneg=1; }
        elsif (/^no-ssl2$/)     { $no_ssl2=1; }
        elsif (/^no-capieng$/)  { $no_capieng=1; }
@@ -1137,6 +1137,9 @@ sub is_valid
                        if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
                                return 1;
                        }
+                       if ($keyword eq "OPENSSL_FIPSCAPABLE") {
+                               return 0;
+                       }
                        if ($keyword eq "OPENSSL_FIPS" && $fips) {
                                return 1;
                        }
@@ -1186,7 +1189,7 @@ sub is_valid
                        if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
                        if ($keyword eq "PSK" && $no_psk) { return 0; }
                        if ($keyword eq "CMS" && $no_cms) { return 0; }
-                       if ($keyword eq "NISTP224-64-GCC-128" && $no_nistp_gcc)
+                       if ($keyword eq "EC_NISTP224_64_GCC_128" && $no_nistp_gcc)
                                        { return 0; }
                        if ($keyword eq "EC2M" && $no_ec2m) { return 0; }
                        if ($keyword eq "NEXTPROTONEG" && $no_nextprotoneg) { return 0; }
@@ -1485,6 +1488,7 @@ sub update_numbers
                next if defined($rsyms{$sym});
                die "ERROR: Symbol $sym had no info attached to it."
                    if $i eq "";
+               next if $i =~ /OPENSSL_FIPSCAPABLE/;
                if (!exists $nums{$s}) {
                        $new_syms++;
                        my $s2 = $s;