@@ -9,7 +9,7 @@ const bool DEBUG = true;
9
9
const int keySlot = 0 ;
10
10
const int compressedCertSlot = 10 ;
11
11
const int serialNumberAndAuthorityKeyIdentifierSlot = 11 ;
12
- const int thingIdSlot = 12 ;
12
+ const int deviceIdSlot = 12 ;
13
13
14
14
void setup () {
15
15
Serial.begin (9600 );
@@ -56,8 +56,8 @@ void setup() {
56
56
while (1 );
57
57
}
58
58
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 );
61
61
62
62
String csr = ECCX08Cert.endCSR ();
63
63
@@ -79,18 +79,18 @@ void setup() {
79
79
String authorityKeyIdentifier = promptAndReadLine (" Please enter the certificates authority key identifier: " );
80
80
String signature = promptAndReadLine (" Please enter the certificates signature: " );
81
81
82
- byte thingIdBytes [72 ];
82
+ byte deviceIdBytes [72 ];
83
83
byte serialNumberBytes[16 ];
84
84
byte authorityKeyIdentifierBytes[20 ];
85
85
byte signatureBytes[64 ];
86
86
87
- thingId .getBytes (thingIdBytes , sizeof (thingIdBytes ));
87
+ deviceId .getBytes (deviceIdBytes , sizeof (deviceIdBytes ));
88
88
hexStringToBytes (serialNumber, serialNumberBytes, sizeof (serialNumberBytes));
89
89
hexStringToBytes (authorityKeyIdentifier, authorityKeyIdentifierBytes, sizeof (authorityKeyIdentifierBytes));
90
90
hexStringToBytes (signature, signatureBytes, sizeof (signatureBytes));
91
91
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!" );
94
94
while (1 );
95
95
}
96
96
0 commit comments