From ab1e5495e45708f43f71e1f9e8872066dc8177c0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Fri, 14 Sep 2018 15:19:37 +0200 Subject: [PATCH] Move ZLIB from 'platforms' to 'features' Having it as a 'platform' was conceptually wrong from from the beginning, and makes decoding more complicated than necessary. Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/7191) --- util/libcrypto.num | 2 +- util/mkdef.pl | 7 ++----- util/mknum.pl | 8 +++++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/util/libcrypto.num b/util/libcrypto.num index bad3a3814e..ecece3824f 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -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 diff --git a/util/mkdef.pl b/util/mkdef.pl index 2eccf1cf25..959a13d6a5 100755 --- a/util/mkdef.pl +++ b/util/mkdef.pl @@ -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) { diff --git a/util/mknum.pl b/util/mknum.pl index 7964252bc4..6d9b9d52a9 100755 --- a/util/mknum.pl +++ b/util/mknum.pl @@ -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; } -- 2.25.1