Skip to content

Commit 9f79ff2

Browse files
Remove obsolete BSSL debug print routines
Fixes #5356
1 parent 5d57365 commit 9f79ff2

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

Diff for: libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

-64
Original file line numberDiff line numberDiff line change
@@ -1373,68 +1373,4 @@ bool WiFiClientSecure::loadPrivateKey(Stream& stream, size_t size) {
13731373
return ret;
13741374
}
13751375

1376-
1377-
1378-
1379-
// Debug printout helpers for BearSSL library when libbearssl.a is compiled in debug mode
1380-
// This is really only for debugging the core BearSSL library itself, and not the IDE
1381-
// SSL debugging which should focus on the WiFiClientBearSSL objects.
1382-
1383-
extern "C" {
1384-
1385-
#if CORE_MOCK
1386-
1387-
void br_esp8266_stack_proxy_init(uint8_t *space, uint16_t size) {
1388-
(void)space;
1389-
(void)size;
1390-
}
1391-
void _BearSSLCheckStack(const char *fcn, const char *file, int line) {
1392-
(void)fcn;
1393-
(void)file;
1394-
(void)line;
1395-
}
1396-
1397-
#else // !CORE_MOCK
1398-
1399-
extern size_t br_esp8266_stack_proxy_usage();
1400-
1401-
void _BearSSLCheckStack(const char *fcn, const char *file, int line) {
1402-
static int cnt = 0;
1403-
register uint32_t *sp asm("a1");
1404-
int freestack = 4 * (sp - g_pcont->stack);
1405-
int freeheap = ESP.getFreeHeap();
1406-
static int laststack, lastheap, laststack2;
1407-
if ((laststack != freestack) || (lastheap != freeheap) || (laststack2 != (int)br_esp8266_stack_proxy_usage())) {
1408-
Serial.printf("%s:%s(%d): FREESTACK=%d, STACK2USAGE=%zd, FREEHEAP=%d\n", file, fcn, line, freestack, br_esp8266_stack_proxy_usage(), freeheap);
1409-
if (freestack < 256) {
1410-
Serial.printf("!!! Out of main stack space\n");
1411-
}
1412-
if (freeheap < 1024) {
1413-
Serial.printf("!!! Out of heap space\n");
1414-
}
1415-
Serial.flush();
1416-
laststack = freestack;
1417-
lastheap = freeheap;
1418-
laststack2 = (int)br_esp8266_stack_proxy_usage();
1419-
}
1420-
// BearSSL debug can get very chatty, add yields to avoid WDT
1421-
if (cnt == 100) {
1422-
yield();
1423-
cnt++;
1424-
}
1425-
}
1426-
1427-
#endif // !CORE_MOCK
1428-
1429-
void _BearSSLSerialPrint(const char *str) {
1430-
static int cnt = 0;
1431-
Serial.printf("%s", str);
1432-
// BearSSL debug can get very chatty, add yields to avoid WDT
1433-
if (cnt == 100) {
1434-
yield();
1435-
cnt++;
1436-
}
1437-
}
1438-
};
1439-
14401376
};

0 commit comments

Comments
 (0)