Skip to content

Commit 26abf82

Browse files
committed
TLSClientMqtt: force CA only if UNOR4 is using CERTIFICATE auth mode
1 parent 68dd53b commit 26abf82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/tls/utility/TLSClientMqtt.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ void TLSClientMqtt::begin(ConnectionHandler & connection, ArduinoIoTAuthenticati
6666
*/
6767
(void)connection;
6868
/* Temporary force CACert to add new CA without rebuilding firmware */
69-
setCACert(AIoTSSCert);
69+
if (authMode == ArduinoIoTAuthenticationMode::CERTIFICATE) {
70+
setCACert(AIoTSSCert);
71+
}
7072
#elif defined(ARDUINO_ARCH_ESP32)
7173
(void)authMode;
7274
setCACert(AIoTUPCert);

0 commit comments

Comments
 (0)