From 6a5fa88691837ea5f4ac5ad498356f7e57c82bf5 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 29 Sep 2007 09:33:35 -0400 Subject: [PATCH] Return EPWMD_BADKEY when do_decompress fails with an incorrect header. --- src/commands.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/commands.c b/src/commands.c index 73da38a0..87dcd317 100644 --- a/src/commands.c +++ b/src/commands.c @@ -2419,14 +2419,10 @@ gpg_error_t try_xml_decrypt(assuan_context_t ctx, gint fd, struct stat st, else if (zerror != Z_DATA_ERROR) { gcry_free(inbuf); - if (!ctx) { + if (!ctx) gcry_cipher_close(gh); - warnx("%s(%i): %s", __FUNCTION__, __LINE__, gpg_strerror(GPG_ERR_COMPR_ALGO)); - } - else - log_write("%s(%i): %s", __FUNCTION__, __LINE__, gpg_strerror(GPG_ERR_COMPR_ALGO)); - return GPG_ERR_COMPR_ALGO; + return EPWMD_BADKEY; } } else { -- 2.11.4.GIT