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
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index 025ac89..6ea01a8 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -687,7 +687,7 @@
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 @@
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 @@
* (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 @@
/*
* 7b. Continue doing data exchanges?
*/
- if( --exchanges > 0 )
+ if( --exchanges_left > 0 )
goto data_exchange;
/*
@@ -2125,8 +2125,7 @@
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;