mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
agent: Small improvement of the server's local state.
* agent/command.c (sserver_local_s): Change flags to use only one bit. (option_handler): Make an atoi return 1 or 0. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
1f1f56e606
commit
2eeb5551c3
@ -74,22 +74,22 @@ struct server_local_s
|
|||||||
operations. It defaults to true but may be set on a per
|
operations. It defaults to true but may be set on a per
|
||||||
connection base. The global option opt.ignore_cache_for_signing
|
connection base. The global option opt.ignore_cache_for_signing
|
||||||
takes precedence over this flag. */
|
takes precedence over this flag. */
|
||||||
int use_cache_for_signing;
|
unsigned int use_cache_for_signing : 1;
|
||||||
|
|
||||||
|
/* Flags to suppress I/O logging during a command. */
|
||||||
|
unsigned int pause_io_logging : 1;
|
||||||
|
|
||||||
|
/* If this flag is set to true the agent will be terminated after
|
||||||
|
the end of the current session. */
|
||||||
|
unsigned int stopme : 1;
|
||||||
|
|
||||||
|
/* Flag indicating whether pinentry notifications shall be done. */
|
||||||
|
unsigned int allow_pinentry_notify : 1;
|
||||||
|
|
||||||
/* An allocated description for the next key operation. This is
|
/* An allocated description for the next key operation. This is
|
||||||
used if a pinnetry needs to be popped up. */
|
used if a pinnetry needs to be popped up. */
|
||||||
char *keydesc;
|
char *keydesc;
|
||||||
|
|
||||||
/* Flags to suppress I/O logging during a command. */
|
|
||||||
int pause_io_logging;
|
|
||||||
|
|
||||||
/* If this flags is set to true the agent will be terminated after
|
|
||||||
the end of the current session. */
|
|
||||||
int stopme;
|
|
||||||
|
|
||||||
/* Flag indicating whether pinentry notifications shall be done. */
|
|
||||||
int allow_pinentry_notify;
|
|
||||||
|
|
||||||
/* Malloced KEK (Key-Encryption-Key) for the import_key command. */
|
/* Malloced KEK (Key-Encryption-Key) for the import_key command. */
|
||||||
void *import_key;
|
void *import_key;
|
||||||
|
|
||||||
@ -2992,7 +2992,7 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
|
|||||||
err = session_env_setenv (ctrl->session_env, "PINENTRY_USER_DATA", value);
|
err = session_env_setenv (ctrl->session_env, "PINENTRY_USER_DATA", value);
|
||||||
}
|
}
|
||||||
else if (!strcmp (key, "use-cache-for-signing"))
|
else if (!strcmp (key, "use-cache-for-signing"))
|
||||||
ctrl->server_local->use_cache_for_signing = *value? atoi (value) : 0;
|
ctrl->server_local->use_cache_for_signing = *value? !!atoi (value) : 0;
|
||||||
else if (!strcmp (key, "allow-pinentry-notify"))
|
else if (!strcmp (key, "allow-pinentry-notify"))
|
||||||
ctrl->server_local->allow_pinentry_notify = 1;
|
ctrl->server_local->allow_pinentry_notify = 1;
|
||||||
else if (!strcmp (key, "pinentry-mode"))
|
else if (!strcmp (key, "pinentry-mode"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user