diff options
author | Julian Andres Klode <jak@debian.org> | 2017-06-29 12:47:55 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-06-29 12:54:30 +0200 |
commit | 5e9c1b36764109ab13232188892730c326fb41e8 (patch) | |
tree | b8cae4d7006499fe58ebbfbdf32d70159442ca73 /methods/connect.cc | |
parent | ec0ebf784d15821786334a4781d0b58b0b163363 (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.cc | 5 |
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()) |