GPG encryption and decryption in windows

Scott Lambdin lopaki at gmail.com
Thu Jun 9 18:05:28 CEST 2011


On Thu, Jun 9, 2011 at 4:36 AM, <Sethukumar.R at sungard.com> wrote:

>  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?
>

I don't think the passphrase is needed for the encrypt command, since you
are not signing?  If you add --sign, do you get the pop up?

Does your pass phrase have double quotes around it?  Maybe more of the
command is being seen as part of the pass phrase than you expect?


>
>
>
>
> Thanks
>
> Sethukumar
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>
>


-- 
“Until we have the courage to recognize cruelty for what it is—whether its
victim is human or animal —we cannot expect things to be much better in this
world. We cannot have peace among men whose hearts delight in killing any
living creature.”—Rachel Carson, Silent Spring
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20110609/ad2c59f1/attachment.htm>


More information about the Gnupg-users mailing list