mirror of
https://github.com/esphome/esphome.git
synced 2026-09-14 16:48:40 +00:00
NoiseResponderHandshake::init() now hands the slot straight to noise-c and wipes it, so the api and ota call sites are unchanged, nothing copies the key pair and no transport has to remember the wipe. The slot compiles under USE_NOISE_SPARE_EPHEMERAL, which the api component enables as the refiller, instead of the noise component keying on an api define. The per tick check sits in loop() with the refill out of line, and the grace predicate lives next to the handshake timeout it mirrors.
16 lines
510 B
Python
16 lines
510 B
Python
import esphome.codegen as cg
|
|
from tests.testing_helpers import ComponentManifestOverride
|
|
|
|
|
|
def override_manifest(manifest: ComponentManifestOverride) -> None:
|
|
# to_code must run: it defines USE_NOISE and adds the noise-c library
|
|
# the component sources under test need.
|
|
manifest.enable_codegen()
|
|
real_to_code = manifest.to_code
|
|
|
|
async def to_code_testing(config):
|
|
await real_to_code(config)
|
|
cg.add_define("USE_NOISE_SPARE_EPHEMERAL")
|
|
|
|
manifest.to_code = to_code_testing
|