mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	- Undid fix for ssl_write that introduced a true bug when buffers are running full.
This commit is contained in:
		
							parent
							
								
									828acb2234
								
							
						
					
					
						commit
						887bd502d2
					
				@ -1,5 +1,10 @@
 | 
				
			|||||||
PolarSSL ChangeLog
 | 
					PolarSSL ChangeLog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					= Version trunk
 | 
				
			||||||
 | 
					Bugfix
 | 
				
			||||||
 | 
					   * Undid faulty bug fix in ssl_write() when flushing old data (Ticket
 | 
				
			||||||
 | 
					     #18)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
= Version 0.99-pre5 released on 2011-05-26
 | 
					= Version 0.99-pre5 released on 2011-05-26
 | 
				
			||||||
Features
 | 
					Features
 | 
				
			||||||
   * Added additional Cipher Block Modes to symmetric ciphers
 | 
					   * Added additional Cipher Block Modes to symmetric ciphers
 | 
				
			||||||
 | 
				
			|||||||
@ -2164,6 +2164,9 @@ int ssl_write( ssl_context *ssl, const unsigned char *buf, size_t len )
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    n = ( len < SSL_MAX_CONTENT_LEN )
 | 
				
			||||||
 | 
					        ? len : SSL_MAX_CONTENT_LEN;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( ssl->out_left != 0 )
 | 
					    if( ssl->out_left != 0 )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if( ( ret = ssl_flush_output( ssl ) ) != 0 )
 | 
					        if( ( ret = ssl_flush_output( ssl ) ) != 0 )
 | 
				
			||||||
@ -2172,18 +2175,17 @@ int ssl_write( ssl_context *ssl, const unsigned char *buf, size_t len )
 | 
				
			|||||||
            return( ret );
 | 
					            return( ret );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
    n = ( len < SSL_MAX_CONTENT_LEN )
 | 
					 | 
				
			||||||
        ? len : SSL_MAX_CONTENT_LEN;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ssl->out_msglen  = n;
 | 
					 | 
				
			||||||
    ssl->out_msgtype = SSL_MSG_APPLICATION_DATA;
 | 
					 | 
				
			||||||
    memcpy( ssl->out_msg, buf, n );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if( ( ret = ssl_write_record( ssl ) ) != 0 )
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SSL_DEBUG_RET( 1, "ssl_write_record", ret );
 | 
					        ssl->out_msglen  = n;
 | 
				
			||||||
        return( ret );
 | 
					        ssl->out_msgtype = SSL_MSG_APPLICATION_DATA;
 | 
				
			||||||
 | 
					        memcpy( ssl->out_msg, buf, n );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if( ( ret = ssl_write_record( ssl ) ) != 0 )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            SSL_DEBUG_RET( 1, "ssl_write_record", ret );
 | 
				
			||||||
 | 
					            return( ret );
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SSL_DEBUG_MSG( 2, ( "<= write" ) );
 | 
					    SSL_DEBUG_MSG( 2, ( "<= write" ) );
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user