mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-17 20:42:44 +00:00
Clarify the need for calling mbedtls_ssl_derive_keys after extension parsing
Use a more straightforward condition to note that session resumption is happening. Co-authored-by: Ronald Cron <ronald.cron@arm.com> Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
3a29e9cf57
commit
21b50808cd
@ -1644,7 +1644,12 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC )
|
/*
|
||||||
|
* mbedtls_ssl_derive_keys() has to be called after the parsing of the
|
||||||
|
* extensions. It sets the transform data for the resumed session which in
|
||||||
|
* case of DTLS includes the server CID extracted from the CID extension.
|
||||||
|
*/
|
||||||
|
if( ssl->handshake->resume )
|
||||||
{
|
{
|
||||||
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user