From 752e9a98be3e054db99650870b865e65ee188cd1 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Thu, 15 Oct 2015 18:37:40 -0400 Subject: [PATCH] Fix "tcp_require_key" to not clear the cache entry. To prevent a DoS to another client do not clear the cache entry. Only try to decrypt the data file. --- src/commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands.c b/src/commands.c index 3c536742..aaa4d91f 100644 --- a/src/commands.c +++ b/src/commands.c @@ -646,7 +646,8 @@ do_open (assuan_context_t ctx, const char *password) #ifdef WITH_GNUTLS if (!rc && client->thd->remote && config_get_boolean (client->filename, "tcp_require_key")) - rc = GPG_ERR_KEY_EXPIRED; + rc = crypto_try_decrypt (ctx, client->flags & FLAG_NO_PINENTRY, + client->filename, NULL, NULL, NULL); #endif if (!rc && !password) -- 2.11.4.GIT