mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-04 04:20:43 +00:00
fix various issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
c8bdbf72d3
commit
f1c3c4e77c
@ -1449,8 +1449,11 @@ cleanup:
|
|||||||
static int ssl_tls13_write_server_certificate( mbedtls_ssl_context *ssl )
|
static int ssl_tls13_write_server_certificate( mbedtls_ssl_context *ssl )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
||||||
int ret = mbedtls_ssl_tls13_write_certificate( ssl );
|
int ret;
|
||||||
if(ret != 0)
|
if( mbedtls_ssl_own_cert( ssl ) == NULL )
|
||||||
|
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||||
|
ret = mbedtls_ssl_tls13_write_certificate( ssl );
|
||||||
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
||||||
mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_CERTIFICATE_VERIFY );
|
mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_CERTIFICATE_VERIFY );
|
||||||
@ -1464,7 +1467,7 @@ static int ssl_tls13_write_certificate_verify( mbedtls_ssl_context *ssl )
|
|||||||
{
|
{
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
||||||
int ret = mbedtls_ssl_tls13_write_certificate_verify( ssl );
|
int ret = mbedtls_ssl_tls13_write_certificate_verify( ssl );
|
||||||
if(ret != 0)
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
||||||
mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_FINISHED );
|
mbedtls_ssl_handshake_set_state( ssl, MBEDTLS_SSL_SERVER_FINISHED );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user