summaryrefslogtreecommitdiff
path: root/methods/connect.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-06-29 12:47:55 +0200
committerJulian Andres Klode <jak@debian.org>2017-06-29 12:54:30 +0200
commit5e9c1b36764109ab13232188892730c326fb41e8 (patch)
treeb8cae4d7006499fe58ebbfbdf32d70159442ca73 /methods/connect.cc
parentec0ebf784d15821786334a4781d0b58b0b163363 (diff)
Improve error message if system CA store is empty
Tell the user to install ca-certificates. Closes: #866377
Diffstat (limited to 'methods/connect.cc')
-rw-r--r--methods/connect.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/connect.cc b/methods/connect.cc
index ae70e48ec..63787226d 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -659,7 +659,10 @@ bool UnwrapTLS(std::string Host, std::unique_ptr<MethodFd> &Fd,
// Credential setup
if ((err = gnutls_certificate_set_x509_system_trust(tlsFd->credentials)) <= 0)
- return _error->Error("Could not load TLS certificates: %s", gnutls_strerror(err));
+ return _error->Error("Could not load TLS certificates: %s",
+ err == 0
+ ? "No certificates available. Try installing ca-certificates."
+ : gnutls_strerror(err));
std::string fileinfo = Owner->ConfigFind("CaInfo", "");
if (!fileinfo.empty())