diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 03fcfb52a..4235913f0 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -2371,23 +2371,27 @@ send_request: opt.serialize = 0; mbedtls_printf( " Serializing live connection..." ); - if( ( ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &len) ) != MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ) + if( ( ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &len ) ) + != MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ) { - mbedtls_printf( " failed\n ! mbedtls_ssl_context_save returned -0x%x\n\n", -ret ); + mbedtls_printf( " failed\n ! mbedtls_ssl_context_save returned " + "-0x%x\n\n", -ret ); goto exit; } - if( ( buf = mbedtls_calloc(1, len) ) == NULL ) + if( ( buf = mbedtls_calloc( 1, len ) ) == NULL ) { - mbedtls_printf( " failed\n ! Couldn't allocate buffer for serialized context" ); + mbedtls_printf( " failed\n ! Couldn't allocate buffer for " + "serialized context" ); goto exit; } if( ( ret = mbedtls_ssl_context_save( &ssl, buf, len, &len ) ) != 0 ) { - mbedtls_printf( "failed\n ! mbedtls_ssl_context_save returned -0x%x\n\n", -ret ); + mbedtls_printf( "failed\n ! mbedtls_ssl_context_save returned " + "-0x%x\n\n", -ret ); goto exit; } @@ -2396,12 +2400,13 @@ send_request: if( ( ret = mbedtls_ssl_context_load( &ssl, buf, len ) ) != 0 ) { - mbedtls_printf( "failed\n ! mbedtls_ssl_context_load returned -0x%x\n\n", -ret ); + mbedtls_printf( "failed\n ! mbedtls_ssl_context_load returned " + "-0x%x\n\n", -ret ); goto exit; } } -#endif +#endif /* MBEDTLS_SSL_CONTEXT_SERIALIZATION */ /* * 7d. Continue doing data exchanges? diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index c1e749f94..7b2c18453 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -3356,23 +3356,27 @@ data_exchange: opt.serialize = 0; mbedtls_printf( " Serializing live connection..." ); - if( ( ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &len) ) != MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ) + if( ( ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &len ) ) + != MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ) { - mbedtls_printf( " failed\n ! mbedtls_ssl_context_save returned -0x%x\n\n", -ret ); + mbedtls_printf( " failed\n ! mbedtls_ssl_context_save returned " + "-0x%x\n\n", -ret ); goto exit; } if( ( buf = mbedtls_calloc(1, len) ) == NULL ) { - mbedtls_printf( " failed\n ! Couldn't allocate buffer for serialized context" ); + mbedtls_printf( " failed\n ! Couldn't allocate buffer for " + "serialized context" ); goto exit; } if( ( ret = mbedtls_ssl_context_save( &ssl, buf, len, &len ) ) != 0 ) { - mbedtls_printf( "failed\n ! mbedtls_ssl_context_save returned -0x%x\n\n", -ret ); + mbedtls_printf( "failed\n ! mbedtls_ssl_context_save returned " + "-0x%x\n\n", -ret ); goto exit; } @@ -3381,12 +3385,13 @@ data_exchange: if( ( ret = mbedtls_ssl_context_load( &ssl, buf, len ) ) != 0 ) { - mbedtls_printf( "failed\n ! mbedtls_ssl_context_load returned -0x%x\n\n", -ret ); + mbedtls_printf( "failed\n ! mbedtls_ssl_context_load returned " + "-0x%x\n\n", -ret ); goto exit; } } -#endif +#endif /* MBEDTLS_SSL_CONTEXT_SERIALIZATION */ /* * 7c. Continue doing data exchanges?