mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 17:25:49 +01:00
Enforce promise to not use whole ssl context
Configs with no DEBUG_C are use for example in test-ref-configs.pl, which also runs parts of compat.sh or ssl-opt.sh on them, so the added 'ssl = NULL' statements will be exercised in those tests at least.
This commit is contained in:
parent
1d10a98f56
commit
86e48c213c
@ -654,6 +654,7 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform,
|
|||||||
#if !defined(MBEDTLS_SSL_HW_RECORD_ACCEL) && \
|
#if !defined(MBEDTLS_SSL_HW_RECORD_ACCEL) && \
|
||||||
!defined(MBEDTLS_SSL_EXPORT_KEYS) && \
|
!defined(MBEDTLS_SSL_EXPORT_KEYS) && \
|
||||||
!defined(MBEDTLS_DEBUG_C)
|
!defined(MBEDTLS_DEBUG_C)
|
||||||
|
ssl = NULL; /* make sure we don't use it except for those cases */
|
||||||
(void) ssl;
|
(void) ssl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1108,6 +1109,7 @@ static int ssl_compute_master( mbedtls_ssl_handshake_params *handshake,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#if !defined(MBEDTLS_DEBUG_C) && !defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET)
|
#if !defined(MBEDTLS_DEBUG_C) && !defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET)
|
||||||
|
ssl = NULL; /* make sure we don't use it except for debug and EMS */
|
||||||
(void) ssl;
|
(void) ssl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1589,6 +1591,7 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
/* The SSL context is only used for debugging purposes! */
|
/* The SSL context is only used for debugging purposes! */
|
||||||
#if !defined(MBEDTLS_DEBUG_C)
|
#if !defined(MBEDTLS_DEBUG_C)
|
||||||
|
ssl = NULL; /* make sure we don't use it except for debug */
|
||||||
((void) ssl);
|
((void) ssl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1982,6 +1985,7 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context *ssl,
|
|||||||
unsigned char add_data[13];
|
unsigned char add_data[13];
|
||||||
|
|
||||||
#if !defined(MBEDTLS_DEBUG_C)
|
#if !defined(MBEDTLS_DEBUG_C)
|
||||||
|
ssl = NULL; /* make sure we don't use it except for debug */
|
||||||
((void) ssl);
|
((void) ssl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user