Re: PGP and MailBox
Mark Overmeer <[email protected]> Fri, 3 Sep 2004 11:07:03 +0200
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Mitar ([email protected]) [040903 10:34]: > What about a method in Mail::Box which would use GnuPG::Interface to > check message for valid PGP signature (if it contains one)? > > Something like: > if ($message->PGPverify()) { > # OK > } > else { > # not so OK > } > > Or maybe even full PGP support. :-) Well, better even: full signing support, for all kinds of encryption and signatures. I would say the interface would be something like: if($msg->isAuthentic) $msg->sign(pgp => ...) isAuthentic could return: true: sure to be correct false: sure to be incorrect undef: not verifyable Just like Mail::Message::Construct, a Mail::Message::Signing set of modules could be constructed. sub isAuthentic(@) # in Mail::Message(::Signing) { my ($self, %args) = @_; if($self->head->get('PGP-...')) { return $pgp->check($self->body->decoded, ....) } ... undef; } Well, feel invited to contribute ;-) I will provide the finishing touch, as long as there is code, docs, and tests. -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net