mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Add hooks to feed watchdog during lengthy bigint operations
This commit is contained in:
parent
69c757f2a3
commit
cd6c04a809
@ -217,6 +217,9 @@ int ax_get_file(const char *filename, uint8_t **buf) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ax_wdt_feed() {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Utility functions
|
* Utility functions
|
||||||
*/
|
*/
|
||||||
|
@ -1218,6 +1218,7 @@ bigint *bi_mont(BI_CTX *ctx, bigint *bixy)
|
|||||||
|
|
||||||
check(bixy);
|
check(bixy);
|
||||||
|
|
||||||
|
ax_wdt_feed();
|
||||||
if (ctx->use_classical) /* just use classical instead */
|
if (ctx->use_classical) /* just use classical instead */
|
||||||
{
|
{
|
||||||
return bi_mod(ctx, bixy);
|
return bi_mod(ctx, bixy);
|
||||||
@ -1274,6 +1275,7 @@ bigint *bi_barrett(BI_CTX *ctx, bigint *bi)
|
|||||||
check(bi);
|
check(bi);
|
||||||
check(bim);
|
check(bim);
|
||||||
|
|
||||||
|
ax_wdt_feed();
|
||||||
/* use Classical method instead - Barrett cannot help here */
|
/* use Classical method instead - Barrett cannot help here */
|
||||||
if (bi->size > k*2)
|
if (bi->size > k*2)
|
||||||
{
|
{
|
||||||
|
@ -81,6 +81,8 @@ extern "C" {
|
|||||||
#define hmac_sha1 ax_hmac_sha1
|
#define hmac_sha1 ax_hmac_sha1
|
||||||
#define hmac_md5 ax_hmac_md5
|
#define hmac_md5 ax_hmac_md5
|
||||||
|
|
||||||
|
void ax_wdt_feed();
|
||||||
|
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
|
|
||||||
/* Windows CE stuff */
|
/* Windows CE stuff */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user