Change restart context type.
No need to have both x509 and ecdsa, as the former contains the later.
This commit is contained in:
parent
d27d1a5a82
commit
6b7301c872
3 changed files with 5 additions and 5 deletions
|
@ -228,7 +228,7 @@ struct mbedtls_ssl_handshake_params
|
||||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||||
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
||||||
int ecrs_enabled; /*!< Handshake supports EC restart? */
|
int ecrs_enabled; /*!< Handshake supports EC restart? */
|
||||||
mbedtls_ecdsa_restart_ctx ecrs_ctx; /*!< ECDSA restart context */
|
mbedtls_x509_crt_restart_ctx ecrs_ctx; /*!< restart context */
|
||||||
enum {
|
enum {
|
||||||
ssl_ecrs_init = 0, /*!< just getting started */
|
ssl_ecrs_init = 0, /*!< just getting started */
|
||||||
ssl_ecrs_ske_read, /*!< ServerKeyExchange was read */
|
ssl_ecrs_ske_read, /*!< ServerKeyExchange was read */
|
||||||
|
|
|
@ -2615,7 +2615,7 @@ ske_process:
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
||||||
if( ssl->handshake->ecrs_enabled )
|
if( ssl->handshake->ecrs_enabled )
|
||||||
rs_ctx = &ssl->handshake->ecrs_ctx;
|
rs_ctx = &ssl->handshake->ecrs_ctx.ecdsa;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_verify_restartable(
|
if( ( ret = mbedtls_pk_verify_restartable(
|
||||||
|
@ -3290,7 +3290,7 @@ keys_derived:
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
||||||
if( ssl->handshake->ecrs_enabled )
|
if( ssl->handshake->ecrs_enabled )
|
||||||
rs_ctx = &ssl->handshake->ecrs_ctx;
|
rs_ctx = &ssl->handshake->ecrs_ctx.ecdsa;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_sign_restartable( mbedtls_ssl_own_key( ssl ),
|
if( ( ret = mbedtls_pk_sign_restartable( mbedtls_ssl_own_key( ssl ),
|
||||||
|
|
|
@ -5473,7 +5473,7 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
||||||
mbedtls_ecdsa_restart_init( &handshake->ecrs_ctx );
|
mbedtls_x509_crt_restart_init( &handshake->ecrs_ctx );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
||||||
|
@ -7309,7 +7309,7 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake )
|
||||||
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_SERVER_NAME_INDICATION */
|
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_SERVER_NAME_INDICATION */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
|
||||||
mbedtls_ecdsa_restart_free( &handshake->ecrs_ctx );
|
mbedtls_x509_crt_restart_free( &handshake->ecrs_ctx );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
|
|
Loading…
Reference in a new issue