diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
| commit | 924bd79e317e9a137c0d1b9d349185758a628ec4 (patch) | |
| tree | f877c8b19e53e7d0a7683e3dd9aeb713146c4a8f /src/event/ngx_event_openssl.c | |
| parent | aef13d7f6660f4f8d2c50c95b8e182e62c115f88 (diff) | |
| download | nginx-release-0.1.1.tar.gz nginx-release-0.1.1.tar.bz2 | |
nginx-0.1.1-RELEASE importrelease-0.1.1
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
Diffstat (limited to '')
| -rw-r--r-- | src/event/ngx_event_openssl.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 8c48a7afa..151cc429f 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -72,6 +72,13 @@ ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size) return n; } + if (!SSL_is_init_finished(c->ssl->ssl)) { + handshake = "in SSL handshake"; + + } else { + handshake = ""; + } + sslerr = SSL_get_error(c->ssl->ssl, n); err = (sslerr == SSL_ERROR_SYSCALL) ? ngx_errno : 0; @@ -91,13 +98,6 @@ ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size) #endif } - if (!SSL_is_init_finished(c->ssl->ssl)) { - handshake = "in SSL handshake"; - - } else { - handshake = ""; - } - c->ssl->no_rcv_shut = 1; if (sslerr == SSL_ERROR_ZERO_RETURN || ERR_peek_error() == 0) { @@ -240,8 +240,9 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, static ngx_int_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size) { - int n, sslerr; - ngx_err_t err; + int n, sslerr; + ngx_err_t err; + char *handshake; ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL to write: %d", size); @@ -265,13 +266,21 @@ static ngx_int_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size) } if (sslerr == SSL_ERROR_WANT_READ) { + + if (!SSL_is_init_finished(c->ssl->ssl)) { + handshake = "in SSL handshake"; + + } else { + handshake = ""; + } + ngx_log_error(NGX_LOG_ALERT, c->log, err, "SSL wants to read%s", handshake); return NGX_ERROR; #if 0 return NGX_AGAIN; - } #endif + } c->ssl->no_rcv_shut = 1; |
