mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-24 15:01:09 +00:00
Correct record header size in case of TLS
The previous commit reduced the internal header size to 5 bytes in case of TLS. This is not a valid since in that situation Mbed TLS internally uses the first 8 bytes of the message buffer for the implicit record sequence number.
This commit is contained in:
parent
0ca15967d1
commit
e40802aebc
|
@ -154,14 +154,10 @@
|
||||||
#error Bad configuration - protected record payload too large.
|
#error Bad configuration - protected record payload too large.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SSL_PROTO_DTLS)
|
/* Note: Even though the TLS record header is only 5 bytes
|
||||||
/* https://tools.ietf.org/html/rfc5246#section-6.2 */
|
long, we're internally using 8 bytes to store the
|
||||||
#define MBEDTLS_SSL_HEADER_LEN 5
|
implicit sequence number. */
|
||||||
#else
|
|
||||||
/* https://tools.ietf.org/html/rfc6347#section-4.1 */
|
|
||||||
/* 8 additional bytes for epoch and sequence number */
|
|
||||||
#define MBEDTLS_SSL_HEADER_LEN 13
|
#define MBEDTLS_SSL_HEADER_LEN 13
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MBEDTLS_SSL_BUFFER_LEN \
|
#define MBEDTLS_SSL_BUFFER_LEN \
|
||||||
( ( MBEDTLS_SSL_HEADER_LEN ) + ( MBEDTLS_SSL_PAYLOAD_LEN ) )
|
( ( MBEDTLS_SSL_HEADER_LEN ) + ( MBEDTLS_SSL_PAYLOAD_LEN ) )
|
||||||
|
|
Loading…
Reference in a new issue