File gnupg-dirmngr-Clear-the-error-count-to-try-certificate-as-binary.patch of Package gpg2.31603

From 4d19759ce5fb4962b22a8bc04c3a54e3f47d2f17 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 24 Mar 2022 13:55:32 +0900
Subject: [PATCH] dirmngr: Clear the error count to try certificate as binary.

* dirmngr/dirmngr-client.c (read_certificate): Call
log_get_errorcount.

--

GnuPG-bug-id: 5531
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
 dirmngr/dirmngr-client.c | 2 ++
 1 file changed, 2 insertions(+)

Index: gnupg-2.2.27/dirmngr/dirmngr-client.c
===================================================================
--- gnupg-2.2.27.orig/dirmngr/dirmngr-client.c
+++ gnupg-2.2.27/dirmngr/dirmngr-client.c
@@ -637,6 +637,8 @@ read_certificate (const char *fname, uns
       err = read_pem_certificate (fname, rbuf, rbuflen, 1);
       if (! err)
         return 0;
+      /* Clear the error count to try as binary certificate.  */
+      log_get_errorcount (1);
     }
 
   fp = fname? gnupg_fopen (fname, "rb") : stdin;
openSUSE Build Service is sponsored by