Skip to content

Commit d31be30

Browse files
committed
Save cert right after rebuild on boards using nina-fw
1 parent 67eccfa commit d31be30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,14 @@ int ArduinoIoTCloudTCP::updateCertificate(String authorityKeyIdentifier, String
617617
if (SElementArduinoCloudCertificate::rebuild(_selement, _cert, getDeviceId(), notBefore, notAfter, serialNumber, authorityKeyIdentifier, signature))
618618
{
619619
DEBUG_INFO("ArduinoIoTCloudTCP::%s request started.", __FUNCTION__);
620+
#if defined(BOARD_HAS_OFFLOADED_ECCX08)
621+
if (SElementArduinoCloudCertificate::write(_selement, _cert, SElementArduinoCloudSlot::CompressedCertificate))
622+
{
623+
DEBUG_INFO("ArduinoIoTCloudTCP::%s update done.", __FUNCTION__);
624+
}
625+
#else
620626
_writeOnConnect = true;
627+
#endif
621628
return 1;
622629
}
623630
return 0;

0 commit comments

Comments
 (0)