From 05c55ee260edc07cd19da56dfd00347bfe3f529c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 23 Mar 2018 08:14:58 +0100 Subject: agent: New OPTION pretend-request-origin * common/shareddefs.h (request_origin_t): New. * common/agent-opt.c (parse_request_origin): New. (str_request_origin): New. * agent/command.c (option_handler): Implement new option. -- This allows to pretend that a request originated from the extra or browser socket. Signed-off-by: Werner Koch --- common/shareddefs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'common/shareddefs.h') diff --git a/common/shareddefs.h b/common/shareddefs.h index 1594f6650..4b1442133 100644 --- a/common/shareddefs.h +++ b/common/shareddefs.h @@ -39,10 +39,23 @@ typedef enum pinentry_mode_t; +/* Values for the request origin. */ +typedef enum + { + REQUEST_ORIGIN_LOCAL = 0, + REQUEST_ORIGIN_REMOTE, + REQUEST_ORIGIN_BROWSER + } +request_origin_t; + + /*-- agent-opt.c --*/ int parse_pinentry_mode (const char *value); const char *str_pinentry_mode (pinentry_mode_t mode); +int parse_request_origin (const char *value); +const char *str_request_origin (request_origin_t mode); + #endif /*GNUPG_COMMON_SHAREDDEFS_H*/ -- cgit v1.2.3