initializing/unlocking key explicitely with gpg-agent
Michael Richardson
mcr at sandelman.ca
Sun Jun 8 18:56:32 CEST 2025
<#part sign=pgpmime>
Werner Koch <wk at gnupg.org> wrote:
> There are two or there ways ways: $ gpg-connect-agent
>> /let passwd abc /definq PASSPHRASE passwd preset_passphrase --inquire
>> example-cache -1
> S INQUIRE_MAXLEN 480 INQUIRE PASSPHRASE OK
>> get_passphrase example-cache X X X
> OK 31323334
>> # Second version using a hexified passphrase preset_passphrase
>> example-cache -1 616263
> OK
>> get_passphrase example-cache X X X
> OK 616263
>>
> There is also a tool which implements the above: $
> /usr/local/libexec/gpg-preset-passphrase -c -P ABC example-cache $
> gpg-connect-agent 'get_passphrase example-cache X X X' /bye OK 414243
I see, it's in /usr/lib/gnupg/gpg-preset-passphrase on debian packages.
Not sure why it's not in the $PATH. Would patches that made it prompt, and
turn off echo if isatty() be welcome?
Thank you.
More information about the Gnupg-users
mailing list