|more useful options|
Crypt::OpenPGP encryption signatureby ksublondie (Friar)
|on Mar 27, 2013 at 02:41 UTC||Need Help??|
ksublondie has asked for the
wisdom of the Perl Monks concerning the following question:
I'm new to pgp and don't know where I'm going wrong. I have a script that transfers pgp files back & forth using ftp and encrypts and decrypts as needed using existing key files.
The current problem I have is signing while encrypting. I can encrypt just fine, but if I try to sign it during the encryption, I get the following error:
Here's the code:
Part (or rather most) of the problem is that I'm not sure what value I need to pass to SignKeyID: is it supposed to be a Crypt::OpenPGP::KeyBlock? a Crypt::OpenPGP::Signature? a string? I've tried setting it to $mysecring, a string of the file location, the secring's 8 char hex keyid, Fingerprint, userid, the 16 char hex subkeyid (all taken from the secring certificate details).
Delving into both the Crypt::OpenPGP documentation and code hasn't given me the answer...at least not one I can wrap my brain around.
Can someone enlighten me with what I'm doing wrong?
update: $mysecring and $mypubring make up the key pairs for my certificate -- $theirpubring is the public key for the party I'm sending the encrypted file to.