mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-05 12:10:57 +08:00
lib/net: Present client certificate when connecting to server
This commit is contained in:
1
doc/newsfragments/client-send-certificate.feature
Normal file
1
doc/newsfragments/client-send-certificate.feature
Normal file
@@ -0,0 +1 @@
|
||||
Barrier client now sends certificate that the server can verify.
|
||||
@@ -462,9 +462,13 @@ SecureSocket::secureAccept(int socket)
|
||||
int
|
||||
SecureSocket::secureConnect(int socket)
|
||||
{
|
||||
createSSL();
|
||||
if (!load_certificates(barrier::DataDirectories::ssl_certificate_path())) {
|
||||
LOG((CLOG_ERR "could not load client certificates"));
|
||||
// FIXME: this is fatal error, but we current don't disconnect because whole logic in this
|
||||
// function needs to be cleaned up
|
||||
}
|
||||
|
||||
load_certificates(barrier::DataDirectories::ssl_certificate_path());
|
||||
createSSL();
|
||||
|
||||
// attach the socket descriptor
|
||||
SSL_set_fd(m_ssl->m_ssl, socket);
|
||||
|
||||
Reference in New Issue
Block a user