Changeset 2136

Show
Ignore:
Timestamp:
03/26/2008 11:51:06 AM (4 months ago)
Author:
stbuehler
Message:

Fix #285 again: read error after SSL_shutdown (thx marton.illes@balabit.com) and clear the error queue before some other calls

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lighttpd-1.4.x/NEWS

    r2130 r2136  
    99  * Fix mod_extforward to compile with old gcc version (#1591) 
    1010  * Update documentation for #1587 
     11  * Fix #285 again: read error after SSL_shutdown (thx marton.illes@balabit.com) and clear the error queue before some other calls 
    1112 
    1213- 1.4.19 - 2008-03-10 
  • branches/lighttpd-1.4.x/src/connections.c

    r2103 r2136  
    200200        /* don't resize the buffer if we were in SSL_ERROR_WANT_* */ 
    201201 
     202        ERR_clear_error(); 
    202203        do { 
    203204                if (!con->ssl_error_want_reuse_buffer) { 
     
    16701671                        if (srv_sock->is_ssl) { 
    16711672                                int ret; 
     1673                                ERR_clear_error(); 
    16721674                                switch ((ret = SSL_shutdown(con->ssl))) { 
    16731675                                case 1: 
     
    16751677                                        break; 
    16761678                                case 0: 
    1677                                         SSL_shutdown(con->ssl); 
    1678                                         break; 
     1679                                        ERR_clear_error(); 
     1680                                        if ((ret = SSL_shutdown(con->ssl)) == 1) break; 
     1681 
     1682                                        // fall through 
    16791683                                default: 
    16801684                                        log_error_write(srv, __FILE__, __LINE__, "sds", "SSL:", 
  • branches/lighttpd-1.4.x/src/network_openssl.c

    r2084 r2136  
    8686                         */ 
    8787 
     88                        ERR_clear_error(); 
    8889                        if ((r = SSL_write(ssl, offset, toSend)) <= 0) { 
    8990                                unsigned long err; 
     
    188189                                close(ifd); 
    189190 
     191                                ERR_clear_error(); 
    190192                                if ((r = SSL_write(ssl, s, toSend)) <= 0) { 
    191193                                        unsigned long err;