fix: Attempt to load SSL certs when connecting
based on barrier: c0ce8937, 4d73ed9f
This commit is contained in:
parent
3abf38aff9
commit
3e7b14cbd4
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue