Skip to content

Commit 6069b98

Browse files
committed
Remove mqtt 8883 fallback logic
1 parent 66cb090 commit 6069b98

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

src/ArduinoIoTCloudTCP.cpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int ArduinoIoTCloudTCP::begin(ConnectionHandler & connection, bool const enable_
133133
_otaClient.setEccSlot(static_cast<int>(SElementArduinoCloudSlot::Key), _cert.bytes(), _cert.length());
134134
#endif
135135
#endif
136-
_brokerPort = (brokerPort == DEFAULT_BROKER_PORT_AUTO) ? mqttPort() : brokerPort;
136+
_brokerPort = (brokerPort == DEFAULT_BROKER_PORT_AUTO) ? DEFAULT_BROKER_PORT_SECURE_AUTH : brokerPort;
137137
#endif
138138
}
139139
else
@@ -586,15 +586,6 @@ int ArduinoIoTCloudTCP::write(String const topic, byte const data[], int const l
586586
}
587587

588588
#if defined(BOARD_HAS_SECURE_ELEMENT)
589-
int ArduinoIoTCloudTCP::mqttPort()
590-
{
591-
if (memcmp(DEPRECATED_BROKER_AUTHORITY_KEY_IDENTIFIER, _cert.authorityKeyIdentifierBytes() , ECP256_CERT_AUTHORITY_KEY_ID_LENGTH) == 0) {
592-
return DEPRECATED_BROKER_PORT_SECURE_AUTH;
593-
} else {
594-
return DEFAULT_BROKER_PORT_SECURE_AUTH;
595-
}
596-
}
597-
598589
int ArduinoIoTCloudTCP::updateCertificate(String authorityKeyIdentifier, String serialNumber, String notBefore, String notAfter, String signature)
599590
{
600591
if (!_selement.begin())

src/ArduinoIoTCloudTCP.h

-8
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
******************************************************************************/
5050
static constexpr char DEFAULT_BROKER_ADDRESS[] = "iot.arduino.cc";
5151
static constexpr uint16_t DEFAULT_BROKER_PORT_SECURE_AUTH = 8885;
52-
static constexpr uint16_t DEPRECATED_BROKER_PORT_SECURE_AUTH = 8883;
53-
static constexpr uint8_t DEPRECATED_BROKER_AUTHORITY_KEY_IDENTIFIER[] = {
54-
0x5b, 0x3e, 0x2a, 0x6b, 0x8e, 0xc9, 0xb0, 0x1a, 0xa8, 0x54,
55-
0xe6, 0x36, 0x9b, 0x8c, 0x09, 0xf9, 0xfc, 0xe1, 0xb9, 0x80 };
5652
static constexpr uint16_t DEFAULT_BROKER_PORT_USER_PASS_AUTH = 8884;
5753
static constexpr uint16_t DEFAULT_BROKER_PORT_AUTO = 0;
5854

@@ -189,10 +185,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
189185
void detachThing();
190186
int write(String const topic, byte const data[], int const length);
191187

192-
#if defined(BOARD_HAS_SECURE_ELEMENT)
193-
int mqttPort();
194-
#endif
195-
196188
};
197189

198190
/******************************************************************************

0 commit comments

Comments
 (0)