1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-16 00:43:00 +03:00

Fix reverse dependency core Updater -> library ESP8266WiFi (#6398)

* Per @earlephilhower suggestion

* Hints from @earlephilhower

* Namespace BearSSL in core "feels" wrong - using catch-all esp8266 instead.

* After review remarks by @earlephilhower
This commit is contained in:
Dirk O. Kaar
2019-08-28 20:07:04 +02:00
committed by Earle F. Philhower, III
parent 05969c6bf2
commit e201f614e8
3 changed files with 24 additions and 8 deletions

View File

@ -1,5 +1,4 @@
#include "Updater.h"
#include "Arduino.h"
#include "eboot_command.h"
#include <esp8266_peri.h>
@ -11,10 +10,10 @@
#endif
#if ARDUINO_SIGNING
#include "../../libraries/ESP8266WiFi/src/BearSSLHelpers.h"
static BearSSL::PublicKey signPubKey(signing_pubkey);
static BearSSL::HashSHA256 hash;
static BearSSL::SigningVerifier sign(&signPubKey);
namespace esp8266 {
extern UpdaterHashClass& updaterSigningHash;
extern UpdaterVerifyClass& updaterSigningVerifier;
}
#endif
extern "C" {
@ -39,7 +38,7 @@ UpdaterClass::UpdaterClass()
, _progress_callback(nullptr)
{
#if ARDUINO_SIGNING
installSignature(&hash, &sign);
installSignature(&esp8266::updaterSigningHash, &esp8266::updaterSigningVerifier);
#endif
}