summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream_round_robin.c
diff options
context:
space:
mode:
authorPiotr Sikora <piotr@cloudflare.com>2014-07-06 16:41:14 -0700
committerPiotr Sikora <piotr@cloudflare.com>2014-07-06 16:41:14 -0700
commitd224ed7eea5885b489ba99c3c1443e8409443854 (patch)
tree0a2859074d7d28b084ec3da4bc0424f9610285fc /src/http/ngx_http_upstream_round_robin.c
parentce64398751a8852d55a9773ff54ce7a2a5acd44d (diff)
downloadnginx-d224ed7eea5885b489ba99c3c1443e8409443854.tar.gz
nginx-d224ed7eea5885b489ba99c3c1443e8409443854.tar.bz2
SSL: stop accessing SSL_SESSION's fields directly.
SSL_SESSION struct is internal part of the OpenSSL library and it's fields should be accessed via API (when exposed), not directly. The unfortunate side-effect of this change is that we're losing reference count that used to be printed at the debug log level, but this seems to be an acceptable trade-off. Almost fixes build with -DOPENSSL_NO_SSL_INTERN. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
Diffstat (limited to 'src/http/ngx_http_upstream_round_robin.c')
-rw-r--r--src/http/ngx_http_upstream_round_robin.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 37c835cbd..b39eeae50 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -632,9 +632,8 @@ ngx_http_upstream_set_round_robin_peer_session(ngx_peer_connection_t *pc,
rc = ngx_ssl_set_session(pc->connection, ssl_session);
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
- "set session: %p:%d",
- ssl_session, ssl_session ? ssl_session->references : 0);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
+ "set session: %p", ssl_session);
/* ngx_unlock_mutex(rrp->peers->mutex); */
@@ -657,8 +656,8 @@ ngx_http_upstream_save_round_robin_peer_session(ngx_peer_connection_t *pc,
return;
}
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
- "save session: %p:%d", ssl_session, ssl_session->references);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
+ "save session: %p", ssl_session);
peer = &rrp->peers->peer[rrp->current];
@@ -672,9 +671,8 @@ ngx_http_upstream_save_round_robin_peer_session(ngx_peer_connection_t *pc,
if (old_ssl_session) {
- ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
- "old session: %p:%d",
- old_ssl_session, old_ssl_session->references);
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
+ "old session: %p", old_ssl_session);
/* TODO: may block */