TLS1.3: Alignment coding styles based on comments
Fix kinds of alignment issues in fetch handshake messages. Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
parent
6b226b0874
commit
16c61aa738
@ -1493,9 +1493,9 @@ static inline void mbedtls_ssl_handshake_set_state( mbedtls_ssl_context *ssl,
|
||||
* Fetch TLS 1.3 handshake message header
|
||||
*/
|
||||
int mbedtls_ssl_tls1_3_fetch_handshake_msg( mbedtls_ssl_context *ssl,
|
||||
unsigned hs_type,
|
||||
unsigned char **buf,
|
||||
size_t *buf_len );
|
||||
unsigned hs_type,
|
||||
unsigned char **buf,
|
||||
size_t *buf_len );
|
||||
|
||||
/*
|
||||
* Write TLS 1.3 handshake message header
|
||||
|
@ -29,9 +29,9 @@
|
||||
#include "ssl_misc.h"
|
||||
|
||||
int mbedtls_ssl_tls1_3_fetch_handshake_msg( mbedtls_ssl_context *ssl,
|
||||
unsigned hs_type,
|
||||
unsigned char **buf,
|
||||
size_t *buflen )
|
||||
unsigned hs_type,
|
||||
unsigned char **buf,
|
||||
size_t *buflen )
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -41,10 +41,10 @@ int mbedtls_ssl_tls1_3_fetch_handshake_msg( mbedtls_ssl_context *ssl,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ||
|
||||
if( ssl->in_msgtype != MBEDTLS_SSL_MSG_HANDSHAKE ||
|
||||
ssl->in_msg[0] != hs_type )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad certificate verify message" ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "Receive unexpected handshake message." ) );
|
||||
MBEDTLS_SSL_PEND_FATAL_ALERT( MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE,
|
||||
MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE );
|
||||
ret = MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
|
||||
@ -54,7 +54,6 @@ int mbedtls_ssl_tls1_3_fetch_handshake_msg( mbedtls_ssl_context *ssl,
|
||||
*buf = ssl->in_msg + 4;
|
||||
*buflen = ssl->in_hslen - 4;
|
||||
|
||||
|
||||
cleanup:
|
||||
|
||||
return( ret );
|
||||
|
Loading…
Reference in New Issue
Block a user