mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Check if macro SSL_OP_NO_COMPRESSION is defined before trying to use it.
This commit is contained in:
parent
1aad881819
commit
cc148e4029
1 changed files with 4 additions and 0 deletions
|
@ -2729,7 +2729,9 @@ libwebsocket_create_context(int port, const char *interf,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef SSL_OP_NO_COMPRESSION
|
||||
SSL_CTX_set_options(context->ssl_ctx, SSL_OP_NO_COMPRESSION);
|
||||
#endif
|
||||
SSL_CTX_set_options(context->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
|
||||
SSL_CTX_set_cipher_list(context->ssl_ctx, CIPHERS_LIST_STRING);
|
||||
|
||||
|
@ -2750,7 +2752,9 @@ libwebsocket_create_context(int port, const char *interf,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef SSL_OP_NO_COMPRESSION
|
||||
SSL_CTX_set_options(context->ssl_client_ctx, SSL_OP_NO_COMPRESSION);
|
||||
#endif
|
||||
SSL_CTX_set_options(context->ssl_client_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
|
||||
SSL_CTX_set_cipher_list(context->ssl_client_ctx, CIPHERS_LIST_STRING);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue