if [ $OPENSSL != NONE ]; then
CORE_INCS="$CORE_INCS $OPENSSL/include"
- CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
- CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
case "$CC" in
*)
. auto/feature
if [ $ngx_found = yes ]; then
- CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
- CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
OPENSSL=YES
fi
cat << END >> $NGX_MAKEFILE
-ADDON_DEPS = \$(CORE_DPES) $NGX_ADDON_DEPS
+ADDON_DEPS = \$(CORE_DEPS) $NGX_ADDON_DEPS
END
HTTP_POSTPONE=YES
fi
+# the module order is important
+# ngx_http_autoindex_module
+# ngx_http_index_module
+#
+#
# the filter order is important
# ngx_http_write_filter
# ngx_http_header_filter
# ngx_http_chunked_filter
# ngx_http_range_header_filter
-# ngx_http_ssl_filter
# ngx_http_gzip_filter
# ngx_http_postpone_filter
# ngx_http_charset_filter
# ngx_http_ssi_filter
-# ngx_http_headers_filter
+# ngx_http_userid_filter
+# ngx_http_headers_filter
# ngx_http_copy_filter
# ngx_http_range_body_filter
# ngx_http_not_modified_filter
fi
+if [ $IMAP_SSL = YES ]; then
+ IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
+ IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
+ have=NGX_IMAP_SSL . auto/have
+ USE_OPENSSL=YES
+fi
+
+
modules="$CORE_MODULES $EVENT_MODULES"
+
+if [ $USE_OPENSSL = YES ]; then
+ modules="$modules $OPENSSL_MODULE"
+ CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
+ CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
+fi
+
if [ $HTTP = YES ]; then
modules="$modules $HTTP_MODULES $HTTP_FILTER_MODULES \
$HTTP_HEADERS_FILTER_MODULE \
if [ $IMAP_SSL = YES ]; then
modules="$modules $IMAP_SSL_MODULE"
- IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
- IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
- have=NGX_IMAP_SSL . auto/have
- USE_OPENSSL=YES
fi
modules="$modules $IMAP_AUTH_HTTP_MODULE"
REGEX_SRCS=src/core/ngx_regex.c
+OPENSSL_MODULE=ngx_openssl_module
+OPENSSL_DEPS=src/event/ngx_event_openssl.h
+OPENSSL_SRCS=src/event/ngx_event_openssl.c
+
+
EVENT_MODULES="ngx_events_module ngx_event_core_module"
EVENT_INCS="src/event src/event/modules"
src/os/unix/ngx_aio_write_chain.c"
-OPENSSL_DEPS=src/event/ngx_event_openssl.h
-OPENSSL_SRCS=src/event/ngx_event_openssl.c
-
-
UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"
UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
<title lang="en">nginx changelog</title>
+<changes ver="0.1.45" date="08.09.2005">
+
+<change type="change">
+<para lang="ru">
+ÄÉÒÅËÔÉ×Á ssl_engine ÕÐÒÁÚÄÎÅÎÁ × ÍÏÄÕÌÅ ngx_http_ssl_module É
+ÐÅÒÅÎÅÓÅÎÁ ÎÁ ÇÌÏÂÁÌØÎÙÊ ÕÒÏ×ÅÎØ.
+</para>
+<para lang="en">
+the "ssl_engine" directive is canceled in the ngx_http_ssl_module
+and now is introduced at global level.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+ÏÔ×ÅÔÙ Ó ÐÏÄÚÁÐÒÏÓÁÍÉ, ×ËÌÀÞ£ÎÎÙÅ Ó ÐÏÍÏÝØÀ SSI, ÎÅ ÐÅÒÅÄÁ×ÁÌÉÓØ
+ÞÅÒÅÚ SSL ÓÏÅÄÉÎÅÎÉÅ.
+</para>
+<para lang="en">
+the responses with SSI subrequests did not transferred via SSL connection.
+</para>
+</change>
+
+<change>
+<para lang="ru">
+òÁÚÎÙÅ ÉÓÐÒÁ×ÌÅÎÉÑ × IMAP/POP3 ÐÒÏËÓÉ.
+</para>
+<para lang="en">
+Various bug fixes in the IMAP/POP3 proxy.
+</para>
+</change>
+
+</changes>
+
+
<changes ver="0.1.44" date="06.09.2005">
<change type="feature">
<change type="feature">
<para lang="ru">
-ÄÉÒÅËÔÉ×Á proxy_timeout.
+ÄÉÒÅËÔÉ×Á proxy_timeout ÍÏÄÕÌÑ ngx_imap_proxy_module.
</para>
<para lang="en">
-the "proxy_timeout" directive.
+the "proxy_timeout" directive of the ngx_imap_proxy_module.
</para>
</change>
<change type="change">
<para lang="ru">
-ÐÁÒÁÍÅÔÒÙ FastCGI, Ó ÐÕÓÔÙÍ ÚÎÁÞÅÎÉÑÍÉ, ÔÅÐÅÒØ ÐÅÒÅÄÁÀÔÓÑ ÓÅÒ×ÅÒÕ.
+ÐÁÒÁÍÅÔÒÙ FastCGI Ó ÐÕÓÔÙÍ ÚÎÁÞÅÎÉÑÍÉ ÔÅÐÅÒØ ÐÅÒÅÄÁÀÔÓÑ ÓÅÒ×ÅÒÕ.
</para>
<para lang="en">
the FastCGI parameters with the empty values now are passed to a server.
&ngx_core_module_ctx, /* module context */
ngx_core_commands, /* module directives */
NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
return 1;
}
+ /* STUB */
#if (NGX_OPENSSL)
ngx_ssl_init(log);
#endif
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.1.44"
+#define NGINX_VER "nginx/0.1.45"
#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
NULL, /* module context */
ngx_conf_commands, /* module directives */
NGX_CONF_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
#define NGX_CONF_BLOCK_DONE 2
#define NGX_CONF_FILE_DONE 3
-#define NGX_MODULE_V1 0, 0, 1, 0, 0
-
#define NGX_CORE_MODULE 0x45524F43 /* "CORE" */
#define NGX_CONF_MODULE 0x464E4F43 /* "CONF" */
};
+#define NGX_MODULE_V1 0, 0, 1, 0, 0, 0, 0
+#define NGX_MODULE_V1_PADDING 0, 0, 0, 0, 0, 0, 0, 0
+
struct ngx_module_s {
ngx_uint_t ctx_index;
ngx_uint_t index;
ngx_uint_t version;
+
ngx_uint_t spare0;
ngx_uint_t spare1;
+ ngx_uint_t spare2;
+ ngx_uint_t spare3;
void *ctx;
ngx_command_t *commands;
ngx_uint_t type;
+
+ ngx_int_t (*init_master)(ngx_log_t *log);
+
ngx_int_t (*init_module)(ngx_cycle_t *cycle);
+
ngx_int_t (*init_process)(ngx_cycle_t *cycle);
-#if 0
ngx_int_t (*init_thread)(ngx_cycle_t *cycle);
-#endif
+ ngx_int_t (*exit_thread)(ngx_cycle_t *cycle);
+ ngx_int_t (*exit_process)(ngx_cycle_t *cycle);
+
+ ngx_int_t (*exit_master)(ngx_cycle_t *cycle);
+
+ uintptr_t spare_hook0;
+ uintptr_t spare_hook1;
+ uintptr_t spare_hook2;
+ uintptr_t spare_hook3;
+ uintptr_t spare_hook4;
+ uintptr_t spare_hook5;
+ uintptr_t spare_hook6;
+ uintptr_t spare_hook7;
};
ngx_listening_t *ls;
struct sockaddr_in *sin;
#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
+ ngx_err_t err;
socklen_t aflen;
struct accept_filter_arg af;
#endif
if (getsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, &af, &aflen)
== -1)
{
- ngx_log_error(NGX_LOG_NOTICE, cycle->log, ngx_errno,
+ err = ngx_errno;
+
+ if (err == NGX_EINVAL) {
+ continue;
+ }
+
+ ngx_log_error(NGX_LOG_NOTICE, cycle->log, err,
"getsockopt(SO_ACCEPTFILTER) for %V failed, ignored",
&ls[i].addr_text);
continue;
&ngx_errlog_module_ctx, /* module context */
ngx_errlog_commands, /* module directives */
NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_aio_module_ctx, /* module context */
NULL, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_devpoll_module_ctx, /* module context */
ngx_devpoll_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_epoll_module_ctx, /* module context */
ngx_epoll_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_iocp_module_ctx, /* module context */
ngx_iocp_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_kqueue_module_ctx, /* module context */
ngx_kqueue_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_poll_module_ctx, /* module context */
NULL, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_rtsig_module_ctx, /* module context */
ngx_rtsig_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_select_module_ctx, /* module context */
NULL, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_events_module_ctx, /* module context */
ngx_events_commands, /* module directives */
NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_event_core_module_ctx, /* module context */
ngx_event_core_commands, /* module directives */
NGX_EVENT_MODULE, /* module type */
+ NULL, /* init master */
ngx_event_module_init, /* init module */
- ngx_event_process_init /* init process */
+ ngx_event_process_init, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
ngx_event_connect_peer(ngx_peer_connection_t *pc)
{
int rc;
- ngx_uint_t instance;
+ ngx_uint_t instance, level;
u_int event;
time_t now;
ngx_err_t err;
/* Winsock returns WSAEWOULDBLOCK (NGX_EAGAIN) */
if (err != NGX_EINPROGRESS && err != NGX_EAGAIN) {
- ngx_connection_error(c, err, "connect() failed");
-#if 0
-#undef sun
- {
- struct sockaddr_un *sun;
-
- sun = (struct sockaddr_un *) peer->sockaddr;
-
- ngx_log_error(NGX_LOG_ALERT, pc->log, 0,
- "\"%s\", f:%d, l:%uz",
- sun->sun_path, sun->sun_family, peer->socklen);
+ if (err == NGX_ECONNREFUSED || err == NGX_EHOSTUNREACH) {
+ level = NGX_LOG_ERR;
+ } else {
+ level = NGX_LOG_CRIT;
}
-#endif
+
+ ngx_log_error(level, c->log, err, "connect() to %V failed",
+ &peer->name);
return NGX_CONNECT_ERROR;
}
#include <ngx_core.h>
#include <ngx_event.h>
-#include <openssl/engine.h>
+
+typedef struct {
+ ngx_str_t engine;
+} ngx_openssl_conf_t;
static ngx_int_t ngx_ssl_handle_recv(ngx_connection_t *c, int n);
static void ngx_ssl_write_handler(ngx_event_t *wev);
static void ngx_ssl_read_handler(ngx_event_t *rev);
+static void *ngx_openssl_create_conf(ngx_cycle_t *cycle);
+static char *ngx_openssl_init_conf(ngx_cycle_t *cycle, void *conf);
+
+#if !(NGX_SSL_ENGINE)
+static char *ngx_openssl_noengine(ngx_conf_t *cf, ngx_command_t *cmd,
+ void *conf);
+#endif
+
+
+static ngx_command_t ngx_openssl_commands[] = {
+
+ { ngx_string("ssl_engine"),
+ NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
+#if (NGX_SSL_ENGINE)
+ ngx_conf_set_str_slot,
+#else
+ ngx_openssl_noengine,
+#endif
+ 0,
+ offsetof(ngx_openssl_conf_t, engine),
+ NULL },
+
+ ngx_null_command
+};
+
+
+static ngx_core_module_t ngx_openssl_module_ctx = {
+ ngx_string("openssl"),
+ ngx_openssl_create_conf,
+ ngx_openssl_init_conf
+};
+
+
+ngx_module_t ngx_openssl_module = {
+ NGX_MODULE_V1,
+ &ngx_openssl_module_ctx, /* module context */
+ ngx_openssl_commands, /* module directives */
+ NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
+ NULL, /* init module */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
+};
ngx_int_t
{
SSL_library_init();
SSL_load_error_strings();
+
+#if (NGX_SSL_ENGINE)
ENGINE_load_builtin_engines();
+#endif
return NGX_OK;
}
SSL_CTX_free(ctx);
}
+
+
+static void *
+ngx_openssl_create_conf(ngx_cycle_t *cycle)
+{
+ ngx_openssl_conf_t *oscf;
+
+ oscf = ngx_pcalloc(cycle->pool, sizeof(ngx_openssl_conf_t));
+ if (oscf == NULL) {
+ return NGX_CONF_ERROR;
+ }
+
+ /*
+ * set by ngx_pcalloc():
+ *
+ * oscf->engine.len = 0;
+ * oscf->engine.data = NULL;
+ */
+
+ return oscf;
+}
+
+
+static char *
+ngx_openssl_init_conf(ngx_cycle_t *cycle, void *conf)
+{
+#if (NGX_SSL_ENGINE)
+ ngx_openssl_conf_t *oscf = conf;
+
+ ENGINE *engine;
+
+ if (oscf->engine.len == 0) {
+ return NGX_CONF_OK;
+ }
+
+ engine = ENGINE_by_id((const char *) oscf->engine.data);
+
+ if (engine == NULL) {
+ ngx_ssl_error(NGX_LOG_WARN, cycle->log, 0,
+ "ENGINE_by_id(\"%V\") failed", &oscf->engine);
+ return NGX_CONF_ERROR;
+ }
+
+ if (ENGINE_set_default(engine, ENGINE_METHOD_ALL) == 0) {
+ ngx_ssl_error(NGX_LOG_WARN, cycle->log, 0,
+ "ENGINE_set_default(\"%V\", ENGINE_METHOD_ALL) failed",
+ &oscf->engine);
+ return NGX_CONF_ERROR;
+ }
+
+ ENGINE_free(engine);
+
+#endif
+
+ return NGX_CONF_OK;
+}
+
+
+#if !(NGX_SSL_ENGINE)
+
+static char *
+ngx_openssl_noengine(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "\"ssl_engine\" is not supported: " NGX_SSL_NAME
+ " library does not support crypto accelerators");
+
+ return NGX_CONF_ERROR;
+}
+
+#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
+#if OPENSSL_VERSION_NUMBER >= 0x00907000
+#include <openssl/engine.h>
+#define NGX_SSL_ENGINE 1
+#endif
+
+#define NGX_SSL_NAME "OpenSSL"
+
typedef struct {
SSL *ssl;
#define NGX_SSL_BUFFER 1
-
#define NGX_SSL_BUFSIZE 16384
&ngx_http_access_module_ctx, /* module context */
ngx_http_access_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_access_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_auth_basic_module_ctx, /* module context */
ngx_http_auth_basic_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_auth_basic_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_autoindex_module_ctx, /* module context */
ngx_http_autoindex_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_autoindex_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_charset_filter_module_ctx, /* module context */
ngx_http_charset_filter_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_charset_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_chunked_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_chunked_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_fastcgi_module_ctx, /* module context */
ngx_http_fastcgi_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_geo_module_ctx, /* module context */
ngx_http_geo_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_gzip_filter_module_ctx, /* module context */
ngx_http_gzip_filter_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_gzip_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_headers_filter_module_ctx, /* module context */
ngx_http_headers_filter_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_headers_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_index_module_ctx, /* module context */
ngx_http_index_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_index_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_not_modified_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_not_modified_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_proxy_module_ctx, /* module context */
ngx_http_proxy_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_range_header_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_range_header_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_range_body_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_range_body_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_rewrite_module_ctx, /* module context */
ngx_http_rewrite_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_rewrite_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_ssi_filter_module_ctx, /* module context */
ngx_http_ssi_filter_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_ssi_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
#include <ngx_core.h>
#include <ngx_http.h>
-#include <openssl/engine.h>
-
#define NGX_DEFLAUT_CERTIFICATE "cert.pem"
#define NGX_DEFLAUT_CERTIFICATE_KEY "cert.pem"
-static void *ngx_http_ssl_create_main_conf(ngx_conf_t *cf);
-static char *ngx_http_ssl_init_main_conf(ngx_conf_t *cf, void *conf);
static void *ngx_http_ssl_create_srv_conf(ngx_conf_t *cf);
static char *ngx_http_ssl_merge_srv_conf(ngx_conf_t *cf,
void *parent, void *child);
static ngx_command_t ngx_http_ssl_commands[] = {
- { ngx_string("ssl_engine"),
- NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_str_slot,
- NGX_HTTP_MAIN_CONF_OFFSET,
- offsetof(ngx_http_ssl_main_conf_t, engine),
- NULL },
-
{ ngx_string("ssl"),
NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NULL, /* preconfiguration */
NULL, /* postconfiguration */
- ngx_http_ssl_create_main_conf, /* create main configuration */
- ngx_http_ssl_init_main_conf, /* init main configuration */
+ NULL, /* create main configuration */
+ NULL, /* init main configuration */
ngx_http_ssl_create_srv_conf, /* create server configuration */
ngx_http_ssl_merge_srv_conf, /* merge server configuration */
&ngx_http_ssl_module_ctx, /* module context */
ngx_http_ssl_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
-static void *
-ngx_http_ssl_create_main_conf(ngx_conf_t *cf)
-{
- ngx_http_ssl_main_conf_t *mcf;
-
- mcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssl_main_conf_t));
- if (mcf == NULL) {
- return NGX_CONF_ERROR;
- }
-
- /*
- * set by ngx_pcalloc():
- *
- * mcf->engine.len = 0;
- * mcf->engine.data = NULL;
- */
-
- return mcf;
-}
-
-
-static char *
-ngx_http_ssl_init_main_conf(ngx_conf_t *cf, void *conf)
-{
- ngx_http_ssl_main_conf_t *mcf = conf;
-
- ENGINE *engine;
-
- if (mcf->engine.len == 0) {
- return NGX_CONF_OK;
- }
-
- engine = ENGINE_by_id((const char *) mcf->engine.data);
-
- if (engine == NULL) {
- ngx_ssl_error(NGX_LOG_WARN, cf->log, 0,
- "ENGINE_by_id(\"%V\") failed", &mcf->engine);
- return NGX_CONF_ERROR;
- }
-
- if (ENGINE_set_default(engine, ENGINE_METHOD_ALL) == 0) {
- ngx_ssl_error(NGX_LOG_WARN, cf->log, 0,
- "ENGINE_set_default(\"%V\", ENGINE_METHOD_ALL) failed",
- &mcf->engine);
- return NGX_CONF_ERROR;
- }
-
- ENGINE_free(engine);
-
- return NGX_CONF_OK;
-}
-
-
static void *
ngx_http_ssl_create_srv_conf(ngx_conf_t *cf)
{
return NGX_CONF_ERROR;
}
+ SSL_CTX_set_verify(conf->ssl_ctx, SSL_VERIFY_NONE, NULL);
+
return NGX_CONF_OK;
}
#if 0
+/* how to enumrate server' configs */
+
static ngx_int_t
ngx_http_ssl_init_process(ngx_cycle_t *cycle)
{
#include <ngx_http.h>
-typedef struct {
- ngx_str_t engine;
-} ngx_http_ssl_main_conf_t;
-
-
typedef struct {
ngx_flag_t enable;
ngx_str_t certificate;
&ngx_http_static_module_ctx, /* module context */
ngx_http_static_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_static_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_stub_status_module_ctx, /* module context */
ngx_http_status_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_userid_filter_module_ctx, /* module context */
ngx_http_userid_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_userid_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_module_ctx, /* module context */
ngx_http_commands, /* module directives */
NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_copy_filter_module_ctx, /* module context */
ngx_http_copy_filter_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_copy_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_core_module_ctx, /* module context */
ngx_http_core_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_header_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_header_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_log_module_ctx, /* module context */
ngx_http_log_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_postpone_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_postpone_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_upstream_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
&ngx_http_write_filter_module_ctx, /* module context */
NULL, /* module directives */
NGX_HTTP_MODULE, /* module type */
+ NULL, /* init master */
ngx_http_write_filter_init, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
r->out = chain;
- if (chain || c->buffered) {
+ if (chain || (c->buffered && r->postponed == NULL)) {
return NGX_AGAIN;
}
&ngx_imap_module_ctx, /* module context */
ngx_imap_commands, /* module directives */
NGX_CORE_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
} ngx_imap_session_t;
+typedef struct {
+ ngx_str_t *client;
+ ngx_imap_session_t *session;
+} ngx_imap_log_ctx_t;
+
+
#define NGX_POP3_USER 1
#define NGX_POP3_PASS 2
#define NGX_POP3_CAPA 3
&ngx_imap_auth_http_module_ctx, /* module context */
ngx_imap_auth_http_commands, /* module directives */
NGX_IMAP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
ngx_imap_auth_http_ctx_t *ctx;
ngx_imap_auth_http_conf_t *ahcf;
+ s->connection->log->action = "in http auth state";
+
ctx = ngx_pcalloc(s->connection->pool, sizeof(ngx_imap_auth_http_ctx_t));
if (ctx == NULL) {
ngx_imap_session_internal_server_error(s);
rc = ngx_event_connect_peer(&ctx->peer);
- if (rc == NGX_ERROR) {
+ if (rc == NGX_ERROR || rc == NGX_CONNECT_ERROR) {
ngx_imap_session_internal_server_error(s);
return;
}
ctx->handler = ngx_imap_auth_http_ignore_status_line;
+ ngx_add_timer(ctx->peer.connection->read, ahcf->timeout);
+ ngx_add_timer(ctx->peer.connection->write, ahcf->timeout);
+
if (rc == NGX_OK) {
ngx_imap_auth_http_write_handler(ctx->peer.connection->write);
return;
}
-
- ngx_add_timer(ctx->peer.connection->read, ahcf->timeout);
- ngx_add_timer(ctx->peer.connection->write, ahcf->timeout);
}
if (wev->timedout) {
ngx_log_error(NGX_LOG_ERR, wev->log, NGX_ETIMEDOUT,
- "auth http server timed out");
+ "auth http server %V timed out",
+ &ctx->peer.peers->peer[0].name);
ngx_close_connection(ctx->peer.connection);
ngx_imap_session_internal_server_error(s);
return;
if (rev->timedout) {
ngx_log_error(NGX_LOG_ERR, rev->log, NGX_ETIMEDOUT,
- "auth http server timed out");
+ "auth http server %V timed out",
+ &ctx->peer.peers->peer[0].name);
ngx_close_connection(ctx->peer.connection);
ngx_imap_session_internal_server_error(s);
return;
}
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "auth http server sent invalid response");
+ "auth http server &V sent invalid response",
+ &ctx->peer.peers->peer[0].name);
ngx_close_connection(ctx->peer.connection);
ngx_imap_session_internal_server_error(s);
return;
if (ctx->sleep == 0) {
s->quit = 1;
- }
- ngx_imap_send(s->connection->write);
+ ngx_imap_send(s->connection->write);
+
+ return;
+ }
ngx_add_timer(s->connection->read, ctx->sleep * 1000);
if (ctx->addr.len == 0 || ctx->port.len == 0) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "auth http server did not send server or port");
+ "auth http server %V did not send server or port",
+ &ctx->peer.peers->peer[0].name);
ngx_imap_session_internal_server_error(s);
return;
}
port = ngx_atoi(ctx->port.data, ctx->port.len);
if (port == NGX_ERROR || port < 1 || port > 65536) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "auth http server sent invalid server "
- "port:\"%V\"", &ctx->port);
+ "auth http server %V sent invalid server "
+ "port:\"%V\"",
+ &ctx->peer.peers->peer[0].name, &ctx->port);
ngx_imap_session_internal_server_error(s);
return;
}
sin->sin_addr.s_addr = inet_addr((char *) ctx->addr.data);
if (sin->sin_addr.s_addr == INADDR_NONE) {
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "auth http server sent invalid server "
- "address:\"%V\"", &ctx->addr);
+ "auth http server %V sent invalid server "
+ "address:\"%V\"",
+ &ctx->peer.peers->peer[0].name, &ctx->addr);
ngx_imap_session_internal_server_error(s);
return;
}
/* rc == NGX_ERROR */
ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
- "auth http server sent invalid header in response");
+ "auth http server %V sent invalid header in response",
+ &ctx->peer.peers->peer[0].name);
ngx_close_connection(ctx->peer.connection);
ngx_imap_session_internal_server_error(s);
ngx_imap_close_connection(s->connection);
}
+ ngx_imap_send(s->connection->write);
+
return;
}
&ngx_imap_core_module_ctx, /* module context */
ngx_imap_core_commands, /* module directives */
NGX_IMAP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
static void ngx_imap_init_session(ngx_event_t *rev);
+static void ngx_imap_init_protocol(ngx_event_t *rev);
static ngx_int_t ngx_imap_read_command(ngx_imap_session_t *s);
+static u_char *ngx_imap_log_error(ngx_log_t *log, u_char *buf, size_t len);
#if (NGX_IMAP_SSL)
static void ngx_imap_ssl_close_handler(ngx_event_t *ev);
void
ngx_imap_init_connection(ngx_connection_t *c)
{
+ ngx_imap_log_ctx_t *ctx;
+
+ ngx_log_debug0(NGX_LOG_DEBUG_IMAP, c->log, 0, "imap init connection");
+
+ ctx = ngx_palloc(c->pool, sizeof(ngx_imap_log_ctx_t));
+ if (ctx == NULL) {
+ ngx_imap_close_connection(c);
+ return;
+ }
+
+ ctx->client = &c->addr_text;
+ ctx->session = NULL;
+
+ c->log->connection = c->number;
+ c->log->handler = ngx_imap_log_error;
+ c->log->data = ctx;
+ c->log->action = "sending client greeting line";
+
+ c->log_error = NGX_ERROR_INFO;
+
+ ngx_imap_init_session(c->read);
+}
+
+
+static void
+ngx_imap_init_session(ngx_event_t *rev)
+{
+ ngx_connection_t *c;
ngx_imap_session_t *s;
+ ngx_imap_log_ctx_t *lctx;
ngx_imap_conf_ctx_t *ctx;
+ ngx_imap_core_srv_conf_t *cscf;
#if (NGX_IMAP_SSL)
ngx_int_t rc;
ngx_imap_ssl_conf_t *sslcf;
#endif
- ngx_imap_core_srv_conf_t *cscf;
-
- ngx_log_debug0(NGX_LOG_DEBUG_IMAP, c->log, 0, "imap init connection");
- c->log_error = NGX_ERROR_INFO;
+ c = rev->data;
ctx = c->ctx;
+ cscf = ngx_imap_get_module_srv_conf(ctx, ngx_imap_core_module);
+
#if (NGX_IMAP_SSL)
sslcf = ngx_imap_get_module_srv_conf(ctx, ngx_imap_ssl_module);
return;
}
+ if (rc == NGX_AGAIN) {
+ ngx_add_timer(rev, cscf->timeout);
+ c->read->handler = ngx_imap_init_session;
+
+ if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
+ ngx_imap_close_connection(c);
+ }
+
+ return;
+ }
+
c->recv = ngx_ssl_recv;
c->send = ngx_ssl_write;
c->send_chain = ngx_ssl_send_chain;
c->data = s;
s->connection = c;
- cscf = ngx_imap_get_module_srv_conf(ctx, ngx_imap_core_module);
s->protocol = cscf->protocol;
s->ctx = ngx_pcalloc(c->pool, sizeof(void *) * ngx_imap_max_module);
s->out = greetings[s->protocol];
- c->read->handler = ngx_imap_init_session;
+ lctx = c->log->data;
+ lctx->session = s;
+
+ c->read->handler = ngx_imap_init_protocol;
c->write->handler = ngx_imap_send;
- ngx_add_timer(c->write, cscf->timeout);
- ngx_add_timer(c->read, cscf->timeout);
+ ngx_add_timer(rev, cscf->timeout);
- if (ngx_handle_read_event(c->read, 0) == NGX_ERROR) {
+ if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {
ngx_imap_close_connection(c);
}
void
ngx_imap_send(ngx_event_t *wev)
{
- ngx_int_t n;
- ngx_connection_t *c;
- ngx_imap_session_t *s;
+ ngx_int_t n;
+ ngx_connection_t *c;
+ ngx_imap_session_t *s;
+ ngx_imap_core_srv_conf_t *cscf;
c = wev->data;
s = c->data;
if (n > 0) {
s->out.len -= n;
+ if (wev->timer_set) {
+ ngx_del_timer(wev);
+ }
+
if (s->quit) {
ngx_imap_close_connection(c);
return;
/* n == NGX_AGAIN */
+ cscf = ngx_imap_get_module_srv_conf(s, ngx_imap_core_module);
+
+ ngx_add_timer(c->write, cscf->timeout);
+
if (ngx_handle_write_event(c->write, 0) == NGX_ERROR) {
ngx_imap_close_connection(c);
return;
static void
-ngx_imap_init_session(ngx_event_t *rev)
+ngx_imap_init_protocol(ngx_event_t *rev)
{
size_t size;
ngx_connection_t *c;
c = rev->data;
+ c->log->action = "in auth state";
+
if (rev->timedout) {
ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");
ngx_imap_close_connection(c);
}
#endif
+
+
+static u_char *
+ngx_imap_log_error(ngx_log_t *log, u_char *buf, size_t len)
+{
+ u_char *p;
+ ngx_imap_session_t *s;
+ ngx_imap_log_ctx_t *ctx;
+
+ if (log->action) {
+ p = ngx_snprintf(buf, len, " while %s", log->action);
+ len -= p - buf;
+ buf = p;
+ }
+
+ ctx = log->data;
+
+ p = ngx_snprintf(buf, len, ", client: %V", ctx->client);
+ len -= p - buf;
+ buf = p;
+
+ s = ctx->session;
+
+ if (s == NULL) {
+ return p;
+ }
+
+ p = ngx_snprintf(buf, len, ", server: %V",
+ &s->connection->listening->addr_text);
+ len -= p - buf;
+ buf = p;
+
+ if (s->login.len == 0) {
+ return p;
+ }
+
+ p = ngx_snprintf(buf, len, ", login: \"%V\"", &s->login);
+ len -= p - buf;
+ buf = p;
+
+ if (s->proxy == NULL) {
+ return p;
+ }
+
+ p = ngx_snprintf(buf, len, ", upstream: %V",
+ &s->proxy->upstream.peers->peer[0].name);
+
+ return p;
+}
&ngx_imap_proxy_module_ctx, /* module context */
ngx_imap_proxy_commands, /* module directives */
NGX_IMAP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
p->upstream.log = s->connection->log;
p->upstream.log_error = NGX_ERROR_ERR;
+ s->connection->log->action = "in upstream auth state";
+
rc = ngx_event_connect_peer(&p->upstream);
- if (rc == NGX_ERROR) {
+ if (rc == NGX_ERROR || rc == NGX_CONNECT_ERROR) {
ngx_imap_session_internal_server_error(s);
return;
}
pcf = ngx_imap_get_module_srv_conf(s, ngx_imap_proxy_module);
ngx_add_timer(s->connection->read, pcf->timeout);
ngx_del_timer(c->read);
+
+ c->log->action = "proxying";
}
}
pcf = ngx_imap_get_module_srv_conf(s, ngx_imap_proxy_module);
ngx_add_timer(s->connection->read, pcf->timeout);
ngx_del_timer(c->read);
+
+ c->log->action = "proxying";
}
}
&ngx_imap_ssl_module_ctx, /* module context */
ngx_imap_ssl_commands, /* module directives */
NGX_IMAP_MODULE, /* module type */
+ NULL, /* init master */
NULL, /* init module */
- NULL /* init process */
+ NULL, /* init process */
+ NULL, /* init thread */
+ NULL, /* exit thread */
+ NULL, /* exit process */
+ NULL, /* exit master */
+ NGX_MODULE_V1_PADDING
};
return NGX_CONF_ERROR;
}
+ SSL_CTX_set_verify(conf->ssl_ctx, SSL_VERIFY_NONE, NULL);
+
return NGX_CONF_OK;
}
ngx_int_t
ngx_os_init(ngx_log_t *log)
{
- ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER);
-
#if (NGX_HAVE_OS_SPECIFIC_INIT)
if (ngx_os_specific_init(log) != NGX_OK) {
return NGX_ERROR;
void
ngx_os_status(ngx_log_t *log)
{
+ ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER);
+
#if (NGX_HAVE_OS_SPECIFIC_INIT)
ngx_os_specific_status(log);
#endif
#include <ngx_config.h>
#include <ngx_core.h>
+#include <nginx.h>
ngx_uint_t ngx_win32_version;
{
ngx_osviex_stub_t *osviex_stub;
+ ngx_log_error(NGX_LOG_NOTICE, log, 0, NGINX_VER);
+
if (osviex) {
/*