aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-04-06 14:11:19 +0200
committerRichard Levitte <levitte@openssl.org>2017-04-10 12:11:00 +0200
commitf120fa1efe6377850d1ecd389a02e0e2241912bc (patch)
treeb425c25d983b2ee91a513884bcdd3de24d79e708 /util
parente361a7b285f954aead44f70f0dde35e120e1e0b3 (diff)
downloadopenssl-f120fa1efe6377850d1ecd389a02e0e2241912bc.tar.gz
Fix util/mkdef.pl
The deprecation checking code here didn't work the same way as in Configure, and used $config{options} to find an --api= option that was never there. This is replaced with checking $config{api}, which is the controlling variable for deprecation. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3126)
Diffstat (limited to 'util')
-rwxr-xr-xutil/mkdef.pl28
1 files changed, 10 insertions, 18 deletions
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 41992f57c2..c9fa98ef05 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -142,6 +142,14 @@ foreach (@known_algorithms) {
# disabled by default
$disabled_algorithms{"STATIC_ENGINE"} = 1;
+my $apiv = sprintf "%x%02x%02x", split(/\./, $config{api});
+foreach (keys %disabled_algorithms) {
+ if (/^DEPRECATEDIN_(\d+)_(\d+)_(\d+)$/) {
+ my $depv = sprintf "%x%02x%02x", $1, $2, $3;
+ $disabled_algorithms{$_} = 1 if $apiv ge $depv;
+ }
+}
+
my $zlib;
foreach (@ARGV, split(/ /, $config{options}))
@@ -177,25 +185,9 @@ foreach (@ARGV, split(/ /, $config{options}))
$do_ctest=1 if $_ eq "ctest";
$do_ctestall=1 if $_ eq "ctestall";
$do_checkexist=1 if $_ eq "exist";
- if (/^--api=(\d+)\.(\d+)\.(\d+)$/) {
- my $apiv = sprintf "%x%02x%02x", $1, $2, $3;
- foreach (keys %disabled_algorithms) {
- if (/^DEPRECATEDIN_(\d+)_(\d+)_(\d+)$/) {
- my $depv = sprintf "%x%02x%02x", $1, $2, $3;
- $disabled_algorithms{$_} = 1 if $apiv ge $depv;
- }
- }
- }
- if (/^no-deprecated$/) {
- foreach (keys %disabled_algorithms) {
- if (/^DEPRECATEDIN_/) {
- $disabled_algorithms{$_} = 1;
- }
- }
- }
- elsif (/^(enable|disable|no)-(.*)$/) {
+ if (/^(enable|disable|no)-(.*)$/) {
my $alg = uc $2;
- $alg =~ tr/-/_/;
+ $alg =~ tr/-/_/;
if (exists $disabled_algorithms{$alg}) {
$disabled_algorithms{$alg} = $1 eq "enable" ? 0 : 1;
}