1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/lib
Andy Green 224149ab58 fix ssl reject path for freeing header allocation
If the SSL connection failed before the headers came, we were not
dealing with deallocating the header malloc.  This takes care of it.

Using CyaSSL, we are then valgrind-clean for ssl client and server.

With OpenSSL, there is 88 bytes lost at init that never changes or
gets recovered.  AFAIK there's nothing to do about that.

OpenSSL also blows these during operation

==1059== Conditional jump or move depends on uninitialised value(s)
==1059==    at 0x4A0B131: bcmp (mc_replace_strmem.c:935)
==1059==    by 0x3014CDDBA8: ??? (in /usr/lib64/libcrypto.so.1.0.1c)
==1059==    by 0x3015430852: tls1_enc (in /usr/lib64/libssl.so.1.0.1c)
==1059==    by 0x3015428CEC: ssl3_read_bytes (in /usr/lib64/libssl.so.1.0.1c)
==1059==    by 0x30154264C5: ??? (in /usr/lib64/libssl.so.1.0.1c)
==1059==    by 0x4C3C596: lws_server_socket_service (server.c:153)
==1059==    by 0x4C32C1E: libwebsocket_service_fd (libwebsockets.c:927)
==1059==    by 0x4C33270: libwebsocket_service (libwebsockets.c:1225)
==1059==    by 0x401C84: main (in /usr/bin/libwebsockets-test-server)

However googling around

https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/60021
http://www.openssl.org/support/faq.html#PROG13
(also the next FAQ down)

it seems OpenSSL have a relaxed attitude to this and it's expected.
It's interesting CyaSSL works fine but doesn't have that problem...

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-11 21:43:41 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c CMake support + fixed windows build. 2013-02-06 15:49:12 +09:00
client-handshake.c fix ssl reject path for freeing header allocation 2013-02-11 21:43:41 +08:00
client-parser.c style cleanup 2013-02-11 17:13:32 +08:00
client.c fix string escape runon 2013-02-11 20:03:59 +08:00
daemonize.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-frame.c style cleanup 2013-02-11 17:13:32 +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 style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-stream.h remove fixed rx buffer allow definition per protocol 2013-02-08 13:16:07 +08:00
extension.c style cleanup 2013-02-11 17:13:32 +08:00
getifaddrs.c style cleanup 2013-02-11 17:13:32 +08:00
getifaddrs.h style cleanup 2013-02-11 17:13:32 +08:00
handshake.c style cleanup 2013-02-11 17:13:32 +08:00
libwebsockets.c fix without server 2013-02-11 19:36:15 +08:00
libwebsockets.h style cleanup 2013-02-11 17:13:32 +08:00
Makefile.am stop O2 override 2013-02-11 09:31:43 +08:00
minilex.c add lexical parser for headers 2013-01-18 01:55:48 +08:00
output.c style cleanup 2013-02-11 17:13:32 +08:00
parsers.c fix ssl reject path for freeing header allocation 2013-02-11 21:43:41 +08:00
private-libwebsockets.h fix ssl reject path for freeing header allocation 2013-02-11 21:43:41 +08:00
server-handshake.c style cleanup 2013-02-11 17:13:32 +08:00
server.c fix ssl reject path for freeing header allocation 2013-02-11 21:43:41 +08:00
sha-1.c Static variable is now const. 2013-01-09 15:14:31 +08:00