mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-07 06:29:53 +00:00
Fix ssl_close_notify() with non-blocking I/O
This commit is contained in:
parent
066c1f60bb
commit
86792a6cf3
|
@ -10,6 +10,8 @@ Security
|
||||||
Bugfix
|
Bugfix
|
||||||
* Fix potential bad read in parsing ServerHello (found by Adrien
|
* Fix potential bad read in parsing ServerHello (found by Adrien
|
||||||
Vialletelle).
|
Vialletelle).
|
||||||
|
* ssl_close_notify() could send more than one message in some circumstances
|
||||||
|
with non-blocking I/O.
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* X.509 certificates with more than one AttributeTypeAndValue per
|
* X.509 certificates with more than one AttributeTypeAndValue per
|
||||||
|
|
|
@ -4018,11 +4018,8 @@ int ssl_close_notify( ssl_context *ssl )
|
||||||
|
|
||||||
SSL_DEBUG_MSG( 2, ( "=> write close notify" ) );
|
SSL_DEBUG_MSG( 2, ( "=> write close notify" ) );
|
||||||
|
|
||||||
if( ( ret = ssl_flush_output( ssl ) ) != 0 )
|
if( ssl->out_left != 0 )
|
||||||
{
|
return( ssl_flush_output( ssl ) );
|
||||||
SSL_DEBUG_RET( 1, "ssl_flush_output", ret );
|
|
||||||
return( ret );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ssl->state == SSL_HANDSHAKE_OVER )
|
if( ssl->state == SSL_HANDSHAKE_OVER )
|
||||||
{
|
{
|
||||||
|
@ -4036,7 +4033,7 @@ int ssl_close_notify( ssl_context *ssl )
|
||||||
|
|
||||||
SSL_DEBUG_MSG( 2, ( "<= write close notify" ) );
|
SSL_DEBUG_MSG( 2, ( "<= write close notify" ) );
|
||||||
|
|
||||||
return( ret );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ssl_transform_free( ssl_transform *transform )
|
void ssl_transform_free( ssl_transform *transform )
|
||||||
|
|
Loading…
Reference in a new issue