[Gpg4win-users-en] Unable to Preset Passphrase in GPG Agent

Robert Coscia robert.coscia at brighthorizons.com
Fri Apr 3 22:34:35 CEST 2015


Unable to Preset Passphrase in GPG Agent
My use case is to run an application that will download an encrypted file from a sftp server onto a local server and decrypt it using gpg2 command line.  I would like to preset the password so that that the process won't require user interaction.

I have installed GPG4Win version 2.2.3 on my computer. I generated a new key set using
Kleopatra application and also imported a secure and public key from a certificate.

I started the gpg agent by running the following command-line
"C:\Program Files (x86)\GNU\GnuPG\gpg-agent.exe" --allow-preset-passphrase --daemon --batch --log-file C:\Logs\gpgagent.txt --v --debug-level guru

I attempt to preset the password of one of my secure keys by running the following command line.
"C:\Program Files (x86)\GNU\GnuPG\gpg-preset-passphrase" -c   -P "PASSWORD" " B3A51B1F92D74E4D7C23F735E417D22E4C451118"

When I run the above command, I see the following message in the gpg-agent in my log file
2015-04-03 14:25:37 gpg-agent[10728] handler 0x11ec for fd 256 started
gpg-agent[10728]: chan_00000100 -> OK Pleased to meet you
gpg-agent[10728]: chan_00000100 <- PRESET_PASSPHRASE B3A51B1F92D74E4D7C23F735E417D22E4C451118 -1 54686F6D6173574F473230303521
2015-04-03 14:25:37 gpg-agent[10728] DBG: agent_put_cache `B3A51B1F92D74E4D7C23F735E417D22E4C451118' requested ttl=-1 mode=1
gpg-agent[10728]: chan_00000100 -> OK
gpg-agent[10728]: chan_00000100 <- [error: Input/output error]
2015-04-03 14:25:37 gpg-agent[10728] Assuan processing failed: Input/output error
2015-04-03 14:25:37 gpg-agent[10728] handler 0x11ec for fd 256 terminated

If I connect to the gpg-agent using gpg-connect_agent and run the Keyinfo - list command I get the following response
> keyinfo --list
S KEYINFO B3A51B1F92D74E4D7C23F735E417D22E4C451118 D - - - - - - -
OK
>

How come the gpg-preset-passphrase call is failing?  Am I missing a step?
Thanks.



Robert Coscia | IT Software Developer | Phone: 617-673-8726 | Cell: 617-359-8898


Bright Horizons Children's Centers LLC., 200 Talcott Avenue South, Watertown 
MA 02472 USA
Bright Horizons Family Solutions Limited (Co. No. 2328679), r/o 2 Crown 
Court, Rushden, Northamptonshire NN10 6BS UK

This e-mail and any attachments to it are intended only for the addressee 
and may contain information which is confidential and/or legally privileged. 
If you are not the intended recipient, you are hereby notified that any 
dissemination, distribution or copying is strictly prohibited. If you have 
received this e-mail in error, please contact the sender immediately and 
delete the material from any computer and any printout thereof. Bright 
Horizons cannot guarantee that this e-mail communication is secure or free 
of error. No liability is accepted for any viruses or for any corruption, 
amendment to or deletion of or from this e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-users-en/attachments/20150403/d9c13d34/attachment.html>


More information about the Gpg4win-users-en mailing list