Next: , Previous: , Up: Context Attributes   [Contents][Index]

7.4.7 Pinentry Mode

Function: gpgme_error_t gpgme_set_pinentry_mode (gpgme_ctx_t ctx,

gpgme_pinentry_mode_t mode)

SINCE: 1.4.0

The function gpgme_set_pinentry_mode specifies the pinentry mode to be used.

For GnuPG >= 2.1 this option is required to be set to GPGME_PINENTRY_MODE_LOOPBACK to enable the passphrase callback mechanism in GPGME through gpgme_set_passphrase_cb.

Function: gpgme_pinentry_mode_t gpgme_get_pinentry_mode (gpgme_ctx_t ctx)

SINCE: 1.4.0

The function gpgme_get_pinenty_mode returns the mode set for the context.

Data type: enum gpgme_pinentry_mode_t

SINCE: 1.4.0

The gpgme_minentry_mode_t type specifies the set of possible pinentry modes that are supported by GPGME if GnuPG >= 2.1 is used. The following modes are supported:


SINCE: 1.4.0

Use the default of the agent, which is ask.


SINCE: 1.4.0

Force the use of the Pinentry.


SINCE: 1.4.0

Emulate use of Pinentry’s cancel button.


SINCE: 1.4.0

Return a Pinentry error No Pinentry.


SINCE: 1.4.0

Redirect Pinentry queries to the caller. This enables the use of gpgme_set_passphrase_cb because pinentry queries are redirected to gpgme.

Note: For 2.1.0 - 2.1.12 this mode requires allow-loopback-pinentry to be enabled in the gpg-agent.conf or an agent started with that option.