mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 22:35:15 +00:00
Add flags for protecting TLS state machine
Flags are there to prevent skipping vital parts of the TLS handshake.
This commit is contained in:
parent
6122b59042
commit
b57d7fd568
|
@ -226,6 +226,9 @@
|
||||||
: ( MBEDTLS_SSL_IN_CONTENT_LEN ) \
|
: ( MBEDTLS_SSL_IN_CONTENT_LEN ) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#define MBEDTLS_SSL_FI_FLAG_UNSET 0x0
|
||||||
|
#define MBEDTLS_SSL_FI_FLAG_SET 0x7F
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check that we obey the standard's message size bounds
|
* Check that we obey the standard's message size bounds
|
||||||
*/
|
*/
|
||||||
|
@ -385,6 +388,11 @@ struct mbedtls_ssl_handshake_params
|
||||||
#if !defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
#if !defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||||
uint8_t got_peer_pubkey; /*!< Did we store the peer's public key from its certificate? */
|
uint8_t got_peer_pubkey; /*!< Did we store the peer's public key from its certificate? */
|
||||||
#endif /* !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
|
#endif /* !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
|
||||||
|
volatile uint8_t peer_authenticated; /*!< Is the peer authenticated? */
|
||||||
|
volatile uint8_t hello_random_set; /*!< Has the hello random been set? */
|
||||||
|
volatile uint8_t key_derivation_done; /*!< Has the key derivation been done? */
|
||||||
|
volatile uint8_t premaster_generated; /*!< Has the PMS been generated? */
|
||||||
|
volatile uint8_t got_proper_keys; /*!< Has the proper keys been set? */
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
unsigned char verify_cookie_len; /*!< Cli: cookie length
|
unsigned char verify_cookie_len; /*!< Cli: cookie length
|
||||||
Srv: flag for sending a cookie */
|
Srv: flag for sending a cookie */
|
||||||
|
|
Loading…
Reference in a new issue