mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-09 21:44:28 +00:00
Fix empty union when TLS is disabled
When all TLS 1.2 support is disabled, union mbedtls_ssl_premaster_secret was empty, which is not valid C even if the union is never used. Fixes #6628. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
1873d3bfc2
commit
e8e1e157cb
3
ChangeLog.d/ssl_premaster_secret-empty.txt
Normal file
3
ChangeLog.d/ssl_premaster_secret-empty.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Bugfix
|
||||
* Fix a compilation error on some platforms when including mbedtls/ssl.h
|
||||
with all TLS support disabled. Fixes #6628.
|
@ -620,6 +620,7 @@
|
||||
|
||||
/* Dummy type used only for its size */
|
||||
union mbedtls_ssl_premaster_secret {
|
||||
unsigned char dummy; /* Make the union non-empty even with SSL disabled */
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
|
||||
unsigned char _pms_rsa[48]; /* RFC 5246 8.1.1 */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user