Jim Hull [Wed, 23 Apr 2014 04:29:46 +0000 (21:29 -0700)]
Fix code naming consistency. Additionally, put back the default to SSLv23_client_method/SSLv23_server_method since it is already handling TLS and does a graceful degradation to prior SSL/TLS versions (check man page, also examine ssl23_client_hello in openssl code)
Jim Hull [Sat, 7 Dec 2013 17:58:01 +0000 (09:58 -0800)]
Fixed a bug where a single large write would cause a CPU spike and data would be sent at a snails pace. This was due to the buffer m_sSend being erase from the front after every small write/send operation. The fix to this is to simple track a last sent position in m_sSend and then do the erase/clear operation at once when the writing is done.
Jim Hull [Mon, 26 Dec 2011 01:13:26 +0000 (17:13 -0800)]
switch to sockaddr_storage and getnameinfo in Accept, GetRemoteIP, GetLocalIP. Cleans up the code a bit using more abstract concepts. Deprecate use of gethostbyname
Ingmar Runge [Wed, 9 Nov 2011 22:11:40 +0000 (23:11 +0100)]
Win32: Make connect() blocking when trying to connect via IPv6. This is required to have the IPv4 fallback in Csock::GetAddrInfo() work correctly. When connect() is in none-blocking mode, there doesn't seem to be a way to retrieve the ENETUNREACH/EHOSTUNREACH error code.
Ingmar Runge [Wed, 9 Nov 2011 21:14:13 +0000 (22:14 +0100)]
Win32: check for IPV6_V6ONLY socket option availability at runtime. This way, Server 2008/Vista users and above can use this feature even if the app has been compiled with XP (or lower) compatibility.
Ingmar Runge [Wed, 9 Nov 2011 20:54:48 +0000 (21:54 +0100)]
Csock destructor: The destructor may call closesocket() or other winsock API methods that (re)set WSAGetLastError() to SUCCESS when there really has been an error before. Since destruction of the socket may be triggered from within Csock classes, unknowingly to the outside callers, the error code should be preserverd.
Jim Hull [Wed, 19 Oct 2011 02:11:09 +0000 (19:11 -0700)]
refactor some code, to make m_bssl more obvious of what its intent is. Fix segfault identified by Kyle Fuller where SSL_read/SSL_write were using a NULL ssl pointer. Fixed return type for GetPeerFingerPrint
Jim Hull [Mon, 26 Sep 2011 00:12:26 +0000 (17:12 -0700)]
got rid of the old thinking where Csock could be used stand-alone. Its been deprecated for some time and is no longer used by anything. Now everything is presumed to be non-blocking io
Jim Hull [Sun, 25 Sep 2011 01:24:38 +0000 (18:24 -0700)]
I never really liked how I wrote TSocketManager. I thought it would be convenient to have ease of use with different Csock derivitives. It didn't take long before I got annoyed with all the code in the header but I never had the time to change it. So now I have. CSocketManager is now the major class, and TSocketManager is now a very simple template class that makes the object factory convenient. The bulk of the code is now in the cc file
Jim Hull [Sat, 17 Sep 2011 02:01:03 +0000 (19:01 -0700)]
created CSockCommon to share common code between Csock and TSockManager. Added a new method to monitor file descriptors that are outside of the normal purview of Csock
Jim Hull [Sat, 25 Jun 2011 15:35:46 +0000 (08:35 -0700)]
Refactor some code so that it unifies the read bit set.
Fix a bug resulting is massive CPU spiking
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631590
The end result is instead of setting the write bit when the SSL session
isn't established, but there is data to send we'll just turn the
select timeout way down
Uli Schlachter [Fri, 27 May 2011 19:12:51 +0000 (21:12 +0200)]
Fix a NULL dereference with ares and empty replies
c-ares used to set status to ARES_ENODATA if it didn't get any data for a DNS
reply which didn't fail (e.g. a CNAME response without any "useful" replies).
However, this was changed in the following commit (part of c-ares 1.7.4):
Jim Hull [Sun, 3 Apr 2011 00:36:27 +0000 (17:36 -0700)]
Per psychon:
CheckTimeout() assumes that it is called after have the timeout has
passed (so that it can handle clock jumps)
so GetDynamicSleepTime() must return a timeout that is in
half-the-timeout seconds, not the whole timeout in the future
I moved this into the new Csock::GetNextCheckTimeout() because there
is no getter got Csock::m_iTcount
Uli Schlachter [Fri, 7 Jan 2011 15:44:20 +0000 (16:44 +0100)]
Include defines.h earlier
This commit moves the include for defines.h to the beginning of Csocket.h. This
is needed for projects that use a file like config.h for defining symbols like
HAVE_C_ARES and HAVE_LIBSSL.
Signed-off-by: Uli Schlachter <redacted> Signed-off-by: Jim Hull <redacted>