]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Move ZLIB from 'platforms' to 'features'
authorRichard Levitte <levitte@openssl.org>
Fri, 14 Sep 2018 13:19:37 +0000 (15:19 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 3 Oct 2018 20:16:10 +0000 (22:16 +0200)
Having it as a 'platform' was conceptually wrong from from the
beginning, and makes decoding more complicated than necessary.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7191)

util/libcrypto.num
util/mkdef.pl
util/mknum.pl

index bad3a3814ecdc1ba7f16bb395dd93c7b1907c980..ecece3824fb2be895a385b323168b942df2205ed 100644 (file)
@@ -2529,7 +2529,7 @@ ASN1_STRING_type_new                    2494      1_1_0   EXIST::FUNCTION:
 TS_STATUS_INFO_free                     2495   1_1_0   EXIST::FUNCTION:TS
 BN_mod_mul                              2496   1_1_0   EXIST::FUNCTION:
 CMS_add0_recipient_key                  2497   1_1_0   EXIST::FUNCTION:CMS
-BIO_f_zlib                              2498   1_1_0   EXIST:ZLIB:FUNCTION:COMP
+BIO_f_zlib                              2498   1_1_0   EXIST::FUNCTION:COMP,ZLIB
 AES_cfb128_encrypt                      2499   1_1_0   EXIST::FUNCTION:
 ENGINE_set_EC                           2500   1_1_0   EXIST::FUNCTION:ENGINE
 d2i_ECPKParameters                      2501   1_1_0   EXIST::FUNCTION:EC
index 2eccf1cf25c1bef050566708404c5540833ae336..959a13d6a551bb137388ceb90459b7b1ba7ac0eb 100755 (executable)
@@ -176,15 +176,12 @@ sub platform_filter {
 
 sub feature_filter {
     my $item = shift;
-    my %platforms = ( $item->platforms() );
     my @features = ( $item->features() );
 
     # True if no features are defined
-    return 1 if scalar @features == 0 && scalar keys %platforms == 0;
+    return 1 if scalar @features == 0;
 
-    my $verdict =
-        !( ( grep { $disabled_uc{$_} } @features )
-           || ( grep { $_ eq 'ZLIB' && $disabled_uc{$_} } keys %platforms ) );
+    my $verdict = ! grep { $disabled_uc{$_} } @features;
 
     if ($apiv) {
         foreach (@features) {
index 7964252bc4ab33f69e9ba8ec7af2e2c403a2f815..6d9b9d52a9ae052b9c55d2d711c38620dcfba03b 100755 (executable)
@@ -79,7 +79,7 @@ my $aix=0;
 my $safe_stack_def = 0;
 
 my @known_platforms = ( "__FreeBSD__", "PERL5",
-                       "EXPORT_VAR_AS_FUNCTION", "ZLIB", "_WIN32"
+                       "EXPORT_VAR_AS_FUNCTION", "_WIN32"
                        );
 my @known_ossl_platforms = ( "UNIX", "VMS", "WIN32", "WINNT", "OS2" );
 my @known_algorithms = ( # These are algorithms we know are guarded in relevant
@@ -267,6 +267,7 @@ sub do_defs
                        _WINDLL         => 0,
                        CONST_STRICT    => 0,
                        TRUE            => 1,
+                       ZLIB            => 0,
                );
                my $symhacking = $file eq $symhacksfile;
                my @current_platforms = ();
@@ -524,6 +525,8 @@ sub do_defs
                                push @current_algorithms,
                                    grep { /^DEPRECATEDIN_/ && $tag{$_} == 1 }
                                    @known_algorithms;
+                               push @current_algorithms, "ZLIB"
+                                   if $tag{ZLIB} == 1;
                                $def .=
                                    "#INFO:"
                                        .join(',',@current_platforms).":"
@@ -994,12 +997,11 @@ sub is_valid
                        if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && $W32) {
                                return 1;
                        }
-                       if ($keyword eq "ZLIB" && $zlib) { return 1; }
                        return 0;
                } else {
                        # algorithms
                        if ($disabled_algorithms{$keyword}) { return 0;}
-
+                       if ($keyword eq "ZLIB" && $zlib) { return 1; }
                        # Nothing recognise as true
                        return 1;
                }