Commit 6e95d74f authored by Nathaniel Wesley Filardo's avatar Nathaniel Wesley Filardo Committed by Marcel Stör
Browse files

Update TLS protocol support (#2587)

* Update TLS protocol support

TLS1.0 is past PCI's EOL; BEAST is no more
Enable elliptic curve key exchanges
	Do not enable the smallest ECs for security
	Do not enable the largest ECs for computational time
	Do not enable 25519 (sad) because it doesn't go across the wire
Drop non-PFS key exchanges
Drop ARC4, Blowfish, DES, genprime, XTEA code
Drop renegotiation support completely
	It takes so much heap that it's not likely to work out well

Tidy handling of SSL_BUFFER_SIZE

Update docs
Drop mention of startcom, since they are no more, for letsencrypt

* Update mbedtls to 2.7.7

Preserve our vsnprintf and platform hacks

* Introduce TLS maximum fragment size knob

Reduce buffer size to 4Ki by default and advertize that.  That's the
largest we can advertize with the TLS MFL extension, so there's no
point in making them larger.  The truly adventurous can re-raise
SSL_BUFFER_SIZE and undefine the SSL_MAX_FRAGMENT_LENGTH_CODE and get
back to the earlier behavior.

* Default to mbedTLS debug with DEVELOP_VERSION
parent c6653b59
......@@ -655,7 +655,6 @@ static const LUA_REG_TYPE tls_map[] = {
int luaopen_tls( lua_State *L ) {
luaL_rometatable(L, "tls.socket", (void *)tls_socket_map); // create metatable for net.server
espconn_secure_set_size(ESPCONN_CLIENT, 4096);
return 0;
}
......
......@@ -151,14 +151,6 @@ void nodemcu_init(void) {
return;
}
#if 0
// espconn_secure_set_size() is not effective
// see comments for MBEDTLS_SSL_MAX_CONTENT_LEN in user_mbedtls.h
#if defined ( CLIENT_SSL_ENABLE ) && defined ( SSL_BUFFER_SIZE )
espconn_secure_set_size(ESPCONN_CLIENT, SSL_BUFFER_SIZE);
#endif
#endif
#ifdef BUILD_SPIFFS
if (!vfs_mount("/FLASH", 0)) {
// Failed to mount -- try reformat
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment