8000 Allocate BSSL stack for SigningVerifier by earlephilhower · Pull Request #7291 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Allocate BSSL stack for SigningVerifier #7291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allocate BSSL stack for SigningVerifier
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
  • Loading branch information
earlephilhower committed May 10, 2020
commit e3c7c0b482cb31e4bfa741a4446a1dcb64bdf717
4 changes: 3 additions & 1 deletion libraries/ESP8266WiFi/src/BearSSLHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define _BEARSSLHELPERS_H

#include <bearssl/bearssl.h>
#include <StackThunk.h>
#include <Updater.h>

// Internal opaque structures, not needed by user applications
Expand Down Expand Up @@ -157,7 +158,8 @@ class SigningVerifier : public UpdaterVerifyClass {
virtual bool verify(UpdaterHashClass *hash, const void *signature, uint32_t signatureLen) override;

public:
SigningVerifier(PublicKey *pubKey) { _pubKey = pubKey; }
SigningVerifier(PublicKey *pubKey) { _pubKey = pubKey; stack_thunk_add_ref(); }
~SigningVerifier() { stack_thunk_del_ref(); }

private:
PublicKey *_pubKey;
Expand Down
0