@@ -9,7 +9,7 @@ const bool DEBUG = true;
99const int keySlot = 0 ;
1010const int compressedCertSlot = 10 ;
1111const int serialNumberAndAuthorityKeyIdentifierSlot = 11 ;
12- const int thingIdSlot = 12 ;
12+ const int deviceIdSlot = 12 ;
1313
1414void 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