File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -131,21 +131,21 @@ bool InfluxDBClient::init() {
131
131
if (https) {
132
132
#if defined(ESP8266)
133
133
BearSSL::WiFiClientSecure *wifiClientSec = new BearSSL::WiFiClientSecure;
134
- if (_certInfo && strlen_P (_certInfo) > 0 ) {
134
+ if (_insecure) {
135
+ wifiClientSec->setInsecure ();
136
+ } else if (_certInfo && strlen_P (_certInfo) > 0 ) {
135
137
if (strlen_P (_certInfo) > 60 ) { // differentiate fingerprint and cert
136
138
_cert = new BearSSL::X509List (_certInfo);
137
139
wifiClientSec->setTrustAnchors (_cert);
138
140
} else {
139
141
wifiClientSec->setFingerprint (_certInfo);
140
142
}
141
143
}
142
- if (_insecure) {
143
- wifiClientSec->setInsecure ();
144
- }
144
+
145
145
checkMFLN (wifiClientSec, _serverUrl);
146
146
#elif defined(ESP32)
147
147
WiFiClientSecure *wifiClientSec = new WiFiClientSecure;
148
- if (_certInfo && strlen_P (_certInfo) > 0 ) {
148
+ if (!_insecure && _certInfo && strlen_P (_certInfo) > 0 ) {
149
149
wifiClientSec->setCACert (_certInfo);
150
150
}
151
151
#endif
You can’t perform that action at this time.
0 commit comments