} elsif (!defined $thiskey) {
next;
} elsif ($type eq 'sig' || $type eq 'rev') {
- if (($keyid eq '0' x 16) || ($created == 0)) {
+ if (($keyid eq '0' x 16) || ($created eq "") || ($created == 0)) {
push @KEYIDS, $thiskey;
- info("Adding $thiskey");
+ info("Key $thiskey needs cleaning.");
$thiskey = undef;
};
};
};
my $keyinfo = $stdout;
my @publine = grep { /^pub/ } (split /\n/, $stdout);
+ if ($#publine < 0) {
+ warn ("No public key found for $keyid.\n");
+ next;
+ }
my (undef, undef, undef, undef, $longkeyid, undef, undef, undef, undef, undef, undef, $flags) = split /:/, pop @publine;
my $can_encrypt = $flags =~ /E/;
unless (defined $longkeyid) {