GPGME - omit gpg-agent / pinentry passphrase dialog

Werner Koch wk at gnupg.org
Thu Dec 2 23:34:30 CET 2010


On Thu,  2 Dec 2010 21:59, daniel at danm.de said:

> functions that will help me to interact with gpg-agent and call
> gpg-preset-passphrase? (I haven't see such a function in GPGME's info

No; the idea behind gpg-preset-passphrase is to enable server
applications to do an appropriate startup initialization (e.g. boot time
prompt).  It is not designed to work with arbitrary applications.

In general it is questionable to rely on passphrases to protect a
secret key while at the same time storing the passphrase somewhere else
to mimic a passphrase entry.  Better don't use a passphrase then.

In case the goal is to have an interactive application with an
integrated passphrase dialog, I suggest a loop back pinentry.  That might
even be a more or less standard pinentry with its top window embedded in
the application.  Or for web applications use the PINENTRY_USER_DATA
envvar to pass the required state around.


Shalom-Salam,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list