summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-10-25 20:07:46 +0100
committerMark Wielaard <mark@klomp.org>2020-10-26 22:55:29 +0100
commit747a84b60e672cd7dedfb5f618ddd44770aada8e (patch)
tree8e35c0c11bb05383b1a6b8d453f835a8f7cd8527
parent5621fe5443da23112170235dd5cac161e5c75e65 (diff)
downloadelfutils-747a84b60e672cd7dedfb5f618ddd44770aada8e.tar.gz
debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.
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>
-rw-r--r--debuginfod/ChangeLog5
-rw-r--r--debuginfod/debuginfod-client.c1
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/debuginfod_find_debuginfo.33
4 files changed, 13 insertions, 1 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 3341f187..55857233 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -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
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 18e7b85f..0e5177bc 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -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;
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ad17e992..bde52c11 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -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.
diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3
index d9717d73..eec04e5e 100644
--- a/doc/debuginfod_find_debuginfo.3
+++ b/doc/debuginfod_find_debuginfo.3
@@ -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