Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-11 17:07:14 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-11-11 17:07:14 +0300
commit1b73583ba2c0e4b72d951218827e0c621427d389 (patch)
tree9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/event/ngx_event_openssl.c
parentd6f24959428caed68a509a19ca4fd866d978a69c (diff)
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
Diffstat (limited to 'src/event/ngx_event_openssl.c')
-rw-r--r--src/event/ngx_event_openssl.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 7a7038d4f..b5c5b7256 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -73,7 +73,7 @@ ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
}
if (!SSL_is_init_finished(c->ssl->ssl)) {
- handshake = "in SSL handshake";
+ handshake = " in SSL handshake";
} else {
handshake = "";
@@ -269,7 +269,7 @@ 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";
+ handshake = " in SSL handshake";
} else {
handshake = "";
@@ -310,6 +310,9 @@ ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c)
}
again = 0;
+#if (NGX_SUPPRESS_WARN)
+ sslerr = 0;
+#endif
for ( ;; ) {
n = SSL_shutdown(c->ssl->ssl);
@@ -366,23 +369,18 @@ ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c)
void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
char *fmt, ...)
{
- int len;
- char errstr[NGX_MAX_CONF_ERRSTR];
- va_list args;
+ u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last;
+ va_list args;
+
+ last = errstr + NGX_MAX_CONF_ERRSTR;
va_start(args, fmt);
- len = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args);
+ p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args);
va_end(args);
- errstr[len++] = ' ';
- errstr[len++] = '(';
- errstr[len++] = 'S';
- errstr[len++] = 'S';
- errstr[len++] = 'L';
- errstr[len++] = ':';
- errstr[len++] = ' ';
+ p = ngx_cpystrn(p, " (SSL: ", last - p);
- ERR_error_string_n(ERR_get_error(), errstr + len, sizeof(errstr) - len - 1);
+ ERR_error_string_n(ERR_get_error(), (char *) p, last - p);
ngx_log_error(level, log, err, "%s)", errstr);
}