unable to preset passphrase

Tatyana yanaty999 at yahoo.com
Thu Apr 19 23:08:50 CEST 2012


I need to automate the porcess of receiving an decrypting files encrypted with a gpg key.
Since this is supposed to be an unattended process I need to  preset a passphrase.
I run the statement (from a batch file):
---------------
gpg-agent --daemon --verbose --allow-preset-passphrase
echo abc | gpg-preset-passphrase --passphrase MyPhrase --preset 56E0E3E911D2E485189CAF087ED5DCF802FB4D8
------------
..and receive an error message:
gpg-preset-passphrase: problem with the agent
gpg-preset-passphrase: caching passphrase failed: Invalid response
 
I ran the following interactive session:gpg-agent.exe --server --allow-preset-passphrase
OK Pleased to meet you
OPTION ttyname = /dev/ttyp0
OK
OPTION ttytype=xterm
OK
OPTION lc-ctype=C
OK
OPTION lc-messages=C
OK
PRESET_PASSPHRASE 56E06E3E911D2E485189CAF087ED5DCF802FB4D8 -1 MyPhrase 
ERR 67109144 IPC parameter error <GPG Agent> - invalid hexstring
 
It says "invalid hexstring"!
I have the only secret key on this machine, and to find its keygrip or its substitute I ran:
--------------gpg2 --fingerprint --fingerprint
-----------
../AppData/Roaming/gnupg/pubring.gpg
-------------------------------------------------------------
pub 2048R/79949D47 2012-04-05
Key fingerprint = 2E9E EC17 61C1 CFB9 1B67 9A17 388C CF06 7994 9D47
uid MyName  <MyEmail>
sub 2048R/802FB4D8 2012-04-05
Key fingerprint = 56E0 6E3E 911D 2E48 5189 CAF0 87ED 5DCF 802F B4D8
 
What am I doing wrong?
Thank you, -
Tatyana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120419/99db5b22/attachment-0001.htm>


More information about the Gnupg-users mailing list