tls13:server:add dummy write certificate

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2022-04-16 13:59:52 +08:00
parent 5479f5321a
commit 83da34eb59

View file

@ -1443,6 +1443,24 @@ cleanup:
return( ret );
}
/*
* State Handler : MBEDTLS_SSL_SERVER_CERTIFICATE
*/
int ssl_tls13_write_server_certificate( mbedtls_ssl_context *ssl )
{
((void) ssl);
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
}
/*
* State Handler : MBEDTLS_SSL_CERTIFICATE_VERIFY
*/
int ssl_tls13_write_certificate_verify( mbedtls_ssl_context *ssl )
{
((void) ssl);
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
}
/*
* TLS 1.3 State Machine -- server side
*/
@ -1499,6 +1517,14 @@ int mbedtls_ssl_tls13_handshake_server_step( mbedtls_ssl_context *ssl )
break;
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
case MBEDTLS_SSL_SERVER_CERTIFICATE:
ret = ssl_tls13_write_server_certificate( ssl );
break;
case MBEDTLS_SSL_CERTIFICATE_VERIFY:
ret = ssl_tls13_write_certificate_verify( ssl );
break;
default:
MBEDTLS_SSL_DEBUG_MSG( 1, ( "invalid state %d", ssl->state ) );
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );