diff options
| author | 2012-01-05 12:28:58 +0000 | |
|---|---|---|
| committer | 2012-01-05 12:28:58 +0000 | |
| commit | 79a58b938f55fd9f7302ccafddf487453d11fb74 (patch) | |
| tree | 3d175cfbdd2d88c13319b2e008ebeb391a6857b5 /usr.sbin/nginx/src/http/ngx_http_request.c | |
| parent | Fix typos in comment (s,exacty,exactly,) (diff) | |
| download | wireguard-openbsd-79a58b938f55fd9f7302ccafddf487453d11fb74.tar.xz wireguard-openbsd-79a58b938f55fd9f7302ccafddf487453d11fb74.zip | |
update to nginx-1.0.11
Diffstat (limited to 'usr.sbin/nginx/src/http/ngx_http_request.c')
| -rw-r--r-- | usr.sbin/nginx/src/http/ngx_http_request.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/usr.sbin/nginx/src/http/ngx_http_request.c b/usr.sbin/nginx/src/http/ngx_http_request.c index c0d56ecaaf6..aea2228fdd8 100644 --- a/usr.sbin/nginx/src/http/ngx_http_request.c +++ b/usr.sbin/nginx/src/http/ngx_http_request.c @@ -671,25 +671,27 @@ ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg) sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); - SSL_set_SSL_CTX(ssl_conn, sscf->ssl.ctx); + if (sscf->ssl.ctx) { + SSL_set_SSL_CTX(ssl_conn, sscf->ssl.ctx); - /* - * SSL_set_SSL_CTX() only changes certs as of 1.0.0d - * adjust other things we care about - */ + /* + * SSL_set_SSL_CTX() only changes certs as of 1.0.0d + * adjust other things we care about + */ - SSL_set_verify(ssl_conn, SSL_CTX_get_verify_mode(sscf->ssl.ctx), - SSL_CTX_get_verify_callback(sscf->ssl.ctx)); + SSL_set_verify(ssl_conn, SSL_CTX_get_verify_mode(sscf->ssl.ctx), + SSL_CTX_get_verify_callback(sscf->ssl.ctx)); - SSL_set_verify_depth(ssl_conn, SSL_CTX_get_verify_depth(sscf->ssl.ctx)); + SSL_set_verify_depth(ssl_conn, SSL_CTX_get_verify_depth(sscf->ssl.ctx)); #ifdef SSL_CTRL_CLEAR_OPTIONS - /* only in 0.9.8m+ */ - SSL_clear_options(ssl_conn, SSL_get_options(ssl_conn) & - ~SSL_CTX_get_options(sscf->ssl.ctx)); + /* only in 0.9.8m+ */ + SSL_clear_options(ssl_conn, SSL_get_options(ssl_conn) & + ~SSL_CTX_get_options(sscf->ssl.ctx)); #endif - SSL_set_options(ssl_conn, SSL_CTX_get_options(sscf->ssl.ctx)); + SSL_set_options(ssl_conn, SSL_CTX_get_options(sscf->ssl.ctx)); + } return SSL_TLSEXT_ERR_OK; } |
