You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2001/11/28 06:44:51 UTC
cvs commit: httpd-2.0/modules/ssl mod_ssl.c mod_ssl.h ssl_engine_config.c ssl_engine_init.c
dougm 01/11/27 21:44:51
Modified: modules/ssl mod_ssl.c mod_ssl.h ssl_engine_config.c
ssl_engine_init.c
Log:
avoid calling ssl_util_vhostid() (and apr_sprintf underneath) at
request time by calling it at startup time and saving the value in the
SSLSrvConfigRec.
Revision Changes Path
1.40 +3 -4 httpd-2.0/modules/ssl/mod_ssl.c
Index: mod_ssl.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- mod_ssl.c 2001/11/28 05:05:04 1.39
+++ mod_ssl.c 2001/11/28 05:44:50 1.40
@@ -221,7 +221,6 @@
{
SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
SSL *ssl;
- unsigned char *cpVHostID;
char *cpVHostMD5;
SSLConnRec *sslconn = apr_pcalloc(c->pool, sizeof(*sslconn));
@@ -241,9 +240,9 @@
* Remember the connection information for
* later access inside callback functions
*/
- cpVHostID = (unsigned char *)ssl_util_vhostid(c->pool,c->base_server);
+
ssl_log(c->base_server, SSL_LOG_INFO, "Connection to child %d established "
- "(server %s, client %s)", c->id, cpVHostID,
+ "(server %s, client %s)", c->id, sc->szVHostID,
c->remote_ip != NULL ? c->remote_ip : "unknown");
/*
@@ -263,7 +262,7 @@
return DECLINED; /* XXX */
}
SSL_clear(ssl);
- cpVHostMD5 = ap_md5(c->pool, cpVHostID);
+ cpVHostMD5 = ap_md5(c->pool, sc->szVHostID);
if (!SSL_set_session_id_context(ssl, (unsigned char *)cpVHostMD5,
MD5_DIGESTSIZE*2)) {
ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,
1.44 +1 -0 httpd-2.0/modules/ssl/mod_ssl.h
Index: mod_ssl.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- mod_ssl.h 2001/11/23 16:35:22 1.43
+++ mod_ssl.h 2001/11/28 05:44:50 1.44
@@ -497,6 +497,7 @@
* and all <VirtualHost> contexts)
*/
typedef struct {
+ const char *szVHostID;
BOOL bEnabled;
apr_table_t *ap_server_ctx;
const char *szPublicCertFile[SSL_AIDX_MAX];
1.17 +1 -0 httpd-2.0/modules/ssl/ssl_engine_config.c
Index: ssl_engine_config.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_config.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ssl_engine_config.c 2001/08/23 19:42:44 1.16
+++ ssl_engine_config.c 2001/11/28 05:44:50 1.17
@@ -190,6 +190,7 @@
SSLSrvConfigRec *add = (SSLSrvConfigRec *)addv;
SSLSrvConfigRec *new = (SSLSrvConfigRec *)apr_palloc(p, sizeof(SSLSrvConfigRec));
+ cfgMergeString(szVHostID);
cfgMergeBool(bEnabled);
cfgMergeString(szCACertificatePath);
cfgMergeString(szCACertificateFile);
1.18 +1 -1 httpd-2.0/modules/ssl/ssl_engine_init.c
Index: ssl_engine_init.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ssl_engine_init.c 2001/11/24 00:40:15 1.17
+++ ssl_engine_init.c 2001/11/28 05:44:50 1.18
@@ -476,7 +476,7 @@
/*
* Create the server host:port string because we need it a lot
*/
- cpVHostID = ssl_util_vhostid(p, s);
+ sc->szVHostID = cpVHostID = ssl_util_vhostid(p, s);
/*
* Now check for important parameters and the