mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Add ssl_close_notify() to servers that missed it
This commit is contained in:
parent
00d538f8f9
commit
6b0d268bc9
5 changed files with 50 additions and 6 deletions
|
|
@ -1261,6 +1261,20 @@ reset:
|
|||
printf( " ok\n" );
|
||||
}
|
||||
|
||||
printf( " . Closing the connection..." );
|
||||
|
||||
while( ( ret = ssl_close_notify( &ssl ) ) < 0 )
|
||||
{
|
||||
if( ret != POLARSSL_ERR_NET_WANT_READ &&
|
||||
ret != POLARSSL_ERR_NET_WANT_WRITE )
|
||||
{
|
||||
printf( " failed\n ! ssl_close_notify returned %d\n\n", ret );
|
||||
goto reset;
|
||||
}
|
||||
}
|
||||
|
||||
printf( " ok\n" );
|
||||
|
||||
ret = 0;
|
||||
goto reset;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue