Honoured monks residing in this holy place, I have a question about Crypt::OpenPGP.
I have generated a private and public key with Crypt::OpenPGP->keygen. However, when I try to use this key with OpenPGP->sign I get the following error:
PARI: *** unexpected character:
^-
I wish I could get more information about what is failing here but that is all I can squeeze out of it.. I know that the KeyId is correct or else it would have told me this, I also know that passphrase is correct.
It is also worth mentioning that I can encrypt a file without any problems, which leads me to believe that my keys are working correctly.
If any of you esteemed monks have any information that could send me in the right direction I would be very grateful.
use Crypt::OpenPGP;
my $pgp = Crypt::OpenPGP->new(
SecRing => "private.keyring",
PubRing => "public.key"
);
my $data = "Please sign me... PLZ";
my $signature = $pgp->sign(
Data => $data,
KeyID => "775B1EE7CB2F10CD",
Passphrase => "XXXXXXXX",
Detach => 1,
Clearsign => 1
) or die "Could not sign. Got error: $pgp->errstr";
print $signature;