1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpgsm: Fix detection of too old keyboxd.

* sm/keydb.c (warn_version_mismatch): Add arg ctrl and pass on.
(create_new_context): Pass ctrl to warn function.
This commit is contained in:
Werner Koch 2020-10-05 17:54:26 +02:00
parent b258f8de7e
commit 4eb9ce8478
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -488,10 +488,11 @@ keydb_add_resource (ctrl_t ctrl, const char *url, int force, int *auto_created)
/* Print a warning if the server's version number is less than our /* Print a warning if the server's version number is less than our
version number. Returns an error code on a connection problem. */ version number. Returns an error code on a connection problem. */
static gpg_error_t static gpg_error_t
warn_version_mismatch (assuan_context_t ctx, const char *servername) warn_version_mismatch (ctrl_t ctrl, assuan_context_t ctx,
const char *servername)
{ {
return warn_server_version_mismatch (ctx, servername, 0, return warn_server_version_mismatch (ctx, servername, 0,
gpgsm_status2, NULL, gpgsm_status2, ctrl,
!opt.quiet); !opt.quiet);
} }
@ -522,7 +523,7 @@ create_new_context (ctrl_t ctrl, assuan_context_t *r_ctx)
log_info (_("no keyboxd running in this session\n")); log_info (_("no keyboxd running in this session\n"));
} }
} }
else if (!err && !(err = warn_version_mismatch (ctx, KEYBOXD_NAME))) else if (!err && !(err = warn_version_mismatch (ctrl, ctx, KEYBOXD_NAME)))
{ {
/* Place to emit global options. */ /* Place to emit global options. */
} }