manpagez: man pages & more
info gpgme
Home | html | info | man

File: gpgme.info,  Node: Pinentry Mode,  Next: Included Certificates,  Prev: Offline Mode,  Up: Context Attributes

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:

     ‘GPGME_PINENTRY_MODE_DEFAULT’
          SINCE: 1.4.0

          Use the default of the agent, which is ask.

     ‘GPGME_PINENTRY_MODE_ASK’
          SINCE: 1.4.0

          Force the use of the Pinentry.

     ‘GPGME_PINENTRY_MODE_CANCEL’
          SINCE: 1.4.0

          Emulate use of Pinentry’s cancel button.

     ‘GPGME_PINENTRY_MODE_ERROR’
          SINCE: 1.4.0

          Return a Pinentry error ‘No Pinentry’.

     ‘GPGME_PINENTRY_MODE_LOOPBACK’
          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.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.