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:
parent
9b3d4b2152
commit
c72f6f9fa0
1 changed files with 4 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue