Skip to content

Commit

Permalink
Merge pull request #7987 from gilles-peskine-arm/ssl_premaster_secret…
Browse files Browse the repository at this point in the history
…-empty-2.28

Backport 2.28: Fix empty union when TLS is disabled
  • Loading branch information
gilles-peskine-arm authored Jul 27, 2023
2 parents b98d39c + e5507d5 commit ae68c09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.d/ssl_premaster_secret-empty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix
* Fix a compilation error on some platforms when including mbedtls/ssl.h
with all TLS support disabled. Fixes #6628.
1 change: 1 addition & 0 deletions include/mbedtls/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,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
Expand Down

0 comments on commit ae68c09

Please sign in to comment.