Subject: | wrong response from gnupg (expected SHM_INFO) |
On HP-UX 11.11 64-bit PA-RISC (HP-UX myhost B.11.11 U 9000/800) with
Perl 5.8.8 from HP and on Ubuntu 10.04 with Perl 5.10.1 and found that
if the file was not found threw the error:
wrong response from gnupg (expected SHM_INFO):
at /opt/perl_32/lib/site_perl/5.8.8/GnuPG.pm line 154
GnuPG::abort_gnupg('GnuPG=HASH(0x40017288)', 'wrong response
from gnupg (expected SHM_INFO): \x{a}') called at
/opt/perl_32/lib/site_perl/5.8.8/GnuPG.pm line 219
GnuPG::run_gnupg('GnuPG=HASH(0x40017288)') called at
/opt/perl_32/lib/site_perl/5.8.8/GnuPG.pm line 723
GnuPG::decrypt('GnuPG=HASH(0x40017288)', 'ciphertext',
'/home/test/aTESTFILE.pgp', 'output', '/home/test/TESTFILE',
'passphrase', 'test') called at ./gpgtest.pl line 6
eval {...} called at ./gpgtest.pl line 6
My script is here below.
#!/usr/bin/perl
use GnuPG qw( :algo );
my $gpg = new GnuPG();
print "in\n";
eval { $gpg->decrypt( ciphertext => "/home/test/aTESTFILE.pgp", output
=> "/home/test/TESTFILE
1546", passphrase => "mytest" ); };
print $@;
print "out\n";
When printing $@ from the eval I get the output below, as I would expect
from GnuPG since the file /home/test/aTESTFILE.pgp does not exist:
error setting up data input: No such file or directory
When I do provide the correct file name, /home/test/TESTFILE.pgp it
decrypts properly to the /home/test/TESTFILE.