Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 37414 invoked from network); 6 Jul 2005 15:16:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jul 2005 15:16:45 -0000 Received: (qmail 86529 invoked by uid 500); 6 Jul 2005 15:16:37 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 86420 invoked by uid 500); 6 Jul 2005 15:16:36 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 86387 invoked by uid 99); 6 Jul 2005 15:16:36 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 06 Jul 2005 08:16:36 -0700 Received: (qmail 37259 invoked by uid 65534); 6 Jul 2005 15:16:33 -0000 Message-ID: <20050706151633.37256.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r209469 - in /httpd/httpd/trunk: docs/manual/mod/mod_ssl.xml docs/manual/ssl/ssl_faq.xml modules/ssl/ssl_engine_kernel.c modules/ssl/ssl_engine_vars.c Date: Wed, 06 Jul 2005 15:16:31 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: wrowe Date: Wed Jul 6 08:16:28 2005 New Revision: 209469 URL: http://svn.apache.org/viewcvs?rev=209469&view=rev Log: Add SSL_COMPRESS_METHOD variable (included in +StdEnvVars) to note the negotiated compression. Reviewed by: wrowe, Maxime Petazzoni Submitted by: Georg v. Zezschwitz Modified: httpd/httpd/trunk/docs/manual/mod/mod_ssl.xml httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c Modified: httpd/httpd/trunk/docs/manual/mod/mod_ssl.xml URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/mod/mod_ssl.xml?rev=209469&r1=209468&r2=209469&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_ssl.xml (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_ssl.xml Wed Jul 6 08:16:28 2005 @@ -65,6 +65,7 @@ SSL_CIPHER_EXPORT string true if cipher is an export cipher SSL_CIPHER_USEKEYSIZE number Number of cipher bits (actually used) SSL_CIPHER_ALGKEYSIZE number Number of cipher bits (possible) +SSL_COMPRESS_METHOD string SSL compression method negotiated SSL_VERSION_INTERFACE string The mod_ssl program version SSL_VERSION_LIBRARY string The OpenSSL program version SSL_CLIENT_M_VERSION string The version of the client certificate Modified: httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml?rev=209469&r1=209468&r2=209469&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml (original) +++ httpd/httpd/trunk/docs/manual/ssl/ssl_faq.xml Wed Jul 6 08:16:28 2005 @@ -680,6 +680,7 @@
  • HTTPS and name-based vhosts
  • Why is it not possible to use Name-Based Virtual Hosting to identify different SSL virtual hosts?
  • +
  • How do I get SSL compression working?
  • The lock icon in Netscape locks very late
  • Why do I get I/O errors with MSIE clients?
  • Why do I get I/O errors with NS clients?
  • @@ -802,6 +803,23 @@

    Use separate IP addresses for different SSL hosts. Use different port numbers for different SSL hosts.

    + + +
    How do I get SSL compression working? +

    Although SSL compression negotiation was already defined in the specification +of SSLv2 and TLS, it took until May 2004 when RFC 3749 defined DEFLATE as +a negotiable standard compression method. +

    +

    OpenSSL 0.9.8 started to support this by default when compiled with the +zlib option. If both the client and the server support compression, +it will be used. However, most clients still try to initially connect with an +SSLv2 Hello. As SSLv2 did not include an array of prefered compression algorithms +in its handshake, compression can not be negotiated with these clients. +If the client disables support for SSLv2, based on the used SSL library +a SSLv3 or TLS Hello might be sent and compression might be set up. +You can verify if clients make use of SSL compression by logging the +%{SSL_COMPRESS_METHOD}x variable. +

    When I use Basic Authentication over HTTPS the lock icon in Netscape browsers Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c?rev=209469&r1=209468&r2=209469&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c (original) +++ httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c Wed Jul 6 08:16:28 2005 @@ -946,6 +946,7 @@ "SSL_VERSION_INTERFACE", "SSL_VERSION_LIBRARY", "SSL_PROTOCOL", + "SSL_COMPRESS_METHOD", "SSL_CIPHER", "SSL_CIPHER_EXPORT", "SSL_CIPHER_USEKEYSIZE", Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c?rev=209469&r1=209468&r2=209469&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c (original) +++ httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c Wed Jul 6 08:16:28 2005 @@ -50,6 +50,7 @@ static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var); static void ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize); static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var); +static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl); static int ssl_is_https(conn_rec *c) { @@ -296,6 +297,9 @@ if ((xs = SSL_get_certificate(ssl)) != NULL) result = ssl_var_lookup_ssl_cert(p, xs, var+7); } + else if (ssl != NULL && strcEQ(var, "COMPRESS_METHOD")) { + result = ssl_var_lookup_ssl_compress_meth(ssl); + } return result; } @@ -708,6 +712,39 @@ } ERR_clear_error(); + return result; +} + +static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl) +{ + char *result = "NULL"; +#ifdef OPENSSL_VERSION_NUMBER +#if (OPENSSL_VERSION_NUMBER >= 0x00908000) + SSL_SESSION *pSession = SSL_get_session(ssl); + + if (pSession) { + switch (pSession->compress_meth) { + case 0: + /* default "NULL" already set */ + break; + + /* Defined by RFC 3749, deflate is coded by "1" */ + case 1: + result = "DEFLATE"; + break; + + /* IANA assigned compression number for LZS */ + case 0x40: + result = "LZS"; + break; + + default: + result = "UNKNOWN"; + break; + } + } +#endif +#endif return result; }