From bd3a8be9564d0af65642ca7d69efc4aa4274d1de Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Sun, 19 Jul 2020 11:56:14 +0300 Subject: [PATCH] net: Always report the filename of the cert that fails to load --- src/lib/net/SecureSocket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp index 5ae443bf..603ba805 100644 --- a/src/lib/net/SecureSocket.cpp +++ b/src/lib/net/SecureSocket.cpp @@ -349,19 +349,19 @@ bool SecureSocket::loadCertificates(const std::string& filename) int r = 0; r = SSL_CTX_use_certificate_file(m_ssl->m_context, filename.c_str(), SSL_FILETYPE_PEM); if (r <= 0) { - showError("could not use ssl certificate"); + showError("could not use ssl certificate: " + filename); return false; } r = SSL_CTX_use_PrivateKey_file(m_ssl->m_context, filename.c_str(), SSL_FILETYPE_PEM); if (r <= 0) { - showError("could not use ssl private key"); + showError("could not use ssl private key: " + filename); return false; } r = SSL_CTX_check_private_key(m_ssl->m_context); if (!r) { - showError("could not verify ssl private key"); + showError("could not verify ssl private key: " + filename); return false; }