Mercurial > hg > nginx-vendor-1-0
comparison src/event/ngx_event_openssl.c @ 10:46833bd150cb NGINX_0_1_5
nginx 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.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 00:00:00 +0300 |
parents | 4b2dafa26fe2 |
children | 6f8b0dc0f8dd |
comparison
equal
deleted
inserted
replaced
9:77eee314ddbd | 10:46833bd150cb |
---|---|
71 if (n > 0) { | 71 if (n > 0) { |
72 return n; | 72 return n; |
73 } | 73 } |
74 | 74 |
75 if (!SSL_is_init_finished(c->ssl->ssl)) { | 75 if (!SSL_is_init_finished(c->ssl->ssl)) { |
76 handshake = "in SSL handshake"; | 76 handshake = " in SSL handshake"; |
77 | 77 |
78 } else { | 78 } else { |
79 handshake = ""; | 79 handshake = ""; |
80 } | 80 } |
81 | 81 |
267 } | 267 } |
268 | 268 |
269 if (sslerr == SSL_ERROR_WANT_READ) { | 269 if (sslerr == SSL_ERROR_WANT_READ) { |
270 | 270 |
271 if (!SSL_is_init_finished(c->ssl->ssl)) { | 271 if (!SSL_is_init_finished(c->ssl->ssl)) { |
272 handshake = "in SSL handshake"; | 272 handshake = " in SSL handshake"; |
273 | 273 |
274 } else { | 274 } else { |
275 handshake = ""; | 275 handshake = ""; |
276 } | 276 } |
277 | 277 |
308 SSL_set_shutdown(c->ssl->ssl, SSL_SENT_SHUTDOWN); | 308 SSL_set_shutdown(c->ssl->ssl, SSL_SENT_SHUTDOWN); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 again = 0; | 312 again = 0; |
313 #if (NGX_SUPPRESS_WARN) | |
314 sslerr = 0; | |
315 #endif | |
313 | 316 |
314 for ( ;; ) { | 317 for ( ;; ) { |
315 n = SSL_shutdown(c->ssl->ssl); | 318 n = SSL_shutdown(c->ssl->ssl); |
316 | 319 |
317 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL_shutdown: %d", n); | 320 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL_shutdown: %d", n); |
364 | 367 |
365 | 368 |
366 void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, | 369 void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, |
367 char *fmt, ...) | 370 char *fmt, ...) |
368 { | 371 { |
369 int len; | 372 u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; |
370 char errstr[NGX_MAX_CONF_ERRSTR]; | 373 va_list args; |
371 va_list args; | 374 |
375 last = errstr + NGX_MAX_CONF_ERRSTR; | |
372 | 376 |
373 va_start(args, fmt); | 377 va_start(args, fmt); |
374 len = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); | 378 p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); |
375 va_end(args); | 379 va_end(args); |
376 | 380 |
377 errstr[len++] = ' '; | 381 p = ngx_cpystrn(p, " (SSL: ", last - p); |
378 errstr[len++] = '('; | 382 |
379 errstr[len++] = 'S'; | 383 ERR_error_string_n(ERR_get_error(), (char *) p, last - p); |
380 errstr[len++] = 'S'; | |
381 errstr[len++] = 'L'; | |
382 errstr[len++] = ':'; | |
383 errstr[len++] = ' '; | |
384 | |
385 ERR_error_string_n(ERR_get_error(), errstr + len, sizeof(errstr) - len - 1); | |
386 | 384 |
387 ngx_log_error(level, log, err, "%s)", errstr); | 385 ngx_log_error(level, log, err, "%s)", errstr); |
388 } | 386 } |