1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00
libwebsockets/lib/tls/openssl
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
..
lws-genaes.c jwe 2018-12-27 06:45:32 +08:00
lws-gencrypto.c jwe 2018-12-27 06:45:32 +08:00
lws-genec.c vhost: add pprotocols to vhost info 2019-03-10 08:02:02 +08:00
lws-genhash.c crypto: openssl: use EVP hmac objects directly 2 2019-01-29 15:28:56 +08:00
lws-genrsa.c jwk: openssl: fix key parameter ordering for older OpenSSL 2019-01-30 07:19:38 +08:00
openssl-client.c openssl: reuse client SSL_CTX where possible 2019-03-18 06:54:38 +08:00
openssl-server.c openssl: try to reduce memory usage 2019-03-16 10:17:28 +08:00
private.h openssl: reuse client SSL_CTX where possible 2019-03-18 06:54:38 +08:00
ssl.c openssl: reuse client SSL_CTX where possible 2019-03-18 06:54:38 +08:00
tls.c LWS_WITH_NETWORK: cmake option for no network code 2019-01-13 07:54:57 +08:00
x509.c openssl: jwk: rsa: also import p and q 2019-01-27 19:21:47 +08:00