--- perdition-1.19~rc5.orig/perdition/ssl.c +++ perdition-1.19~rc5/perdition/ssl.c @@ -602,6 +602,19 @@ SSL_CTX *perdition_ssl_ctx(const char *c } /* + * Set Server cipher order preference and protocols + */ + if(flag & PERDITION_SSL_SERVER) { + if(SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION | SSL_OP_CIPHER_SERVER_PREFERENCE) < 0) { + PERDITION_DEBUG_SSL_ERR("SSL_CTX_set_options"); + } + } else { + if(SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION) < 0) { + PERDITION_DEBUG_SSL_ERR("SSL_CTX_set_options"); + } + } + + /* * Set the available ciphers */ if(ciphers && SSL_CTX_set_cipher_list(ssl_ctx, ciphers) < 0) {