Getting GnuPG.pm to work with gpg > 1.25
zentara
created: 2006-10-01 13:17:27
I was testing some old [cpan://GnuPG] scripts today, with my latest version of GnuPrivacyGuard ( version 1.42 ) and found a little easy to fix bug. Since the module appears to be unmaintained anymore, I'll mention it here.

First, it has been previously known, that a "strict" bugfix was to change line 267 of GnuPG.pm , to avoid the 'bareword not allowed while using strict' error

#from
 my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX  ) || 256;

#to
    my $max_fd = POSIX::sysconf( POSIX::_SC_OPEN_MAX()  ) || 256;

Second, when you use versions of gpg > 1.25 (according to a debian bug report) with GnuPG.pm, you will get a decrypt error:

protocol error: expected DECRYPTION_OKAY got PLAINTEXT:

So another fix is to change GnuPG.pm, at line 742

#from
#    $self->abort_gnupg( "protocol error: expected DECRYPTION_OKAY got $cmd: \n" ) 
#      unless $cmd =~ /DECRYPTION_OKAY/; 

#to
    $self->abort_gnupg( "protocol error: expected PLAINTEXT got $cmd: \n" )
      unless $cmd =~ /PLAINTEXT/;


I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re: Getting GnuPG.pm to work with gpg > 1.25
created: 2006-10-02 14:54:06

If you can't get the maintainer to update it, post a fixed distribution to CPAN anyway. It won't be indexed but you could ask the modules list to transfer permissions to you. Once you have that, ask PAUSE to reindex it and you're the proud maintainer of a module. Then we all win. Also, filing tickets on RT is nice because that's the public place to write down bug reports so other people can know abou them.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Re: Getting GnuPG.pm to work with gpg > 1.25
created: 2006-10-02 15:34:38
The main concern with this module si that it doesn't work if your language isn't en_US. I'm afraid that anything using gnuPG directly will remain extremely fragile and buggy anyway.
The real thing would be a module using libgpgme (though it would be Un*x only I suppose). Too bas there isn't one apparently.

perlmonks.org content © perlmonks.org and diotalevi, wazoox, zentara

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03