The review of P15 B3 found the relay could steer three things it must not. - A certificate is now checked against the public roots the program ships, for the app's wildcard, when it is issued and every time it is read from disk; a lifetime over 100 days is refused (no public authority issues one), and the renewal is planned no later than two thirds of the life or 60 days. A kept certificate that fails is ignored and ordered again. Only a test builds a CertTrust of its own roots. - The ACME client sends a request only to a directory on a host compiled into the app (Let's Encrypt production and staging, Google Trust Services, ZeroSSL, Buypass, SSL.com): the relay still picks which and in what order, but cannot name a new host. A kept account is used only if its directory is on the list too. http is a direct dependency now (it was a dev-dependency, and already in the tree): the host is read with the parser the ACME library uses. - The resolver refuses a certificate at its end, sleeps stop at it, and the state stops saying "Connected" when it has ended. - The certificate work waits for the line, so it is for the name the relay accepted (a first claim that finds the name taken picks another); web.rs starts the door only once the name is settled. - A line that held under 60 s does not reset the backoff; one that held is redialled after 0 to 30 s, so a relay restart is not met by every app in the same second. - What the relay and the authority say is shown as a short quoted detail with control and invisible characters removed, in the app's own words. - The kept address is read once, not from the key file every frame; the folder is synced after a private file is renamed into place. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
53 lines
2.0 KiB
TOML
53 lines
2.0 KiB
TOML
[package]
|
|
name = "ledger-link"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
description = "wanderbooks: the app's side of the relay (plan P15 B3): its own name and key, the one outbound line, its own TLS and certificate, and the renewals."
|
|
|
|
[dependencies]
|
|
# The relay crate's `proto`, `names`, `mux` and `client` modules are the
|
|
# app's side of the protocol too; one definition of the wire, never a copy.
|
|
relay = { path = "../relay" }
|
|
futures = "0.3"
|
|
# The certificate authority's protocol (RFC 8555) and ARI (RFC 9773). No
|
|
# default features: `ring` is the crypto the rest of the tree uses (the
|
|
# default, aws-lc-rs, needs a C toolchain at build time).
|
|
instant-acme = { version = "0.8", default-features = false, features = ["ring", "hyper-rustls", "time", "x509-parser"] }
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "sync", "net", "time"] }
|
|
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
|
|
tokio-util = "0.7"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
thiserror = "2"
|
|
base64 = "0.22"
|
|
ring = "0.17"
|
|
x509-parser = "0.18"
|
|
zeroize = "1"
|
|
http = "1"
|
|
webpki-root-certs = "1"
|
|
|
|
# Owner-only DACLs for the key and certificate files (the helper the token
|
|
# files use).
|
|
[target.'cfg(windows)'.dependencies]
|
|
ledger-store = { path = "../ledger-store" }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
rcgen = { version = "0.14", default-features = false, features = ["ring", "pem", "x509-parser"] }
|
|
hickory-proto = { version = "0.26", default-features = false, features = ["std"] }
|
|
tokio = { version = "1", features = ["test-util"] }
|
|
http-body-util = "0.1"
|
|
bytes = "1"
|
|
async-trait = "0.1"
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }
|
|
sha2 = "0.10"
|
|
time = "0.3"
|
|
tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] }
|
|
|
|
[lints]
|
|
workspace = true
|