From: Doug MacEachern Date: Wed, 28 Nov 2001 05:05:04 +0000 (+0000) Subject: replace strlen(cpVHostMD5) with MD5_DIGESTSIZE*2 in ssl_hook_pre_connection() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0fcfd71cc61aebf3fc5c2f77c7d43638dc2c41e;p=thirdparty%2Fapache%2Fhttpd.git replace strlen(cpVHostMD5) with MD5_DIGESTSIZE*2 in ssl_hook_pre_connection() since we know the string returned by ap_md5() will always be that length PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@92213 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/mod_ssl.c b/mod_ssl.c index 600c0d60bef..619c5dd1ff9 100644 --- a/mod_ssl.c +++ b/mod_ssl.c @@ -265,7 +265,7 @@ static int ssl_hook_pre_connection(conn_rec *c) SSL_clear(ssl); cpVHostMD5 = ap_md5(c->pool, cpVHostID); if (!SSL_set_session_id_context(ssl, (unsigned char *)cpVHostMD5, - strlen(cpVHostMD5))) { + MD5_DIGESTSIZE*2)) { ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR, "Unable to set session id context to `%s'", cpVHostMD5); c->aborted = 1;