Skip to content

Commit 0f1b7ce

Browse files
committed
Per @earlephilhower suggestion
1 parent 6dd8474 commit 0f1b7ce

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

cores/esp8266/Updater.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "Updater.h"
2-
#include "Arduino.h"
32
#include "eboot_command.h"
43
#include <esp8266_peri.h>
54

@@ -11,10 +10,8 @@
1110
#endif
1211

1312
#if ARDUINO_SIGNING
14-
#include "../../libraries/ESP8266WiFi/src/BearSSLHelpers.h"
15-
static BearSSL::PublicKey signPubKey(signing_pubkey);
16-
static BearSSL::HashSHA256 hash;
17-
static BearSSL::SigningVerifier sign(&signPubKey);
13+
extern UpdaterHashClass& hash;
14+
extern UpdaterVerifyClass& sign;
1815
#endif
1916

2017
extern "C" {

libraries/ESP8266WiFi/src/BearSSLHelpers.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,4 +900,14 @@ make_stack_thunk(br_ssl_engine_sendrec_buf);
900900

901901
#endif
902902

903+
#if ARDUINO_SIGNING
904+
namespace {
905+
static PublicKey signPubKey(signing_pubkey);
906+
static HashSHA256 __hash;
907+
static SigningVerifier __sign(&signPubKey);
908+
}
909+
extern UpdaterHashClass& hash = __hash;
910+
extern UpdaterVerifyClass& sign = __sign;
911+
#endif
912+
903913
};

0 commit comments

Comments
 (0)