Subject: Possible fix for long domain names and mod_ssl

From: [email-masked]
Date: Mon, 22 Apr 2002 13:52:44 -0500

I have encountered the same problem as Bernard L du Breuil dealing with with
long domain names and mod_ssl.

This change to mod_ssl.c in Apache 2.0.35 is from looking at a
ssl_engine_ext.c in mod_ssl version 2.8.8.

Kevin
[email-masked]

*** mod_ssl.c0  Tue Apr  2 08:30:08 2002
--- mod_ssl.c   Mon Apr 22 10:37:46 2002
***************
*** 259,264 ****
--- 259,265 ----
  static int ssl_hook_pre_connection(conn_rec *c, void *csd)
  {
      SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
+     char *cpVHostID, *cpVHostMD5;
      SSL *ssl;
      SSLConnRec *sslconn = myConnConfig(c);
      modssl_ctx_t *mctx;
***************
*** 312,320 ****
          return DECLINED; /* XXX */
      }

!     if (!SSL_set_session_id_context(ssl,
!                                     (unsigned char *)sc->vhost_id,
!                                     sc->vhost_id_len))
      {
          ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,
                  "Unable to set session id context to `%s'", sc->vhost_id);
--- 313,321 ----
          return DECLINED; /* XXX */
      }

!       cpVHostID = ssl_util_vhostid(c->pool, c->base_server);
!       cpVHostMD5 = ap_md5(c->pool, (unsigned char *)cpVHostID);
!       if (!SSL_set_session_id_context(ssl, (unsigned char *)cpVHostMD5,
strlen(cpVHostMD5)))
      {
          ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,
                  "Unable to set session id context to `%s'", sc->vhost_id);
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]