Deprecate the "hw" configuration options, make "padlockeng" disablable
The "hw" and "hw-.*" style options are historical artifacts, sprung
from the time when ENGINE was first designed, with hardware crypto
accelerators and HSMs in mind.
Today, these options have largely lost their value, replaced by
options such as "no-{foo}eng" and "no-engine".
This completes the transition by making "hw" and "hw-.*" deprecated,
but automatically translated into more modern variants of the same.
In the process, we get rid of the last regular expression in
Configure's @disablables, a feature that was ill supported anyway.
Also, padlock now gets treated just as every other engine.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8380)
diff --git a/Configure b/Configure
index 0e0e115..0c9037b 100755
--- a/Configure
+++ b/Configure
@@ -374,7 +374,6 @@
"fuzz-afl",
"gost",
"heartbeats",
- "hw(-.+)?",
"idea",
"makedepend",
"md2",
@@ -386,6 +385,7 @@
"pinshared",
"ocb",
"ocsp",
+ "padlockeng",
"pic",
"poly1305",
"posix-io",
@@ -434,6 +434,8 @@
my %deprecated_disablables = (
"ssl2" => undef,
"buf-freelists" => undef,
+ "hw" => "hw", # causes cascade, but no macro
+ "hw-padlock" => "padlockeng",
"ripemd" => "rmd160",
"ui" => "ui-console",
);
@@ -495,7 +497,9 @@
# Without position independent code, there can be no shared libraries or DSOs
"pic" => [ "shared" ],
"shared" => [ "dynamic-engine" ],
- "engine" => [ "afalgeng", "devcryptoeng" ],
+
+ "engine" => [ grep /eng$/, @disablables ],
+ "hw" => [ "padlockeng" ],
# no-autoalginit is only useful when building non-shared
"autoalginit" => [ "shared", "apps" ],
@@ -674,8 +678,9 @@
if (/^(no|disable|enable)-(.+)$/)
{
my $word = $2;
- if (!exists $deprecated_disablables{$word}
- && !grep { $word =~ /^${_}$/ } @disablables)
+ if ($word !~ m|hw(?:-.+)| # special treatment for hw regexp opt
+ && !exists $deprecated_disablables{$word}
+ && !grep { $word eq $_ } @disablables)
{
$unsupported_options{$_} = 1;
next;
@@ -729,6 +734,10 @@
$disabled{$deprecated_disablables{$1}} = "option";
}
}
+ elsif ($1 =~ m|hw(?:-.+)|) # deprecate hw options in regexp form
+ {
+ $deprecated_options{$_} = 1;
+ }
else
{
$disabled{$1} = "option";
@@ -1193,6 +1202,10 @@
my %skipdir = ();
my %disabled_info = (); # For configdata.pm
foreach my $what (sort keys %disabled) {
+ # There are deprecated disablables that translate to themselves.
+ # They cause disabling cascades, but should otherwise not regiter.
+ next if $deprecated_disablables{$what};
+
$config{options} .= " no-$what";
if (!grep { $what eq $_ } ( 'dso', 'threads', 'shared', 'pic',