Fix #231 (GnuTLS)

This commit is contained in:
Richard Steele 2019-11-18 12:16:10 +01:00
parent 44eb473c9a
commit 39ece29fed

View File

@ -94,8 +94,6 @@ void TLSSocket_GnuTLS::connect(const string& address, const port_t port) {
try {
gnutls_server_name_set(*m_session->m_gnutlsSession, GNUTLS_NAME_DNS, address.c_str(), address.size());
m_wrapped->connect(address, port);
handshake();
@ -319,6 +317,9 @@ void TLSSocket_GnuTLS::handshake() {
// Start handshaking process
try {
string peerAddress = getPeerAddress();
gnutls_server_name_set(*m_session->m_gnutlsSession, GNUTLS_NAME_DNS, peerAddress.c_str(), peerAddress.size());
while (true) {