]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.
authorMark Wielaard <mark@klomp.org>
Sun, 25 Oct 2020 19:07:46 +0000 (20:07 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 26 Oct 2020 21:55:29 +0000 (22:55 +0100)
When a file couldn't be retrieved because of an bad HTTPS certificate
find-debuginfod currently says:
Server query failed: No such file or directory

With this patch it will say:
Server query failed: Connection refused

Signed-off-by: Mark Wielaard <mark@klomp.org>
debuginfod/ChangeLog
debuginfod/debuginfod-client.c
doc/ChangeLog
doc/debuginfod_find_debuginfo.3

index 3341f1876f225695444a97997d9d3ffc4c9b078e..558572333fb807c2cc8302ebad3bddce15c3a1b0 100644 (file)
@@ -1,3 +1,8 @@
+2020-10-25  Mark Wielaard  <mark@klomp.org>
+
+       * debuginfod-client.c (debuginfod_query_server): Translate
+       CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.
+
 2020-10-20  Frank Ch. Eigler  <fche@redhat.com>
 
        PR26756: more prometheus metrics
index 18e7b85f841c562f5db51eebfb85ca39f4dcecaf..0e5177bc688415f236fed5550290488fb9de4852 100644 (file)
@@ -871,6 +871,7 @@ debuginfod_query_server (debuginfod_client *c,
                 case CURLE_COULDNT_RESOLVE_HOST: rc = -EHOSTUNREACH; break; // no NXDOMAIN
                 case CURLE_URL_MALFORMAT: rc = -EINVAL; break;
                 case CURLE_COULDNT_CONNECT: rc = -ECONNREFUSED; break;
+                case CURLE_PEER_FAILED_VERIFICATION: rc = -ECONNREFUSED; break;
                 case CURLE_REMOTE_ACCESS_DENIED: rc = -EACCES; break;
                 case CURLE_WRITE_ERROR: rc = -EIO; break;
                 case CURLE_OUT_OF_MEMORY: rc = -ENOMEM; break;
index ad17e992e17bfa3b777cbba7b857af165aa62acb..bde52c1157b7c8d92e6d9a26fe748be965e8e8a7 100644 (file)
@@ -1,3 +1,8 @@
+2020-10-25  Mark Wielaard  <mark@klomp.org>
+
+       * debuginfod_find_debuginfo.3 (ECONNREFUSED): Document that this
+       is also returned for a bad HTTPS server certificate.
+
 2020-10-07  Frank Ch. Eigler  <fche@redhat.com>
 
        * debuginfod-find.1: Add missing .br for SYNOPSIS section.
index d9717d7346555d80353e8885dda9b91c71ed8bd9..eec04e5eaefd0f4f1a9586c1c8c9381f25e3d98e 100644 (file)
@@ -254,7 +254,8 @@ Denied access to resource located at the URL.
 
 .TP
 .BR ECONNREFUSED
-Unable to connect to remote host.
+Unable to connect to remote host. Also returned when an HTTPS connection
+couldn't be verified (bad certificate).
 
 .TP
 .BR ECONNRESET