Commit 72681eaa authored by Doug MacEachern's avatar Doug MacEachern
Browse files

minor performance enhancement: no need to use md5 of VHostID for the

session id, just use the VHostID itself.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@93861 13f79535-47bb-0310-9956-ffa450edef68
parent a5e885d5
Loading
Loading
Loading
Loading
+4 −6
Changes for mod_ssl.c: 4 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -230,7 +230,6 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
{
    SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
    SSL *ssl;
    char *vhost_md5;
    SSLConnRec *sslconn;

    /*
@@ -276,13 +275,12 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
        return DECLINED; /* XXX */
    }

    vhost_md5 = ap_md5_binary(c->pool, sc->szVHostID, sc->nVHostID_length);

    if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
                                    MD5_DIGESTSIZE*2))
    if (!SSL_set_session_id_context(ssl,
                                    (unsigned char *)sc->szVHostID,
                                    sc->nVHostID_length))
    {
        ssl_log(c->base_server, SSL_LOG_ERROR|SSL_ADD_SSLERR,
                "Unable to set session id context to `%s'", vhost_md5);
                "Unable to set session id context to `%s'", sc->szVHostID);

        c->aborted = 1;