Skip to content

Commit 4726452

Browse files
Alberto Iannacconeaentinger
authored andcommitted
change thing id to device id
1 parent c8da6e7 commit 4726452

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/utility/Provisioning/Provisioning.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const bool DEBUG = true;
99
const int keySlot = 0;
1010
const int compressedCertSlot = 10;
1111
const int serialNumberAndAuthorityKeyIdentifierSlot = 11;
12-
const int thingIdSlot = 12;
12+
const int deviceIdSlot = 12;
1313

1414
void setup() {
1515
Serial.begin(9600);
@@ -56,8 +56,8 @@ void setup() {
5656
while (1);
5757
}
5858

59-
String thingId = promptAndReadLine("Please enter the thing id: ");
60-
ECCX08Cert.setSubjectCommonName(thingId);
59+
String deviceId = promptAndReadLine("Please enter the device id: ");
60+
ECCX08Cert.setSubjectCommonName(deviceId);
6161

6262
String csr = ECCX08Cert.endCSR();
6363

@@ -79,18 +79,18 @@ void setup() {
7979
String authorityKeyIdentifier = promptAndReadLine("Please enter the certificates authority key identifier: ");
8080
String signature = promptAndReadLine("Please enter the certificates signature: ");
8181

82-
byte thingIdBytes[72];
82+
byte deviceIdBytes[72];
8383
byte serialNumberBytes[16];
8484
byte authorityKeyIdentifierBytes[20];
8585
byte signatureBytes[64];
8686

87-
thingId.getBytes(thingIdBytes, sizeof(thingIdBytes));
87+
deviceId.getBytes(deviceIdBytes, sizeof(deviceIdBytes));
8888
hexStringToBytes(serialNumber, serialNumberBytes, sizeof(serialNumberBytes));
8989
hexStringToBytes(authorityKeyIdentifier, authorityKeyIdentifierBytes, sizeof(authorityKeyIdentifierBytes));
9090
hexStringToBytes(signature, signatureBytes, sizeof(signatureBytes));
9191

92-
if (!ECCX08.writeSlot(thingIdSlot, thingIdBytes, sizeof(thingIdBytes))) {
93-
Serial.println("Error storing thing id!");
92+
if (!ECCX08.writeSlot(deviceIdSlot, deviceIdBytes, sizeof(deviceIdBytes))) {
93+
Serial.println("Error storing device id!");
9494
while (1);
9595
}
9696

0 commit comments

Comments
 (0)