Commit ff46efd8 authored by Paul Querna's avatar Paul Querna
Browse files

Add support for 'Protocol' to mod_ssl.

Example Config:

Listen 10.0.0.10:443 https

<VirtualHost 10.0.0.10:443>
SLCertificateFile conf/server.cert
SSLCertificateKeyFile conf/server.key
ServerName foo:443
DocumentRoot /var/www/foo
....
</VirtualHost>

Notice, no need for 'SSLEngine on'.  You can also set 'Protocol https' inside the virtual host, 
if you do not set it in the Listen command.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/listen-protocol@168462 13f79535-47bb-0310-9956-ffa450edef68
parent d955708c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -207,8 +207,13 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
        sc->vhost_id = ssl_util_vhostid(p, s);
        sc->vhost_id_len = strlen(sc->vhost_id);

        if (strcmp("https", ap_get_server_protocol(s)) == 0) {
            sc->enabled = SSL_ENABLED_TRUE;
        }

       /* If sc->enabled is UNSET, then SSL is optional on this vhost  */
        /* Fix up stuff that may not have been set */

        if (sc->enabled == SSL_ENABLED_UNSET) {
            sc->enabled = SSL_ENABLED_FALSE;
        }
@@ -879,7 +884,8 @@ static void ssl_init_server_certs(server_rec *s,

    if (!(have_rsa || have_dsa)) {
        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
                "Oops, no RSA or DSA server certificate found?!");
                "Oops, no RSA or DSA server certificate found "
                "for '%s:%d'?!", s->server_hostname, s->port);
        ssl_die();
    }