Unverified Commit a0eac662 authored by boklm's avatar boklm
Browse files

Allow the keyring option to be an array

parent ade9b040
...@@ -137,9 +137,15 @@ sub matching_tbbfile { ...@@ -137,9 +137,15 @@ sub matching_tbbfile {
sub check_gpgsig { sub check_gpgsig {
my ($file) = @_; my ($file) = @_;
my $keyring = $options->{keyring} =~ m/^\// ? $options->{keyring} my @kr_args;
: "$FindBin::Bin/keyring/$options->{keyring}"; my @keyrings = ref $options->{keyring} eq 'ARRAY' ?
return system('gpg', '--no-default-keyring', '--keyring', $keyring, @{$options->{keyring}} : ($options->{keyring});
print "keyrings\n";
foreach my $keyring (@keyrings) {
my $kr = $keyring =~ m/^\// ? $keyring : "$FindBin::Bin/keyring/$keyring";
push @kr_args, '--keyring', $kr;
}
return system('gpg', '--no-default-keyring', @kr_args,
'--verify', '--', $file) == 0; '--verify', '--', $file) == 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment