mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 12:45:39 +01:00
- Fixed bug in ssl_write() when flushing old data (Fixes ticket #18)
This commit is contained in:
parent
be4e7dca08
commit
1fd00bfe82
@ -13,6 +13,8 @@ Bugfix
|
||||
* Debug output of MPI's now the same independent of underlying
|
||||
platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads
|
||||
Kiilerich and Mihai Militaru)
|
||||
* Fixed bug in ssl_write() when flushing old data (Fixed ticket
|
||||
#18, found by Nikolay Epifanov)
|
||||
|
||||
= Version 0.99-pre3 released on 2011-02-28
|
||||
This release replaces version 0.99-pre2 which had possible copyright issues.
|
||||
|
@ -2141,9 +2141,6 @@ int ssl_write( ssl_context *ssl, const unsigned char *buf, int len )
|
||||
}
|
||||
}
|
||||
|
||||
n = ( len < SSL_MAX_CONTENT_LEN )
|
||||
? len : SSL_MAX_CONTENT_LEN;
|
||||
|
||||
if( ssl->out_left != 0 )
|
||||
{
|
||||
if( ( ret = ssl_flush_output( ssl ) ) != 0 )
|
||||
@ -2152,17 +2149,18 @@ int ssl_write( ssl_context *ssl, const unsigned char *buf, int len )
|
||||
return( ret );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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 );
|
||||
return( ret );
|
||||
}
|
||||
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 );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
SSL_DEBUG_MSG( 2, ( "<= write" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user