File tree 2 files changed +13
-24
lines changed
examples/utility/Provisioning
2 files changed +13
-24
lines changed Original file line number Diff line number Diff line change 5
5
#include < ArduinoBearSSL.h>
6
6
#include < ArduinoECCX08.h>
7
7
8
+ const bool DEBUG = true ;
8
9
const int keySlot = 0 ;
9
10
const int compressedCertSlot = 10 ;
10
11
const int serialNumberAndAuthorityKeyIdentifierSlot = 11 ;
@@ -127,22 +128,25 @@ void setup() {
127
128
while (1 );
128
129
}
129
130
130
- Serial.println (" Compressed cert = " );
131
+ if (DEBUG) {
132
+ Serial.println (" Compressed cert = " );
131
133
132
- const byte* certData = ECCX08Cert.bytes ();
133
- int certLength = ECCX08Cert.length ();
134
+ const byte* certData = ECCX08Cert.bytes ();
135
+ int certLength = ECCX08Cert.length ();
134
136
135
- for (int i = 0 ; i < certLength; i++) {
136
- byte b = certData[i];
137
+ for (int i = 0 ; i < certLength; i++) {
138
+ byte b = certData[i];
137
139
138
- if (b < 16 ) {
139
- Serial.print (' 0' );
140
+ if (b < 16 ) {
141
+ Serial.print (' 0' );
142
+ }
143
+ Serial.print (b, HEX);
140
144
}
141
- Serial.print (b, HEX );
145
+ Serial.println ( );
142
146
}
143
- Serial.println ();
144
147
}
145
148
149
+
146
150
void loop () {
147
151
}
148
152
Original file line number Diff line number Diff line change @@ -52,21 +52,6 @@ int ArduinoCloudClass::begin(Client& net)
52
52
return 0 ;
53
53
}
54
54
55
- Serial.println (" Compressed cert = " );
56
-
57
- const byte* certData = ECCX08Cert.bytes ();
58
- int certLength = ECCX08Cert.length ();
59
-
60
- for (int i = 0 ; i < certLength; i++) {
61
- byte b = certData[i];
62
-
63
- if (b < 16 ) {
64
- Serial.print (' 0' );
65
- }
66
- Serial.print (b, HEX);
67
- }
68
- Serial.println ();
69
-
70
55
if (_bearSslClient) {
71
56
delete _bearSslClient;
72
57
}
You can’t perform that action at this time.
0 commit comments