File tree 1 file changed +15
-1
lines changed
examples/utility/Provisioning
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ void setup() {
20
20
}
21
21
22
22
if (!ECCX08.locked ()) {
23
- Serial.println (" ECCX08 is unlocked, locking ..." );
23
+ String lockConfirm = promptAndReadLine (" Your ECCX08 is unlocked, would you like to lock it (y/N): " );
24
+ lockConfirm.toLowerCase ();
25
+
26
+ if (lockConfirm != " y" ) {
27
+ Serial.println (" That's all folks" );
28
+ while (1 );
29
+ }
24
30
25
31
if (!ECCX08.writeConfiguration (DEFAULT_ECCX08_TLS_CONFIG)) {
26
32
Serial.println (" Writing ECCX08 configuration failed!" );
@@ -36,6 +42,14 @@ void setup() {
36
42
Serial.println ();
37
43
}
38
44
45
+ String csrConfirm = promptAndReadLine (" Would you like to generate a new private key and CSR (y/N): " );
46
+ csrConfirm.toLowerCase ();
47
+
48
+ if (csrConfirm != " y" ) {
49
+ Serial.println (" That's all folks" );
50
+ while (1 );
51
+ }
52
+
39
53
if (!ECCX08Cert.beginCSR (keySlot, true )) {
40
54
Serial.println (" Error starting CSR generation!" );
41
55
while (1 );
You can’t perform that action at this time.
0 commit comments