1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

If OPENSSL_NO_COMP is defined, omit merging the compression flag.

Also make some code more compact, as suggested by kbrand.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1348656 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2012-06-10 20:21:38 +00:00
parent 6dd8ce1c33
commit 88d5d9dbb2
3 changed files with 18 additions and 9 deletions

View File

@@ -654,17 +654,15 @@ static void ssl_init_ctx_protocol(server_rec *s,
}
#endif
#ifndef OPENSSL_NO_COMP
if (sc->compression == FALSE) {
#ifdef SSL_OP_NO_COMPRESSION
/* OpenSSL >= 1.0 only */
if (sc->compression == FALSE) {
/* OpenSSL >= 1.0 only */
SSL_CTX_set_options(ctx, SSL_OP_NO_COMPRESSION);
}
#elif OPENSSL_VERSION_NUMBER >= 0x00908000L
/* workaround for OpenSSL 0.9.8 */
if (sc->compression == FALSE) {
STACK_OF(SSL_COMP)* comp_methods;
comp_methods = SSL_COMP_get_compression_methods();
sk_SSL_COMP_zero(comp_methods);
sk_SSL_COMP_zero(SSL_COMP_get_compression_methods());
#endif
}
#endif