mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +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:
committed by
Earle F. Philhower, III
parent
05969c6bf2
commit
e201f614e8
@ -20,6 +20,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "BearSSLHelpers.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <bearssl/bearssl.h>
|
||||
@ -28,7 +29,10 @@
|
||||
#include <string.h>
|
||||
#include <Arduino.h>
|
||||
#include <StackThunk.h>
|
||||
#include "BearSSLHelpers.h"
|
||||
#include <Updater_Signing.h>
|
||||
#ifndef ARDUINO_SIGNING
|
||||
#define ARDUINO_SIGNING 0
|
||||
#endif
|
||||
|
||||
namespace brssl {
|
||||
// Code here is pulled from brssl sources, with the copyright and license
|
||||
@ -901,3 +905,17 @@ make_stack_thunk(br_ssl_engine_sendrec_buf);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#if ARDUINO_SIGNING
|
||||
namespace {
|
||||
static BearSSL::PublicKey signingPubKey(signing_pubkey);
|
||||
static BearSSL::HashSHA256 __signingHash;
|
||||
static BearSSL::SigningVerifier __signingVerifier(&signingPubKey);
|
||||
};
|
||||
|
||||
namespace esp8266 {
|
||||
UpdaterHashClass& updaterSigningHash = __signingHash;
|
||||
UpdaterVerifyClass& updaterSigningVerifier = __signingVerifier;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <bearssl/bearssl.h>
|
||||
#include <Updater.h>
|
||||
|
||||
|
||||
// Internal opaque structures, not needed by user applications
|
||||
namespace brssl {
|
||||
class public_key;
|
||||
|
Reference in New Issue
Block a user