doc: Improve doc on passphrase_cb / pinentry mode

* doc/gpgme.texi (Passphrase Callback): Mention pinentry_mode and
restrictions.
(Pinentry Mode): Fix wording and clarify versions that need
loopback mode for passphrase_cb to work.
This commit is contained in:
Andre Heinecke 2017-04-24 16:46:09 +02:00
parent ac28e66f46
commit 8d61aba1fe
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -2597,11 +2597,11 @@ Return a Pinentry error @code{No Pinentry}.
@item GPGME_PINENTRY_MODE_LOOPBACK @item GPGME_PINENTRY_MODE_LOOPBACK
Redirect Pinentry queries to the caller. Redirect Pinentry queries to the caller.
This enables the use of @code{gpgme_set_passphrase_cb} whis pinentry This enables the use of @code{gpgme_set_passphrase_cb} because pinentry
queries redirected to gpgme. queries are redirected to gpgme.
Note: This mode requires @code{allow-loopback-pinentry} to be enabled Note: For 2.1.0 - 2.1.12 this mode requires @code{allow-loopback-pinentry}
in the @file{gpg-agent.conf} or an agent started with that option. to be enabled in the @file{gpg-agent.conf} or an agent started with that option.
@end table @end table
@end deftp @end deftp
@ -2763,6 +2763,10 @@ character before returning from the callback.
If an error occurs, return the corresponding @code{gpgme_error_t} If an error occurs, return the corresponding @code{gpgme_error_t}
value. You can use the error code @code{GPG_ERR_CANCELED} to abort value. You can use the error code @code{GPG_ERR_CANCELED} to abort
the operation. Otherwise, return @code{0}. the operation. Otherwise, return @code{0}.
Note: The passphrase_cb only works with GnuPG 1.x and 2.1.x and not
with the 2.0.x series. See @code{gpgme_set_pinentry_mode} for more
details on 2.1.x usage.
@end deftp @end deftp
@deftypefun void gpgme_set_passphrase_cb (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_passphrase_cb_t @var{passfunc}}, @w{void *@var{hook_value}}) @deftypefun void gpgme_set_passphrase_cb (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_passphrase_cb_t @var{passfunc}}, @w{void *@var{hook_value}})