Skip to content

Commit 0154880

Browse files
committed
Add explicit device key generation
1 parent 6d64213 commit 0154880

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// ----------------------------------------------------------------------------
1818
#ifndef MBED_TEST_MODE
1919
#include "mbed.h"
20+
#include "DeviceKey.h"
2021
#include "kv_config.h"
2122
#include "mbed-cloud-client/MbedCloudClient.h" // Required for new MbedCloudClient()
2223
#include "factory_configurator_client.h" // Required for fcc_* functions and FCC_* defines
@@ -165,6 +166,10 @@ int main(void)
165166
return -1;
166167
}
167168

169+
// Initialize root of trust
170+
DeviceKey &devkey = DeviceKey::get_instance();
171+
devkey.generate_root_of_trust();
172+
168173
// Connect with NetworkInterface
169174
printf("Connect to network\n");
170175
network = NetworkInterface::get_default_instance();

0 commit comments

Comments
 (0)