aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-09-01 14:19:01 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-09-01 14:19:01 +0000
commitf100c7816dd910907597f716bf561f3361f88e1a (patch)
treec11cc9167bc57ab241789c2956811854c4f33ac6 /src/http/ngx_http_request.c
parent0c16f73b4e376439a3fb6ae71e45b997cba9e971 (diff)
downloadnginx-f100c7816dd910907597f716bf561f3361f88e1a.tar.gz
nginx-f100c7816dd910907597f716bf561f3361f88e1a.zip
*) listen ssl
*) no default ssl_cetificate and ssl_cetificate_key
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 94f786e9a..113c5e894 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -357,9 +357,20 @@ ngx_http_init_request(ngx_event_t *rev)
ngx_http_ssl_srv_conf_t *sscf;
sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module);
- if (sscf->enable) {
+ if (sscf->enable || hia[i].ssl) {
if (c->ssl == NULL) {
+
+ c->log->action = "SSL handshaking";
+
+ if (hia[i].ssl && sscf->ssl.ctx == NULL) {
+ ngx_log_error(NGX_LOG_ERR, c->log, 0,
+ "no \"ssl_certificate\" is defined "
+ "in server listening on SSL port");
+ ngx_http_close_connection(c);
+ return;
+ }
+
if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER)
== NGX_ERROR)
{
@@ -529,6 +540,8 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
}
}
+ c->log->action = "reading client request line";
+
rev->handler = ngx_http_process_request_line;
ngx_http_process_request_line(rev);
}