diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp index 841b327f0..281427ad0 100644 --- a/src/lib/net/SecureSocket.cpp +++ b/src/lib/net/SecureSocket.cpp @@ -454,6 +454,15 @@ int SecureSocket::secureConnect(int socket) { std::lock_guard 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