fix: Attempt to load SSL certs when connecting

based on barrier: c0ce8937, 4d73ed9f
This commit is contained in:
sithlord48
2024-11-29 11:05:25 -05:00
committed by Nick Bolton
parent 3abf38aff9
commit 3e7b14cbd4

View File

@ -454,6 +454,15 @@ int SecureSocket::secureConnect(int socket)
{
std::lock_guard<std::mutex> ssl_lock{ssl_mutex_};
std::string certDir =
deskflow::string::sprintf("%s/%s/%s", ARCH->getProfileDirectory().c_str(), kSslDir, kCertificateFilename);
if (!loadCertificates(certDir)) {
LOG((CLOG_ERR "could not load client certificates"));
disconnect();
return -1;
}
createSSL();
// attach the socket descriptor