1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Clean up existing SSL restartable ECC code

- more consistent naming with ecrs prefix for everything
- always check it enabled before touching the rest
- rm duplicated code in parse_server_hello()
This commit is contained in:
Manuel Pégourié-Gonnard
2017-08-15 11:49:08 +02:00
parent 8b59049407
commit d27d1a5a82
3 changed files with 40 additions and 31 deletions

View File

@ -5473,7 +5473,7 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
#endif
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
mbedtls_ecdsa_restart_init( &handshake->rs_ctx );
mbedtls_ecdsa_restart_init( &handshake->ecrs_ctx );
#endif
#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 */
#if defined(MBEDTLS_SSL__ECP_RESTARTABLE)
mbedtls_ecdsa_restart_free( &handshake->rs_ctx );
mbedtls_ecdsa_restart_free( &handshake->ecrs_ctx );
#endif
#if defined(MBEDTLS_SSL_PROTO_DTLS)