mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-15 19:22:45 +03:00
Prevent WDT reset while processing the certificates
This commit is contained in:
@@ -2108,6 +2108,8 @@ int process_certificate(SSL *ssl, X509_CTX **x509_ctx)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
|
||||||
|
ax_wdt_feed();
|
||||||
|
|
||||||
PARANOIA_CHECK(pkt_size, total_cert_len + offset);
|
PARANOIA_CHECK(pkt_size, total_cert_len + offset);
|
||||||
|
|
||||||
// record the start point for the second pass
|
// record the start point for the second pass
|
||||||
@@ -2138,7 +2140,7 @@ int process_certificate(SSL *ssl, X509_CTX **x509_ctx)
|
|||||||
offset++; /* skip empty char */
|
offset++; /* skip empty char */
|
||||||
cert_size = (buf[offset]<<8) + buf[offset+1];
|
cert_size = (buf[offset]<<8) + buf[offset+1];
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
ax_wdt_feed();
|
||||||
if (x509_new(&buf[offset], NULL, certs+num_certs))
|
if (x509_new(&buf[offset], NULL, certs+num_certs))
|
||||||
{
|
{
|
||||||
ret = SSL_ERROR_BAD_CERTIFICATE;
|
ret = SSL_ERROR_BAD_CERTIFICATE;
|
||||||
|
Reference in New Issue
Block a user