From 5e9c1b36764109ab13232188892730c326fb41e8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 29 Jun 2017 12:47:55 +0200 Subject: Improve error message if system CA store is empty Tell the user to install ca-certificates. Closes: #866377 --- methods/connect.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 &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()) -- cgit v1.2.3