use strict; use warnings; use Test::More tests => 1; use Crypt::OpenPGP; use Crypt::Rijndael; use Config; my $message = "Hello world!\n"; my %args = (Compat => 'GnuPG'); if($^O eq 'MSWin32') { @args{qw/PubRing SecRing/} = ( '.../gnupg/pubring.gpg', '.../gnupg/secring.gpg', ) } my $pgp = Crypt::OpenPGP->new (%args); my $sig = $pgp->sign ( Data => $message, Clearsign => 1, KeyID => $ENV{GPG_SECRET_KEY}, Passphrase => $ENV{GPG_PP} ); ok ($sig) or diag ($pgp->errstr); diag $sig; diag sprintf "%-20s => v%s (%s)", 'perl', $], $Config{myuname}; diag sprintf "%-20s => v%s", 'Crypt::OpenPGP', $Crypt::OpenPGP::VERSION; diag sprintf "%-20s => v%s", 'Crypt::Rijndael', $Crypt::Rijndael::VERSION; diag qx/gpg --version/;