Mercurial > hg > nginx
diff src/imap/ngx_imap_ssl_module.c @ 583:4e296b7d25bf release-0.3.13
nginx-0.3.13-RELEASE import
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; the bug had appeared in 0.3.11.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 13:18:09 +0000 |
parents | 4d9ea73a627a |
children | 065b39794fff |
line wrap: on
line diff
--- a/src/imap/ngx_imap_ssl_module.c Sat Nov 26 10:11:11 2005 +0000 +++ b/src/imap/ngx_imap_ssl_module.c Mon Dec 05 13:18:09 2005 +0000 @@ -27,6 +27,15 @@ #endif +static ngx_conf_enum_t ngx_http_starttls_state[] = { + { ngx_string("off"), NGX_IMAP_STARTTLS_OFF }, + { ngx_string("on"), NGX_IMAP_STARTTLS_ON }, + { ngx_string("only"), NGX_IMAP_STARTTLS_ONLY }, + { ngx_null_string, 0 } +}; + + + static ngx_conf_bitmask_t ngx_imap_ssl_protocols[] = { { ngx_string("SSLv2"), NGX_SSL_SSLv2 }, { ngx_string("SSLv3"), NGX_SSL_SSLv3 }, @@ -44,6 +53,13 @@ offsetof(ngx_imap_ssl_conf_t, enable), NULL }, + { ngx_string("starttls"), + NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_TAKE1, + ngx_conf_set_enum_slot, + NGX_IMAP_SRV_CONF_OFFSET, + offsetof(ngx_imap_ssl_conf_t, starttls), + ngx_http_starttls_state }, + { ngx_string("ssl_certificate"), NGX_IMAP_MAIN_CONF|NGX_IMAP_SRV_CONF|NGX_CONF_TAKE1, ngx_conf_set_str_slot, @@ -146,6 +162,7 @@ */ scf->enable = NGX_CONF_UNSET; + scf->starttls = NGX_CONF_UNSET; scf->session_timeout = NGX_CONF_UNSET; scf->prefer_server_ciphers = NGX_CONF_UNSET; @@ -162,8 +179,9 @@ ngx_pool_cleanup_t *cln; ngx_conf_merge_value(conf->enable, prev->enable, 0); + ngx_conf_merge_value(conf->starttls, prev->starttls, NGX_IMAP_STARTTLS_OFF); - if (conf->enable == 0) { + if (conf->enable == 0 && conf->starttls == NGX_IMAP_STARTTLS_OFF) { return NGX_CONF_OK; }