1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Disable compression for SSL socket,

it is a waste of CPU when using compression extensions.
This commit is contained in:
David Galeano 2013-01-10 10:11:57 +08:00 committed by Andy Green
parent 9b3d4b2152
commit c72f6f9fa0

View file

@ -2729,6 +2729,8 @@ libwebsocket_create_context(int port, const char *interf,
return NULL;
}
SSL_CTX_set_options(context->ssl_ctx, SSL_OP_NO_COMPRESSION);
/* client context */
if (port == CONTEXT_PORT_NO_LISTEN) {
@ -2746,6 +2748,8 @@ libwebsocket_create_context(int port, const char *interf,
return NULL;
}
SSL_CTX_set_options(context->ssl_client_ctx, SSL_OP_NO_COMPRESSION);
/* openssl init for cert verification (for client sockets) */
if (!ssl_ca_filepath) {
if (!SSL_CTX_load_verify_locations(