1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00
libwebsockets/lib/tls
Andy Green 555c34b044 openssl: reuse client SSL_CTX where possible
If you have multiple vhosts with client contexts enabled, under
OpenSSL each one brings in the system cert bundle.

On libwebsockets.org, there are many vhosts and the waste adds up
to about 9MB of heap.

This patch makes a sha256 from the client context configuration, and
if a suitable client context already exists on another vhost, bumps
a refcount and reuses the client context.

In the case client contexts are configured differently, a new one
is created (and is available for reuse as well).
2019-03-18 06:54:38 +08:00
..
mbedtls mbedtls: handle vhost without valid cert gracefully 2019-03-16 09:54:52 +08:00
openssl openssl: reuse client SSL_CTX where possible 2019-03-18 06:54:38 +08:00
lws-gencrypto-common.c lws-x509: validation functions 2018-12-31 20:35:54 +08:00
lws-genec-common.c old openssl: dont build with membuffer apis 2019-03-12 11:57:43 +08:00
private-network.h openssl: reuse client SSL_CTX where possible 2019-03-18 06:54:38 +08:00
private.h vhost: add pprotocols to vhost info 2019-03-10 08:02:02 +08:00
tls-client.c old openssl: dont build with membuffer apis 2019-03-12 11:57:43 +08:00
tls-network.c vhost info: add memory buffer cert support 2019-03-12 11:57:43 +08:00
tls-server.c vhost info: add memory buffer cert support 2019-03-12 11:57:43 +08:00
tls.c vhost info: add memory buffer cert support 2019-03-12 11:57:43 +08:00