- read($instr, $data, 6) or die "could not read signature header\n";
- my ($ver, $sigtype, $pubkeyalgo, $digestalgo, $subpacketsize) = unpack('CCCCn', $data);
- if ($ver != 4) {
- printf(STDERR "We only work with version 4 signatures.");
- read($instr, $dummy, $packetlen - $readbytes) or die "Could not skip past this packet.\n";
- return;
- }
- if ($pubkeyalgo != $asym_algos->{rsa}) {
- printf(STDERR "We can only work with RSA at the moment");
- read($instr, $dummy, $packetlen - $readbytes) or die "Could not skip past this packet.\n";
- return;
- }
- if ($sigtype != $sig_types->{positive_certification}) {
- # FIXME: some weird implementations might have made generic,
- # persona, or casual certifications instead of positive
- # certifications for self-sigs. Probably should handle them too.
- read($instr, $dummy, $packetlen - $readbytes) or die "Could not skip past this packet.\n";
+ if ((! defined $data->{key}) ||
+ (! defined $data->{uid}) ||
+ (! defined $data->{uid}->{$data->{target}->{uid}})) {
+ # the user ID we are looking for has not been found yet.