Skip to content

Commit 3b55be8

Browse files
committed
Reformatting for better readability
1 parent f439f27 commit 3b55be8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,10 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort) {
7474
_brokerPort = brokerPort;
7575

7676
#ifdef BOARD_HAS_ECCX08
77-
if (!ECCX08.begin()) { Debug.print(DBG_ERROR, "Cryptography processor failure. Make sure you have a compatible board."); return 0; }
78-
79-
if (!CryptoUtil::readDeviceId(ECCX08, _device_id, ECCX08Slot::DeviceId)) { Debug.print(DBG_ERROR, "Cryptography processor read failure."); return 0; }
80-
77+
if (!ECCX08.begin()) { Debug.print(DBG_ERROR, "Cryptography processor failure. Make sure you have a compatible board."); return 0; }
78+
if (!CryptoUtil::readDeviceId(ECCX08, _device_id, ECCX08Slot::DeviceId)) { Debug.print(DBG_ERROR, "Cryptography processor read failure."); return 0; }
8179
if (!CryptoUtil::reconstructCertificate(ECCX08Cert, _device_id, ECCX08Slot::Key, ECCX08Slot::CompressedCertificate, ECCX08Slot::SerialNumberAndAuthorityKeyIdentifier)) { Debug.print(DBG_ERROR, "Cryptography certificate reconstruction failure."); return 0; }
82-
8380
ArduinoBearSSL.onGetTime(getTime);
84-
#endif /* BOARD_HAS_ECCX08 */
85-
86-
#ifdef BOARD_HAS_ECCX08
8781
_sslClient = new BearSSLClient(_connection->getClient(), ArduinoIoTCloudTrustAnchor, ArduinoIoTCloudTrustAnchor_NUM);
8882
_sslClient->setEccSlot(static_cast<int>(ECCX08Slot::Key), ECCX08Cert.bytes(), ECCX08Cert.length());
8983
#elif defined(BOARD_ESP)

0 commit comments

Comments
 (0)