mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Allocate BSSL stack for SigningVerifier (#7291)
The BearSSL SigningVerifier was moved to the 2nd stack because some uses required much more stack than available on the normal stack. Add a reference to the second stack on object creation (which will allocate it, if there is no BSSL stack already allocated), and delete that reference on exit. Fixes #7288
This commit is contained in:
parent
157ce57996
commit
c5f60e31cd
@ -24,6 +24,7 @@
|
|||||||
#define _BEARSSLHELPERS_H
|
#define _BEARSSLHELPERS_H
|
||||||
|
|
||||||
#include <bearssl/bearssl.h>
|
#include <bearssl/bearssl.h>
|
||||||
|
#include <StackThunk.h>
|
||||||
#include <Updater.h>
|
#include <Updater.h>
|
||||||
|
|
||||||
// Internal opaque structures, not needed by user applications
|
// Internal opaque structures, not needed by user applications
|
||||||
@ -157,7 +158,8 @@ class SigningVerifier : public UpdaterVerifyClass {
|
|||||||
virtual bool verify(UpdaterHashClass *hash, const void *signature, uint32_t signatureLen) override;
|
virtual bool verify(UpdaterHashClass *hash, const void *signature, uint32_t signatureLen) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SigningVerifier(PublicKey *pubKey) { _pubKey = pubKey; }
|
SigningVerifier(PublicKey *pubKey) { _pubKey = pubKey; stack_thunk_add_ref(); }
|
||||||
|
~SigningVerifier() { stack_thunk_del_ref(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PublicKey *_pubKey;
|
PublicKey *_pubKey;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user