mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Move a typedef to common and provide parse_pinentry_mode.
* common/agent-opt.c: New. * common/shareddefs.h: New. * common/Makefile.am: Add new files. * agent/agent.h: Include shareddefs.h. (pinentry_mode_t): Factor out to shareddefs.h. * agent/command.c (option_handler): Use parse_pinentry_mode.
This commit is contained in:
parent
4483a4f0ea
commit
8b2b8dfe5c
5 changed files with 128 additions and 24 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "../common/membuf.h"
|
||||
#include "../common/sysutils.h" /* (gnupg_fd_t) */
|
||||
#include "../common/session-env.h"
|
||||
#include "../common/shareddefs.h"
|
||||
|
||||
/* To convey some special hash algorithms we use algorithm numbers
|
||||
reserved for application use. */
|
||||
|
@ -46,16 +47,6 @@
|
|||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue