mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Remove NULL-ing of passed in SSL context in ssl_populate_transform()
Remove a piece of code that was meant to ensure non-usage of the ssl context under conditions where it should not be used, as this now makes less sense and also triggers coverity. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@ -8159,14 +8159,6 @@ static int ssl_tls12_populate_transform(mbedtls_ssl_transform *transform,
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_DEBUG_C) && \
|
||||
!defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
if (ssl->f_export_keys == NULL) {
|
||||
ssl = NULL; /* make sure we don't use it except for these cases */
|
||||
(void) ssl;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some data just needs copying into the structure
|
||||
*/
|
||||
@ -8438,7 +8430,7 @@ static int ssl_tls12_populate_transform(mbedtls_ssl_transform *transform,
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (ssl != NULL && ssl->f_export_keys != NULL) {
|
||||
if (ssl->f_export_keys != NULL) {
|
||||
ssl->f_export_keys(ssl->p_export_keys,
|
||||
MBEDTLS_SSL_KEY_EXPORT_TLS12_MASTER_SECRET,
|
||||
master, 48,
|
||||
|
Reference in New Issue
Block a user