Subject: | Patch for fingerprints in PGP::Mail |
I need to retrieve the fingerprint (VALIDSIG) in PGP::Mail, so I
provide the following patch. Would you please consider it for
inclusion in the next release of PGP::Mail?
Subject: | Mail.pm.patch |
*** Mail.pm 2004-01-26 15:46:09.000000000 +0100
--- ../Mail.pm 2006-04-07 17:27:21.000000000 +0200
***************
*** 77,82 ****
--- 77,94 ----
return $self->{'keyid'}
}
+ =head2 I<$pgpmail>->B<fingerprint>();
+
+ Returns the fingerprint of this signature.
+
+ =cut
+
+ sub fingerprint {
+ my $self=shift;
+
+ return $self->{'fingerprint'}
+ }
+
=head2 I<$pgpmail>->B<data>();
Returns the signed data, run through MIME::Parser if necessary.
***************
*** 141,146 ****
--- 153,159 ----
$self->{status}="unverified";
$self->{keyid}="0x0000000000000000";
+ $self->{fingerprint}=undef;
$self->{data}=join("",@lines);
if(!$self->{PGPTEXT} && !$self->{PGPMIME}) {
***************
*** 202,207 ****
--- 215,224 ----
$self->{status}="bad";
$self->{keyid}="0x$1";
}
+ elsif ($line =~ /^\[GNUPG:\] VALIDSIG (\w+) /) {
+ $self->{status}="good";
+ $self->{fingerprint} = $1;
+ }
}
}