From 5d515d7059631dbea3b685af0992d41ae3ce86da Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 13 Mar 2023 14:14:48 +0900 Subject: [PATCH] agent: Add oTkdaemonProgram. Signed-off-by: NIIBE Yutaka --- agent/gpg-agent.c | 6 ++++++ tkd/pkcs11.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 381999cea..15af0b37a 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -104,6 +104,7 @@ enum cmd_and_opt_values oLCmessages, oXauthority, oScdaemonProgram, + oTkdaemonProgram, oTpm2daemonProgram, oDefCacheTTL, oDefCacheTTLSSH, @@ -209,6 +210,8 @@ static gpgrt_opt_t opts[] = { /* */ N_("do not use the SCdaemon") ), ARGPARSE_s_s (oScdaemonProgram, "scdaemon-program", /* */ N_("|PGM|use PGM as the SCdaemon program") ), + ARGPARSE_s_s (oTkdaemonProgram, "tkdaemon-program", + /* */ N_("|PGM|use PGM as the TKdaemon program") ), ARGPARSE_s_s (oTpm2daemonProgram, "tpm2daemon-program", /* */ N_("|PGM|use PGM as the tpm2daemon program") ), ARGPARSE_s_n (oDisableCheckOwnSocket, "disable-check-own-socket", "@"), @@ -946,6 +949,9 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread) case oScdaemonProgram: opt.daemon_program[DAEMON_SCD] = pargs->r.ret_str; break; + case oTkdaemonProgram: + opt.daemon_program[DAEMON_TKD] = pargs->r.ret_str; + break; case oDisableScdaemon: opt.disable_daemon[DAEMON_SCD] = 1; break; case oDisableCheckOwnSocket: disable_check_own_socket = 1; break; diff --git a/tkd/pkcs11.c b/tkd/pkcs11.c index 21ef32875..1b426fe34 100644 --- a/tkd/pkcs11.c +++ b/tkd/pkcs11.c @@ -976,7 +976,6 @@ do_pksign (struct key *key, int hash_algo, return err; } -#define ENVNAME "PKCS11_MODULE" gpg_error_t token_slotlist (ctrl_t ctrl, assuan_context_t ctx) @@ -1152,7 +1151,7 @@ token_readkey (ctrl_t ctrl, assuan_context_t ctx, const char *keygrip) unsigned long r; (void)ctrl; - + (void)ctx; r = find_key (ck, keygrip, &k); if (r) return gpg_error (GPG_ERR_NO_SECKEY);