From 1725460728ff0a092761def02dc5ca5f067da6b9 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 29 Oct 2013 23:04:12 -0400 Subject: [PATCH] Certificates - Stores the socket in the session. --- src/TLSClient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TLSClient.cpp b/src/TLSClient.cpp index b40756e32..6d8e520fb 100644 --- a/src/TLSClient.cpp +++ b/src/TLSClient.cpp @@ -225,7 +225,11 @@ void TLSClient::connect (const std::string& host, const std::string& port) if (p == NULL) throw format (STRING_CMD_SYNC_CONNECT, host, port); +#if GNUTLS_VERSION_NUMBER >= 0x030109 + gnutls_transport_set_int (_session, _socket); +#else gnutls_transport_set_ptr (_session, (gnutls_transport_ptr_t) (long) _socket); +#endif // Perform the TLS handshake int ret;