From 25997053a8201cc6796a7999ca1e5d4d36899e2a Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 23 Dec 2020 03:34:24 -0500 Subject: [PATCH] Introduce FI protection to ssl client handshake step handling Signed-off-by: Andrzej Kurek --- library/ssl_cli.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index cc6c86d31..cef58e527 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -4261,10 +4261,12 @@ int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) } #endif + ret = MBEDTLS_ERR_PLATFORM_FAULT_DETECTED; switch( ssl->state ) { case MBEDTLS_SSL_HELLO_REQUEST: ssl->state = MBEDTLS_SSL_CLIENT_HELLO; + ret = 0; break; /* @@ -4381,6 +4383,7 @@ int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) case MBEDTLS_SSL_FLUSH_BUFFERS: MBEDTLS_SSL_DEBUG_MSG( 2, ( "handshake: done" ) ); ssl->state = MBEDTLS_SSL_HANDSHAKE_WRAPUP; + ret = 0; break; case MBEDTLS_SSL_HANDSHAKE_WRAPUP: