From 250b1ca6f3035445b6694d5dde59d4fd00d6262f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 15 Aug 2014 10:59:03 +0200 Subject: [PATCH] Fix ssl_server2 exiting on recoverable errors --- programs/ssl/ssl_server2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 73b308f0c..516ac535d 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -1545,7 +1545,7 @@ reset: { printf( " ! memory allocation failed\n" ); ret = 1; - goto exit; + goto reset; } memset( larger_buf, 0, ori_len + extra_len ); @@ -1558,7 +1558,7 @@ reset: { printf( " ! ssl_read failed on cached data\n" ); ret = 1; - goto exit; + goto reset; } larger_buf[ori_len + extra_len] = '\0'; @@ -1596,7 +1596,7 @@ reset: if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { printf( " failed\n ! ssl_write returned %d\n\n", ret ); - goto exit; + goto reset; } } } @@ -1618,7 +1618,7 @@ reset: ret != POLARSSL_ERR_NET_WANT_WRITE ) { printf( " failed\n ! ssl_renegotiate returned %d\n\n", ret ); - goto exit; + goto reset; } }