summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-10-10 18:44:17 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-10-10 18:44:17 +0300
commit8fd8c32ccf7987f51d774edfcf7f5a65c75c137a (patch)
tree24450b882b29d4972fce76966b6f0f5d743f7a19 /src/event
parent844c78556bc93343dd1c3c9236b5c16f4e2eac39 (diff)
downloadnginx-8fd8c32ccf7987f51d774edfcf7f5a65c75c137a.tar.gz
nginx-8fd8c32ccf7987f51d774edfcf7f5a65c75c137a.tar.bz2
Modules compatibility: compatibility with NGX_HTTP_SSL.
With this change it is now possible to load modules compiled without the "--with-http_ssl_module" configure option into nginx binary compiled with it, and vice versa (if a module doesn't use ssl-specific functions), assuming both use the "--with-compat" option.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/ngx_event_connect.h5
-rw-r--r--src/event/ngx_event_openssl.h8
2 files changed, 5 insertions, 8 deletions
diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h
index 6b97a24dc..72d21d7f3 100644
--- a/src/event/ngx_event_connect.h
+++ b/src/event/ngx_event_connect.h
@@ -27,13 +27,10 @@ typedef void (*ngx_event_free_peer_pt)(ngx_peer_connection_t *pc, void *data,
ngx_uint_t state);
typedef void (*ngx_event_notify_peer_pt)(ngx_peer_connection_t *pc,
void *data, ngx_uint_t type);
-#if (NGX_SSL)
-
typedef ngx_int_t (*ngx_event_set_peer_session_pt)(ngx_peer_connection_t *pc,
void *data);
typedef void (*ngx_event_save_peer_session_pt)(ngx_peer_connection_t *pc,
void *data);
-#endif
struct ngx_peer_connection_s {
@@ -51,7 +48,7 @@ struct ngx_peer_connection_s {
ngx_event_notify_peer_pt notify;
void *data;
-#if (NGX_SSL)
+#if (NGX_SSL || NGX_COMPAT)
ngx_event_set_peer_session_pt set_session;
ngx_event_save_peer_session_pt save_session;
#endif
diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
index 3367d1020..24b812f29 100644
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -54,14 +54,14 @@
#define ngx_ssl_conn_t SSL
-typedef struct {
+struct ngx_ssl_s {
SSL_CTX *ctx;
ngx_log_t *log;
size_t buffer_size;
-} ngx_ssl_t;
+};
-typedef struct {
+struct ngx_ssl_connection_s {
ngx_ssl_conn_t *connection;
SSL_CTX *session_ctx;
@@ -80,7 +80,7 @@ typedef struct {
unsigned no_wait_shutdown:1;
unsigned no_send_shutdown:1;
unsigned handshake_buffer_set:1;
-} ngx_ssl_connection_t;
+};
#define NGX_SSL_NO_SCACHE -2