-----Original Message-----
From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 06, 2006 12:45 PM
To: beginners@perl.org
Subject: RE: Crypt::GPG produces an empty cleartext file

 

What version of Crypt:GPG are u using?

 

Derek Bellner Smith

Unix Systems Engineer

Cardinal Health Dublin, Ohio

614-757-5000 Main

614-757-8075 Direct

614-652-4336 Fax

[EMAIL PROTECTED]

 

 

Hi Derek,

 

Thanks for your response. I'm using:

 

Crypt::GPG version 1.42

Perl version 5.6.0

gpg version 1.0.6

 

-- 

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]

<http://learn.perl.org/> <http://learn.perl.org/first-response>

 

***********************************************************************

 

I have had similar issues with this version opted for the previous
version.  Here is what I found at perlmonks.org question # 229117

Did you look at the bug reports at
http://rt.cpan.org/Public/Bug/Display.html?id=14848

 

???

 

 

chinesebob <http://www.perlmonks.org/?node_id=229114>  has asked for the
wisdom of the Perl Monks concerning the following question: 

I am attempting to decrypt a file using a specific key and that key's
password. I've tried several different modules but all of them fail.
This is what I've got. 

#!/usr/bin/perl -w
use strict;
use warnings;
use GPG;
my($passphrase,$key_id) = ("passphrase","KeyName");
my $gpg= new GPG(homedir=>"/home/chinesebob/.gnupg");
die $gpg->error() if $gpg->error();
my $file=$gpg->decrypt_verify($passphrase,"try.pgp");
Comment on <http://www.perlmonks.org/?parent=229117;node_id=3333>  GPG
decryption
Download
<http://www.perlmonks.org/?displaytype=displaycode;node_id=229117>  Code

Re: GPG decryption <http://www.perlmonks.org/?node_id=229138> 
by Paladin <http://www.perlmonks.org/?node_id=221484>  on Jan 22, 2003
at 21:34 UTC

According to the docs for GPG
<http://search.cpan.org/search?mode=module&query=GPG> , decrypt_verify()
and friends take the actual text as the second argument, not a file
name. Try: 

...
open GPGFILE, "try.gpg" or die "Couldn't open try.gpg: $!";
my $text = do {local $/; <GPGFILE>};
close GPGFILE;
my $file=$gpg->decrypt_verify($passphrase,$text);
print $file->{text};
...
[reply] <http://www.perlmonks.org/?parent=229138;node_id=3333> 
[d/l] <http://www.perlmonks.org/?displaytype=displaycode;node_id=229138>

[select]
<http://www.perlmonks.org/?displaytype=selectcode;node_id=229138>  

Re: Re: GPG decryption <http://www.perlmonks.org/?node_id=229287> 
by chinesebob <http://www.perlmonks.org/?node_id=229114>  on Jan 23,
2003 at 12:02 UTC

Instead of using the module I tried the 

system(gpg ......);

and it worked. Go figure. thank you anyways.

[reply] <http://www.perlmonks.org/?parent=229287;node_id=3333> 
[d/l] <http://www.perlmonks.org/?displaytype=displaycode;node_id=229287>


Re^2: GPG decryption <http://www.perlmonks.org/?node_id=408252> 
by snookmz <http://www.perlmonks.org/?node_id=330389>  on Nov 16, 2004
at 21:28 UTC

I was racking my brain trying to work out why: 

$gpg->decrypt(pass,$text)

wasn't working for $text 

The GPG pod wasn't clear to me on this issue, thanks for clearing it up
for us Paladin :)

[reply] <http://www.perlmonks.org/?parent=408252;node_id=3333> 
[d/l] <http://www.perlmonks.org/?displaytype=displaycode;node_id=408252>

[select]
<http://www.perlmonks.org/?displaytype=selectcode;node_id=408252> 

 

 

Derek


Working together.  For life.(sm)
_________________________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk 
- Portuguese - Svenska: www.cardinalhealth.com/legal/email

Reply via email to