1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/lib
Andy Green 73abc25cb5 deal with SSL_ERROR_WANT_ in client connect action
"4b0e01f Retry SSL_connect when SSL_get_error requests it. " from David Galeano
noticed the problem that client connect may receive SSL_ERROR_WANT_* from
SSL_connect, which is basically WOULDBLOCK.  That patch tried to deal with it
by blocking in a while(1) until the condition went away.

That's problematic because of it blocks service of anything else (including
the host application sockets in the external socket poll sharing case) for
up to 5s controlled by conditions at one client.

After fiddling with and researching this, the actual problem with the code is
we are not getting the SSL layer error correctly, it is not contained in the
code returned from the Connect api directly.

I was unable to get a renegotiation forced on my modern SSL libs, it complained
about protocol error are reopened the connection instead.  So I think the stuff
found in the docs and the web about the SSL_ERROR_WANT_ is probably not something
we will see in reality (if we check the right error code...)

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-15 15:43:31 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c introduce logging api and convert all library output to use it 2013-01-10 22:16:37 +08:00
client-handshake.c deal with SSL_ERROR_WANT_ in client connect action 2013-01-15 15:43:31 +08:00
extension-deflate-frame.c logging ensure everyone has a newline 2013-01-15 15:41:15 +08:00
extension-deflate-frame.h Separate compression levels for server and client, 2013-01-10 12:45:54 +08:00
extension-deflate-stream.c introduce logging api and convert all library output to use it 2013-01-10 22:16:37 +08:00
extension-deflate-stream.h Fixed deflate-stream extension. 2013-01-09 18:17:42 +08:00
extension-x-google-mux.c audit and make all malloc check for OOM 2013-01-12 13:21:08 +08:00
extension-x-google-mux.h Use __inline for Win32 builds. 2013-01-10 10:07:16 +08:00
extension.c Added extension "deflate-frame". 2013-01-09 18:21:33 +08:00
getifaddrs.c introduce getifaddrs for toolchains without it 2013-01-12 20:39:47 +08:00
getifaddrs.h introduce getifaddrs for toolchains without it 2013-01-12 20:39:47 +08:00
handshake.c logging ensure everyone has a newline 2013-01-15 15:41:15 +08:00
libwebsockets.c deal with SSL_ERROR_WANT_ in client connect action 2013-01-15 15:43:31 +08:00
libwebsockets.h absorb README.rst into main README and code 2013-01-13 09:53:18 +08:00
Makefile.am introduce getifaddrs for toolchains without it 2013-01-12 20:39:47 +08:00
md5.c introduce-private-md5-sha1.patch 2011-01-23 17:47:08 +00:00
parsers.c logging ensure everyone has a newline 2013-01-15 15:41:15 +08:00
private-libwebsockets.h deal with SSL_ERROR_WANT_ in client connect action 2013-01-15 15:43:31 +08:00
sha-1.c Static variable is now const. 2013-01-09 15:14:31 +08:00