File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
examples/utility/Provisioning Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ void setup() {
2020 }
2121
2222 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+ }
2430
2531 if (!ECCX08.writeConfiguration (DEFAULT_ECCX08_TLS_CONFIG)) {
2632 Serial.println (" Writing ECCX08 configuration failed!" );
@@ -36,6 +42,14 @@ void setup() {
3642 Serial.println ();
3743 }
3844
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+
3953 if (!ECCX08Cert.beginCSR (keySlot, true )) {
4054 Serial.println (" Error starting CSR generation!" );
4155 while (1 );
You can’t perform that action at this time.
0 commit comments