Check early that the config target exists and isn't a template

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6885)
This commit is contained in:
Richard Levitte 2018-08-07 12:38:16 +02:00
parent 2b98842325
commit 4e36044547
1 changed files with 3 additions and 2 deletions

View File

@ -1034,11 +1034,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});
foreach (keys %target_attr_translate) {
$target{$target_attr_translate{$_}} = $target{$_}
if $target{$_};