OTA phase 2: the public OTA key meshcore-ota@tth-pub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b38eab008
commit
cf70a95da4
3 files changed
+18
-12
No files matched your search
+6
-5
@@ -27,12 +27,13 @@ admin_pw = password
|
||||
|
||||
; Admin-pushed OTA (src/helpers/FwUpdate, docs/ota-admin.md): the PUBLIC key
|
||||
; every OTA package signature is checked against, raw Ed25519 hex. Default: the
|
||||
; fleet signing key meshcore-fw@tth -- the one tth-fw-release already signs the
|
||||
; mast releases with (FW_SIGNING_KEY), so CI-built packages are accepted and
|
||||
; nothing else is. Bench builds signed with ~/.config/meshcore-ota/test.key
|
||||
; override it in platformio.local.ini: [ota] pubkey = <tools/ota_pack.py pubkey>.
|
||||
; public OTA key meshcore-ota@tth-pub, the one the -ota release images are
|
||||
; signed with (tools/ota_allowed_signers has it as an ssh key, for the release
|
||||
; checksums). Only images built with -D FW_OTA=1 use it. A self-built image
|
||||
; signed with your own key: [ota] pubkey = <tools/ota_pack.py pubkey --key ...>
|
||||
; in platformio.local.ini.
|
||||
[ota]
|
||||
pubkey = 038903068ffe275d855971d3b65495a136f98825d32193a6268711eef87fff90
|
||||
pubkey = 8777b6e1a8494113b70f41f5ed75bf3f2a8eba9635bab1dc3d20efd1a8398090
|
||||
|
||||
; CUSTOM (TeTeHacko): channels the ChannelFilter deny list applies to
|
||||
; (examples/simple_repeater/ChannelFilter.h). These keys are PUBLIC by
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Signer of the public -ota firmware images and their SHA256SUMS (ssh-keygen -Y
|
||||
# verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub -n meshcore-ota).
|
||||
# The same key, as raw Ed25519 hex, is [ota] pubkey in platformio.ini.
|
||||
meshcore-ota@tth-pub namespaces="meshcore-ota" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIId3tuGoSUETtw9B9e11vz8qjrqWNbqx3D0g79GoOYCQ
|
||||
+7
-7
@@ -26,9 +26,9 @@ that may become a base has to land there BEFORE it is flashed by other means
|
||||
(not in Arch repos: the home-scripts venv has it).
|
||||
|
||||
The private key never goes into the repo. Default: ~/.config/meshcore-ota/test.key
|
||||
(the bench key, PEM). CI signs with the fleet key FW_SIGNING_KEY (OpenSSH format,
|
||||
the one that signs the mast releases); its public half is the default
|
||||
[ota] pubkey in platformio.ini, so mast builds take only CI-signed packages.
|
||||
(the bench key, PEM). CI signs with the public OTA key meshcore-ota@tth-pub
|
||||
(secret OTA_SIGNING_KEY, OpenSSH format); its public half is the default
|
||||
[ota] pubkey in platformio.ini, so release images take only CI-signed packages.
|
||||
--elf packs a given ELF instead of .pio/build/<env>/firmware.elf.
|
||||
|
||||
Target and build epoch come from the ELF (the image's MCFW-TAGS string, also
|
||||
@@ -352,8 +352,8 @@ def gitea_token() -> str:
|
||||
return m.group(1)
|
||||
|
||||
|
||||
def fleet_pubkey() -> str | None:
|
||||
"""[ota] pubkey of the committed platformio.ini: the fleet key CI signs with.
|
||||
def release_pubkey() -> str | None:
|
||||
"""[ota] pubkey of the committed platformio.ini: the OTA key CI signs with.
|
||||
NOT platformio.local.ini -- that one carries the bench key."""
|
||||
import configparser
|
||||
|
||||
@@ -441,7 +441,7 @@ def cmd_fetch(args: argparse.Namespace) -> None:
|
||||
)
|
||||
name = hits[0]["file"]
|
||||
data = checked(name)
|
||||
pub = args.pubkey or fleet_pubkey()
|
||||
pub = args.pubkey or release_pubkey()
|
||||
if pub:
|
||||
Ed25519PublicKey.from_public_bytes(bytes.fromhex(pub)).verify(
|
||||
data[192:256], data[:192]
|
||||
@@ -490,7 +490,7 @@ def main() -> None:
|
||||
g.add_argument("--full", action="store_true", help="the full image package")
|
||||
p.add_argument("--out")
|
||||
p.add_argument(
|
||||
"--pubkey", help="default: the fleet key, [ota] pubkey of platformio.ini"
|
||||
"--pubkey", help="default: the release OTA key, [ota] pubkey of platformio.ini"
|
||||
)
|
||||
p.add_argument("--allowed-signers", default=str(SIGNERS))
|
||||
args = ap.parse_args()
|
||||
|
||||
Reference in new issue
Block a user