Changeset 6200f6f in mod_gnutls


Ignore:
Timestamp:
Jan 22, 2019, 2:27:36 AM (4 weeks ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
8adfa57
Parents:
39a27cf
Message:

Switch server based on early SNI only if a name was found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    r39a27cf r6200f6f  
    193193    }
    194194
    195     ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
     195    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, ctxt->c,
    196196                  "%s: Found %d protocol upgrade(s) for ALPN: %s",
    197197                  __func__, pupgrades->nelts,
     
    10541054                                   GNUTLS_EXT_RAW_FLAG_TLS_CLIENT_HELLO);
    10551055    if (ret == 0 && ctxt->sni_name != NULL)
    1056         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
     1056    {
     1057        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, APR_SUCCESS, ctxt->c,
    10571058                      "%s found SNI name: '%s'",
    10581059                      __func__, ctxt->sni_name);
    10591060
    1060     /* try to find a virtual host for that name */
    1061     mgs_srvconf_rec *tsc = mgs_find_sni_server(ctxt);
    1062     if (tsc != NULL)
    1063     {
    1064         /* Found a TLS vhost based on the SNI, configure the
    1065          * connection context. */
    1066         ctxt->sc = tsc;
    1067         ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
    1068                       "%s: Selected virtual host %s from early SNI, "
    1069                       "connection server is still %s.",
    1070                       __func__, ctxt->sc->s->server_hostname,
    1071                       ctxt->c->base_server->server_hostname);
     1061        /* try to find a virtual host for that name */
     1062        mgs_srvconf_rec *tsc = mgs_find_sni_server(ctxt);
     1063        if (tsc != NULL)
     1064        {
     1065            /* Found a TLS vhost based on the SNI, configure the
     1066             * connection context. */
     1067            ctxt->sc = tsc;
     1068            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
     1069                          "%s: Selected virtual host %s from early SNI, "
     1070                          "connection server is %s.",
     1071                          __func__, ctxt->sc->s->server_hostname,
     1072                          ctxt->c->base_server->server_hostname);
     1073        }
    10721074    }
    10731075
Note: See TracChangeset for help on using the changeset viewer.