Repository navigation
feat(image): pack the CA trust bundle (NeoDOS D8) - #47
Merged
Merged
Conversation
The kernel ships a system trust store so HTTPS works without an explicit `--ca`. Build it from the host's PEM bundle: decode every `CERTIFICATE` block and concatenate the DER at `/NeoDOS/System/config/roots.der`. - Source: `/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem`, overridable with `NEODOS_TRUST_BUNDLE` (CI, tests, a pinned store). - The base64 decoder is local (no new dependency); unit-tested with and without padding. - With no source the bundle is omitted and the image warns: the client then fails closed instead of trusting anything. Matches NeoDOS D8 (`docs/design/libtls-https-design.md` §3.6).
alexis900
added a commit
to NeoDOS-Project/NeoDOS
that referenced
this pull request
Nov 17, 2026
* feat(tls): load the system trust store (D8) HTTPS needed an explicit `--ca FILE`: the image carried no roots, so every real connection was a fixture exercise. - `libtls::der::split_certificates` splits a concatenated DER bundle using the X.690 lengths (no PEM/base64 parser on the target), with tests. - `libnet::http_transport::system_roots()` reads `\NeoDOS\System\config\roots.der` through `ReadContent` and returns the anchors; a missing or unreadable bundle yields an empty list so TLS fails closed. - `neocurl` uses the system store when `--ca` is absent (`--ca` still overrides), and refuses to start when there are no anchors at all. - NeoDev (external, NeoDOS-Project/NeoDev#47) packs the bundle from the host's CA store; `NEODOS_TRUST_BUNDLE` overrides the source. Docs: D8 marked resolved in `libtls-https-design.md` (§3.6) and the userland guide; `CHANGELOG.md` gains an Unreleased section with this and the filesystem fixes from #750/#751/#754. * fix(usermode): raise the binary slot to 512 KiB and refuse oversized images `MAX_BIN_SIZE` capped a user binary at 192 KiB and the loader *silently truncated* anything larger, so the ELF parser failed far from the cause. When `neocurl.nxe` (crypto + TLS + trust store) crossed 192 KiB the shell reported "Comando o nombre de archivo incorrecto" and the binary simply never ran. - `MAX_BIN_SIZE` is now 512 KiB (slot 576 KiB → 56 slots in the 32 MB user window, still ample). - `create_process_from_ob_path` refuses a binary bigger than the cap with `NoMemory` and logs the size, instead of loading a truncated image. - The design note for large NXEs records the new limit. Refs #755
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.
El kernel pasa a llevar un almacén de confianza para que HTTPS funcione sin
--ca. Se construye desde el bundle PEM del host: se decodifica cada bloqueCERTIFICATEy se concatenan los DER en/NeoDOS/System/config/roots.der./etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem, sustituible conNEODOS_TRUST_BUNDLE(CI, tests, store fijado).Corresponde a NeoDOS D8 (
docs/design/libtls-https-design.md§3.6).