For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > March 2004 > Crypt::OpenPGP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Crypt::OpenPGP
Alex Reid

2004-03-26, 11:12 pm

I am trying to implement the OpenPGP module for a client to encrypt an html
e-mail form. I am not sure where to set the path for the public key on the
server. I can get the script to work fine when I have a passphrase set but I
want to use a public key uploaded to the server and not a passphrase.
However when I comment the passphrase out and and use, for example, PubRing
or Recipients I get an error message "can't build entity: no body, and not
multipart". The documentation for OpenPGP states that when using recipients
I do not need a passphrase so I don't undeerstand what I am doing wrong. The
script I am using for encrypt is below. Any help with this would be
appreciated.

my $pgp = Crypt::OpenPGP->new;
my $mailData = $pgp->encrypt(
Compat => 'PGP5',
Data => $message_body,
Recipients => '0x0BFC37B5',
PubRing =>
"/home/keys/publickey.asc",
Armour => 1,
# Passphrase => 'jubgg',
);

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com