From 73f6c2dd4d3e5b58faf69821726988ae984fad89 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 5 Mar 2025 15:31:50 +0100 Subject: w32: On socket nonce mismatch close the socket. * agent/gpg-agent.c (start_connection_thread_std): Close socket on nonce mismatch. (start_connection_thread_extra): Ditto. (start_connection_thread_browser): Ditto. (start_connection_thread_ssh): Ditto. * dirmngr/dirmngr.c (start_connection_thread): Ditto. * kbx/keyboxd.c (start_connection_thread): Ditto. -- Usually Libassuan takes care of closing the socket but because we do the nonce check before setting up Assuan we need to explicit close it. GnuPG-bug-id: 7434 --- dirmngr/dirmngr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dirmngr') diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index cdad4f921..e99220fff 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -2259,7 +2259,8 @@ start_connection_thread (void *arg) if (check_nonce (fd, &socket_nonce)) { - log_error ("handler nonce check FAILED\n"); + log_error ("handler for fd %d FAILED nonce check\n", FD_DBG (fd)); + assuan_sock_close (fd); return NULL; } -- cgit v1.2.3