Skip to content

Commit 68b2a35

Browse files
committed
Limit cipher list to most commonly used
SCD auto calibration status added to status page
1 parent a25e897 commit 68b2a35

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

airrohr-firmware/airrohr-firmware.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,12 @@ static void webserver_status() {
16601660
page_content += FPSTR(EMPTY_ROW);
16611661
add_table_row_from_value(page_content, FPSTR(SENSORS_SDS011), last_value_SDS_version);
16621662
}
1663+
if (cfg::scd30_read) {
1664+
if (scd30.getAutoSelfCalibration() == true)
1665+
add_table_row_from_value(page_content, F("SCD30 Auto Calibration"), "enabled");
1666+
else
1667+
add_table_row_from_value(page_content, F("SCD30 Auto Calibration"), "disabled");
1668+
}
16631669

16641670
page_content += FPSTR(EMPTY_ROW);
16651671
page_content += F("<tr><td colspan='2'><b>" INTL_ERROR "</b></td></tr>");
@@ -2222,6 +2228,7 @@ static WiFiClient* getNewLoggerWiFiClient(const LoggerEntry logger) {
22222228
#if defined(ESP8266)
22232229
static_cast<WiFiClientSecure*>(_client)->setSession(loggerConfigs[logger].session);
22242230
static_cast<WiFiClientSecure*>(_client)->setBufferSizes(1024, TCP_MSS > 1024 ? 2048 : 1024);
2231+
static_cast<WiFiClientSecure*>(_client)->setCiphers(suites_P, sizeof(suites_P)/sizeof(suites_P[0]));
22252232
static_cast<WiFiClientSecure*>(_client)->setSSLVersion(BR_TLS12, BR_TLS12);
22262233
switch (logger) {
22272234
case Loggeraircms:

airrohr-firmware/defines.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,24 @@ constexpr const unsigned long DURATION_BEFORE_FORCED_RESTART_MS = ONE_DAY_IN_MS
144144
#define CLIENT_ADDRESS 2
145145
#define SERVER_ADDRESS 100
146146
#endif
147+
148+
// smaller cipher list to speed up TLS connections
149+
static const uint16_t suites_P[] PROGMEM = {
150+
BR_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
151+
BR_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
152+
BR_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
153+
BR_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
154+
BR_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
155+
BR_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
156+
BR_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
157+
BR_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
158+
BR_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
159+
BR_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
160+
BR_TLS_RSA_WITH_AES_128_GCM_SHA256,
161+
BR_TLS_RSA_WITH_AES_256_GCM_SHA384,
162+
// basic ciphers used in axTLS
163+
BR_TLS_RSA_WITH_AES_128_CBC_SHA256,
164+
BR_TLS_RSA_WITH_AES_256_CBC_SHA256,
165+
BR_TLS_RSA_WITH_AES_128_CBC_SHA,
166+
BR_TLS_RSA_WITH_AES_256_CBC_SHA,
167+
};

0 commit comments

Comments
 (0)