Merge branch 'development' into dtls
* development: Fix error code description. generate_errors.pl now errors on duplicate codes Avoid nested if's without braces. Move renego SCSV after actual ciphersuites Fix send_close_notify usage. Rename variable for clarity Improve script portability Conflicts: library/ssl_srv.c programs/ssl/ssl_client2.c programs/ssl/ssl_server2.c tests/ssl-opt.sh
This commit is contained in:
commit
3a173f497b
8 changed files with 50 additions and 36 deletions
|
@ -1487,8 +1487,7 @@ close_notify:
|
|||
printf( " . Closing the connection..." );
|
||||
|
||||
/* No error checking, the connection might be closed already */
|
||||
do
|
||||
ret = ssl_close_notify( &ssl );
|
||||
do ret = ssl_close_notify( &ssl );
|
||||
while( ret == POLARSSL_ERR_NET_WANT_WRITE );
|
||||
ret = 0;
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ void term_handler( int sig )
|
|||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int ret = 0, len, written, frags, exchanges;
|
||||
int ret = 0, len, written, frags, exchanges_left;
|
||||
int version_suites[4][2];
|
||||
unsigned char buf[IO_BUF_LEN];
|
||||
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)
|
||||
|
@ -1902,7 +1902,7 @@ reset:
|
|||
if( opt.exchanges == 0 )
|
||||
goto close_notify;
|
||||
|
||||
exchanges = opt.exchanges;
|
||||
exchanges_left = opt.exchanges;
|
||||
data_exchange:
|
||||
/*
|
||||
* 6. Read the HTTP Request
|
||||
|
@ -2042,7 +2042,7 @@ data_exchange:
|
|||
* (only on the first exchange, to be able to test retransmission)
|
||||
*/
|
||||
#if defined(POLARSSL_SSL_RENEGOTIATION)
|
||||
if( opt.renegotiate && exchanges == opt.exchanges )
|
||||
if( opt.renegotiate && exchanges_left == opt.exchanges )
|
||||
{
|
||||
printf( " . Requestion renegotiation..." );
|
||||
fflush( stdout );
|
||||
|
@ -2115,7 +2115,7 @@ data_exchange:
|
|||
/*
|
||||
* 7b. Continue doing data exchanges?
|
||||
*/
|
||||
if( --exchanges > 0 )
|
||||
if( --exchanges_left > 0 )
|
||||
goto data_exchange;
|
||||
|
||||
/*
|
||||
|
@ -2125,8 +2125,7 @@ close_notify:
|
|||
printf( " . Closing the connection..." );
|
||||
|
||||
/* No error checking, the connection might be closed already */
|
||||
do
|
||||
ret = ssl_close_notify( &ssl );
|
||||
do ret = ssl_close_notify( &ssl );
|
||||
while( ret == POLARSSL_ERR_NET_WANT_WRITE );
|
||||
ret = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue