diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-12-05 13:18:09 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-12-05 13:18:09 +0000 |
commit | d3283ff9224a41a1a24c2d89f671811c0747480a (patch) | |
tree | e122c436f72f587622e8ec0e75632434045e330d /src/event/ngx_event_openssl.c | |
parent | 0624ed3d7eaa1995d9e5ec4292bd1eccda09cafc (diff) | |
download | nginx-release-0.3.13.tar.gz nginx-release-0.3.13.zip |
nginx-0.3.13-RELEASE importrelease-0.3.13
*) 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.
Diffstat (limited to 'src/event/ngx_event_openssl.c')
-rw-r--r-- | src/event/ngx_event_openssl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 7efb713e2..441472e42 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -301,12 +301,12 @@ ngx_ssl_handshake(ngx_connection_t *c) *d = '\0'; - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, + ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL: %s, cipher: \"%s\"", SSL_get_version(c->ssl->connection), &buf[1]); if (SSL_session_reused(c->ssl->connection)) { - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL reused session"); } @@ -630,7 +630,7 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) for ( ;; ) { while (in && buf->last < buf->end) { - if (in->buf->last_buf) { + if (in->buf->last_buf || in->buf->flush) { flush = 1; } @@ -645,11 +645,6 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) size = buf->end - buf->last; } - /* - * TODO: the taking in->buf->flush into account can be - * implemented using the limit on the higher level - */ - if (send + size > limit) { size = (ssize_t) (limit - send); flush = 1; @@ -943,7 +938,7 @@ ngx_ssl_connection_error(ngx_connection_t *c, int sslerr, ngx_err_t err, } -void +void ngx_cdecl ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) { u_long n; @@ -958,7 +953,13 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) p = ngx_cpystrn(p, (u_char *) " (SSL:", last - p); - while (p < last && (n = ERR_get_error())) { + while (p < last) { + + n = ERR_get_error(); + + if (n == 0) { + break; + } *p++ = ' '; |