File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -274,10 +274,6 @@ int BearSSLClient::connectSSL(const char* host)
274
274
// inject entropy in engine
275
275
unsigned char entropy[32 ];
276
276
277
- if (ECCX08.begin () && ECCX08.locked () && ECCX08.random (entropy, sizeof (entropy))) {
278
- ESP_LOGI (" BearSSLClient::connectSSL" , " init" );
279
- }
280
-
281
277
if (ECCX08.begin () && ECCX08.locked () && ECCX08.random (entropy, sizeof (entropy))) {
282
278
// ECC508 random success, add custom ECDSA vfry and EC sign
283
279
br_ssl_engine_set_ecdsa (&_sc.eng , eccX08_vrfy_asn1);
@@ -320,6 +316,7 @@ int BearSSLClient::connectSSL(const char* host)
320
316
} else if (state & BR_SSL_CLOSED) {
321
317
return 0 ;
322
318
}
319
+ delay (1 );
323
320
}
324
321
325
322
return 1 ;
Original file line number Diff line number Diff line change @@ -143,7 +143,12 @@ int ECCX08Class::random(byte data[], size_t length)
143
143
return 0 ;
144
144
}
145
145
146
+
147
+ #if defined (ESP_PLATFORM)
148
+ delay (50 );
149
+ #else
146
150
delay (23 );
151
+ #endif
147
152
148
153
byte response[32 ];
149
154
Original file line number Diff line number Diff line change @@ -152,11 +152,7 @@ void setupBluetooth() {
152
152
}
153
153
154
154
unsigned long getTime () {
155
- int ret = 0 ;
156
- do {
157
- ret = WiFi.getTime ();
158
- } while (ret == 0 );
159
- return ret;
155
+ return time (nullptr );
160
156
}
161
157
162
158
void setupWiFi () {
You can’t perform that action at this time.
0 commit comments