Check early that the config target exists and isn't a template
authorRichard Levitte <levitte@openssl.org>
Tue, 7 Aug 2018 10:38:16 +0000 (12:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 7 Aug 2018 15:22:55 +0000 (17:22 +0200)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6885)

(cherry picked from commit 4e360445473c3da938703a8142a36cf6ee86a191)

Configure

index 7e482f77701a171188d3c7a595c503a3e9c93a77..d85ff6aa4da91573b25406ae0877b508e3766757 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -911,11 +911,12 @@ if ($d) {
        $target = $t;
     }
 }
+
+&usage if !$table{$target} || $table{$target}->{template};
+
 $config{target} = $target;
 my %target = resolve_config($target);
 
-&usage if (!%target || $target{template});
-
 my %conf_files = map { $_ => 1 } (@{$target{_conf_fname_int}});
 $config{conf_files} = [ sort keys %conf_files ];
 %target = ( %{$table{DEFAULTS}}, %target );