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

calculate VHostID length at startup rather than request time.

change ap_md5() call in ssl_hook_pre_connection() to ap_md5_binary()
that uses the precalculated sc->nVHostID_length to avoid a strlen() call.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92216 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Doug MacEachern
2001-11-28 05:50:55 +00:00
parent 9c7cc5063d
commit 706c0cceee
3 changed files with 3 additions and 1 deletions

View File

@@ -262,7 +262,7 @@ static int ssl_hook_pre_connection(conn_rec *c)
return DECLINED; /* XXX */
}
SSL_clear(ssl);
cpVHostMD5 = ap_md5(c->pool, sc->szVHostID);
cpVHostMD5 = ap_md5_binary(c->pool, sc->szVHostID, sc->nVHostID_length);
if (!SSL_set_session_id_context(ssl, (unsigned char *)cpVHostMD5,
MD5_DIGESTSIZE*2)) {
ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,