mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
New agent option pinentry-mode.
This provides the framework and implements the ask, cancel and error. loopback will be implemented later.
This commit is contained in:
parent
35205e1300
commit
b786f0e12b
6 changed files with 197 additions and 45 deletions
|
@ -45,6 +45,18 @@
|
|||
/* Maximum length of a digest. */
|
||||
#define MAX_DIGEST_LEN 64
|
||||
|
||||
|
||||
/* Values for the pinentry mode. */
|
||||
typedef enum
|
||||
{
|
||||
PINENTRY_MODE_ASK = 0, /* Ask via pinentry (default). */
|
||||
PINENTRY_MODE_CANCEL, /* Always return a cancel error. */
|
||||
PINENTRY_MODE_ERROR, /* Return error code for no pinentry. */
|
||||
PINENTRY_MODE_LOOPBACK,/* Use an inquiry to get the value. */
|
||||
}
|
||||
pinentry_mode_t;
|
||||
|
||||
|
||||
/* A large struct name "opt" to keep global flags */
|
||||
struct
|
||||
{
|
||||
|
@ -67,7 +79,6 @@ struct
|
|||
char *startup_lc_ctype;
|
||||
char *startup_lc_messages;
|
||||
|
||||
|
||||
const char *pinentry_program; /* Filename of the program to start as
|
||||
pinentry. */
|
||||
const char *scdaemon_program; /* Filename of the program to handle
|
||||
|
@ -105,6 +116,7 @@ struct
|
|||
int ignore_cache_for_signing;
|
||||
int allow_mark_trusted;
|
||||
int allow_preset_passphrase;
|
||||
int allow_loopback_pinentry;
|
||||
int keep_tty; /* Don't switch the TTY (for pinentry) on request */
|
||||
int keep_display; /* Don't switch the DISPLAY (for pinentry) on request */
|
||||
int ssh_support; /* Enable ssh-agent emulation. */
|
||||
|
@ -149,6 +161,9 @@ struct server_control_s
|
|||
char *lc_ctype;
|
||||
char *lc_messages;
|
||||
|
||||
/* The current pinentry mode. */
|
||||
pinentry_mode_t pinentry_mode;
|
||||
|
||||
struct {
|
||||
int algo;
|
||||
unsigned char value[MAX_DIGEST_LEN];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue