GPG encryption and decryption in windows

Sethukumar.R at sungard.com Sethukumar.R at sungard.com
Thu Jun 9 10:36:55 CEST 2011


Hi,

 

I'm trying to use GPG on windows to encrypt and decrypt some XML
messages. ON windows I'm able to encrypt with the passphrase of the
message sender passed as below:

                gpg --passphrase $passphrase$ --no-secmem-warning -e -u
$senderUserName$ -r $receiverUserName$ $xmlFileName$

 

The text inbetween any two '$' symbols are placeholders whose values are
replaced at runtime. 

On windows platform this works and the source XML file is encrypted
without prompting for the passphrase of the sender.

 

On the otherhand, when I try to decrypt the encrypted file, using a
similar syntax to pass the passphrase, it prompts for the passphrase of
the receiver at runtime (a small pop up window is open).

                gpg --passphrase $passphrase$ --no-tty --status-fd 2 -d
-o $targetFileName$ $encryptedFileName$

The passphrase passed here is that of the receiver for decryption.

 

I'm executing these commands through a java program as:

                Runtime.getRuntime().exec(command) where command is the
string form of the above command.

 

 

My question is how to get rid of the passphrase prompt during runtime in
windows platform?

 

 

Thanks

Sethukumar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110609/229dff79/attachment-0001.htm>


More information about the Gnupg-users mailing list