Skip to content

Commit

Permalink
Add more TLS buffer space (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperl authored Apr 28, 2022
1 parent 3d91489 commit d9b9aa4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ endif()

# Set the output buffer size to 3700, reduced from 16k. This is small enough
# that the allocation from MbedTLS is < 4k, 4033bytes to be precise. We set
# the input buffer length to 6k because some sites have very large certificates
# the input buffer length to 8k because some sites have very large certificates
# (eg Telegram, over 5100 bytes) and this is not something we can control.
# There are some protocol extensions for telling the other side about our buffer
# sizes, but they just cause the other side to fragment packets more agressively.
# At this end we still have to reassemble the packets in and unfragmented form
# that fits in the buffer size below.
set(MBEDTLS_C_FLAGS "-DMBEDTLS_SSL_IN_CONTENT_LEN=6400 -DMBEDTLS_SSL_OUT_CONTENT_LEN=3700 -DMBEDTLS_PLATFORM_MEMORY=1")
set(MBEDTLS_C_FLAGS "-DMBEDTLS_SSL_IN_CONTENT_LEN=8100 -DMBEDTLS_SSL_OUT_CONTENT_LEN=3700 -DMBEDTLS_PLATFORM_MEMORY=1")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TOIT_GENERIC_FLAGS} ${TOIT_LWIP_C_FLAGS} ${MBEDTLS_C_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
Expand Down

0 comments on commit d9b9aa4

Please sign in to comment.