LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable
authorAndy Green <andy@warmcat.com>
Wed, 23 Mar 2016 01:22:11 +0000 (09:22 +0800)
committerAndy Green <andy@warmcat.com>
Wed, 23 Mar 2016 01:22:11 +0000 (09:22 +0800)
commitc6fd360160fce25e7e2b86ab2f3440da5ebf834f
treeff38bb6f6b33098dbf787978034d445360420cdc
parentf107e4bb85bb06b0de8bc1b1882111d28ace0260
LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable

https://github.com/warmcat/libwebsockets/issues/468

Adds lws_check_opt() to regularize multibit flag checking.

There's a new context creation flag LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT,
this is included automatically if you give any other SSL-related option flag.
If you give no SSL-related option flag, nor this one directly, then even
though SSL support may be compiled in, it is never initialized nor used for the
whole lifetime of the lws context.

Conversely in order to prepare the context to use SSL, even though, eg, you
are not listening on SSL but will use SSL client connections later, you can
give this flag explicitly to make sure SSL is initialized.

Signed-off-by: Andy Green <andy@warmcat.com>
13 files changed:
changelog
lib/client-parser.c
lib/context.c
lib/libev.c
lib/libuv.c
lib/libwebsockets.h
lib/private-libwebsockets.h
lib/server.c
lib/ssl.c
test-server/test-client.c
test-server/test-echo.c
test-server/test-fraggle.c
test-server/test-ping.c