Repository navigation
feat(tls): version the trust bundle and check its freshness (D8) - #780
Merged
Merged
Conversation
A raw DER concatenation gives no way to tell a truncated bundle from a valid one, and no way to warn that the image's roots are years old. - `libtls::der::parse_bundle` reads a `NDTB` header (format version, build time, certificate count) and rejects a mismatch with the payload, so a hand-edited file cannot silently trust a subset. `bundle_freshness` classifies the build time against the trusted clock. - `libnet::http_transport::system_trust()` returns version/build time/anchors and still accepts an unversioned raw bundle; `trust_status()` applies the clock policy (`Missing`/`Ok`/`Future`/`Stale`). - `neocurl` warns on stderr (unless `-s`) when the bundle is future-dated or older than two years. It is a warning, not a failure: anchors are verified as usual and offline machines keep working. NeoDev (external, NeoDOS-Project/NeoDev#48) writes the header, honouring `SOURCE_DATE_EPOCH` for reproducible images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Segunda parte de D8: el bundle deja de ser una concatenación DER cruda.
Formato
libtls::der::parse_bundlevalida magic, versión y quecert_countcuadre con el contenido: un fichero truncado o editado a mano no puede confiar en un subconjunto en silencio (antes un DER cortado parecía un almacén más pequeño).bundle_freshnessclasifica la fecha de build contra el reloj fiable (M7).libnet::http_transport::{system_trust, trust_status}devuelven versión/fecha/anclas y aplican la política (Missing/Ok/Future/Stale); siguen aceptando un bundle crudo sin cabecera por compatibilidad.neocurlavisa por stderr (salvo-s) si el bundle está fechado en el futuro o tiene más de dos años. Es aviso, no fallo: las anclas se verifican igual y una máquina sin red sigue funcionando.NeoDev
NeoDOS-Project/NeoDev#50 escribe la cabecera, con
SOURCE_DATE_EPOCHpara imágenes reproducibles ycount_certificatestesteado.Verificación
libtls: 5 tests nuevos de bundle (parseo, rechazo de magic/versión/count, frescura).count_certificates(SEQUENCE con longitud corta y larga).neocurl https://…sin--cay sin aviso de frescura).