chrism01 has asked for the wisdom of the Perl Monks concerning the following question:

Monks,
I'm looking for an interface module to GPG/GnuPG.
Is there a module that 'just installs' and 'just works' ?
I've done some research on CPAN and tried installing some of them.
The 4 I've found are :
1. GPG - died of bit rot/old age (apparently)
2. GnuPG - died of bit rot/old age (apparently)
3. GnuPG::Interface - failed to install (see below)
4. Crypt::GPG - failed to install (see below)

GnuPG::Interface install errors:

Running install for module GnuPG::Interface Running make for F/FT/FTOBIN/GnuPG-Interface-0.33.tar.gz Is already unwrapped into directory /root/.cpan/build/GnuPG-Interfac +e-0.33 Has already been processed within this session Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/clearsign................FAILED tests 1-2 Failed 2/2 tests, 0.00% okay t/decrypt..................ok t/detach_sign..............FAILED tests 1-2 Failed 2/2 tests, 0.00% okay t/encrypt..................NOK 1gpg: WARNING: unsafe ownership on home +dir "test"gpg: checking the trustdb gpg: no ultimately trusted keys found unknown record type tru at blib/lib/GnuPG/Interface.pm (autosplit into + blib/lib/auto/GnuPG/Interface/get_keys.al) line 548, <GEN27> line 1. t/encrypt..................FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/encrypt_symmetrically....ok t/export_keys..............ok t/Fingerprint..............ok t/get_public_keys..........gpg: WARNING: unsafe ownership on homedir " +test" unknown record type tru at blib/lib/GnuPG/Interface.pm (autosplit into + blib/lib/auto/GnuPG/Interface/get_keys.al) line 548, <GEN14> line 1. t/get_public_keys..........ok t/get_secret_keys..........gpg: WARNING: unsafe ownership on homedir " +test" t/get_secret_keys..........ok t/import_keys..............ok t/Interface................ok t/list_public_keys.........ok t/list_secret_keys.........ok t/list_sigs................ok t/passphrase_handling......NOK 2gpg: WARNING: unsafe ownership on home +dir "test"gpg: no default secret key: unusable secret key gpg: signing failed: unusable secret key t/passphrase_handling......FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/sign.....................FAILED tests 1-2 Failed 2/2 tests, 0.00% okay t/sign_and_encrypt.........FAILED tests 1-2 Failed 2/2 tests, 0.00% okay t/UserId...................ok t/verify...................ok t/wrap_call................ok Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/clearsign.t 2 2 100.00% 1-2 t/detach_sign.t 2 2 100.00% 1-2 t/encrypt.t 3 3 100.00% 1-3 t/passphrase_handling.t 3 3 100.00% 1-3 t/sign.t 2 2 100.00% 1-2 t/sign_and_encrypt.t 2 2 100.00% 1-2 Failed 6/20 test scripts, 70.00% okay. 14/51 subtests failed, 72.55% o +kay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force <P> Crypt::GPG install:<br> Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-keygen.... NOTE: Key generation tests can take quite a long time. If the tests fail, you may not have GPG installed. Or you may need to generate more randomness on your computer (by running a recursive directory listing in the background, for example). file not found: /usr/local/bin/gpg at /root/.cpan/build/Crypt-GPG-1.52 +/blib/lib/Crypt/GPG.pm line 803 t/01-keygen....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/02-import....file not found: /usr/local/bin/gpg at /root/.cpan/build +/Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm line 803 t/02-import....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay t/03-export....file not found: /usr/local/bin/gpg at /root/.cpan/build +/Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm line 803 t/03-export....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-15 Failed 15/15 tests, 0.00% okay t/04-encdec....file not found: /usr/local/bin/gpg at /root/.cpan/build +/Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm line 803 t/04-encdec....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-15 Failed 15/15 tests, 0.00% okay t/05-sigver....file not found: /usr/local/bin/gpg at /root/.cpan/build +/Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm line 803 t/05-sigver....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-48 Failed 48/48 tests, 0.00% okay t/06-keyops....file not found: /usr/local/bin/gpg at /root/.cpan/build +/Crypt-GPG-1.52/blib/lib/Crypt/GPG.pm line 803 t/06-keyops....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-45 Failed 45/45 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/01-keygen.t 255 65280 3 6 200.00% 1-3 t/02-import.t 255 65280 1 2 200.00% 1 t/03-export.t 255 65280 15 30 200.00% 1-15 t/04-encdec.t 255 65280 15 30 200.00% 1-15 t/05-sigver.t 255 65280 48 96 200.00% 1-48 t/06-keyops.t 255 65280 45 90 200.00% 1-45 Failed 6/6 test scripts, 0.00% okay. 127/127 subtests failed, 0.00% ok +ay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force

FYI, I'm on RH FC3, perl v5.8.5 built for i386-linux-thread-multi, Linux 2.6.10-1.770_FC3smp
I really, really don't want to have to roll my own.
Surely there is one that can be used reliably?
Thx for any help
Chris

jdporter added code tags

Replies are listed 'Best First'.
Re: Looking for working GPG module
by BUU (Prior) on Feb 08, 2006 at 03:29 UTC
    Well the second error is obvious so I'm not sure why you didn't want to fix it. Beyond that I've had good luck with Crypt::OpenPGP.
Re: Looking for working GPG module
by chrism01 (Friar) on Feb 08, 2006 at 05:16 UTC
    Ok BUU,
    Crypt::OpenPGP says it installed ok :-), but did get these 2 errors along the way; do you know if they are important?
    t/11-encrypt.....ok 12/51Use of uninitialized value in concatenation ( +.) or string at lib/Crypt/OpenPGP/SKSessionKey.pm line 31. t/11-encrypt.....ok 15/51Use of uninitialized value in concatenation ( +.) or string at lib/Crypt/OpenPGP/SKSessionKey.pm line 31.
    Cheers
    Chris
    I'll see if I can use it.

    jdporter added code tags

Re: Looking for working GPG module
by chrism01 (Friar) on Feb 08, 2006 at 05:08 UTC
    Tried symlink /usr/local/bin/gpg to existing /usr/bin/gpg, then re-install Crypt::GPG, got following:

    maybe I'll take a look at your recommendation.
    Thx anyway
    Chris

    jdporter added code tags