Re: [PHP] Decrypting data with GnuPG

2003-05-30 Thread Pierre-Luc Soucy
I just tried, but that didn't correct the problem - the output.txt file is still not generated: $command = "/usr/bin/gpg --homedir=/path/to/homedir/.gnupg --no-secmem-warning --passphrase-fd 0 --always-trust --yes --output /path/to/homedir/.gpgkeys/temp/output.txt --decrypt /path/to/homedir/.

Re: [PHP] Decrypting data with GnuPG

2003-05-30 Thread Evan Nemerson
Are you appending a newline to your passphrase? $passphrase = "my gnupg passphrase\n"; On Thursday 29 May 2003 06:56 am, you wrote: > From the GnuPG docs: > > --passphrase-fd n > > Read the passphrase from file descriptor n. If you use 0 for n, the > passphrase will be read from stdin. Th

Re: [PHP] Decrypting data with GnuPG

2003-05-30 Thread Pierre-Luc Soucy
From the GnuPG docs: --passphrase-fd n Read the passphrase from file descriptor n. If you use 0 for n, the passphrase will be read from stdin. This can only be used if only one passphrase is supplied. Don't use this option if you can avoid it. I added --passphrase-fd 0 to my command so the

Re: [PHP] Decrypting data with GnuPG

2003-05-29 Thread Pierre-Luc Soucy
Hi, Does that mean that there is no way to achieve this with PHP and that I should rather use the --passphrase-fd argument? Thanks, Pierre-Luc Evan Nemerson wrote: GnuPG doesn't use stdin to read the password, which is where you're sending it. It uses a more low-level interface (check out the

Re: [PHP] Decrypting data with GnuPG

2003-05-29 Thread Evan Nemerson
GnuPG doesn't use stdin to read the password, which is where you're sending it. It uses a more low-level interface (check out the below link if you're interested) where they interact directly with the virtual console. Try piping to your command- that won't work either echo $PASSPHRASE | \ /usr/bi

[PHP] Decrypting data with GnuPG

2003-05-29 Thread Pierre-Luc Soucy
Hi, I would like to decrypt data encoded with GnuPG without including the private key passphrase in the command to prevent people from viewing it with "ps". Here is the code I wrote: $command = "/usr/bin/gpg --homedir=/path/to/.gnupg --no-secmem-warning --always-trust --yes --output /pat