summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2005-05-05 23:15:20 +0000
committerPaul Querna <pquerna@apache.org>2005-05-05 23:15:20 +0000
commit336ce4498823602acee17bbf2bc5ca8a6f96483e (patch)
tree34bcefd1c081262c4f64d9d5ff4748d7bbbeb2a6
parent6a2c092cba7e1e4a0ec03b1eb6854758d71af34b (diff)
downloadhttpd-336ce4498823602acee17bbf2bc5ca8a6f96483e.tar.gz
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
-rw-r--r--modules/ssl/ssl_engine_init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
index 90094df44f..1f397afab5 100644
--- a/modules/ssl/ssl_engine_init.c
+++ b/modules/ssl/ssl_engine_init.c
@@ -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();
}