Repository navigation
feat(tls): load the system trust store (D8) - #775
Merged
Merged
Conversation
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.
…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.
HTTPS exigía
--ca FICHERO: la imagen no llevaba raíces, así que toda conexión real era un ejercicio de fixture.Trust store (D8)
libtls::der::split_certificatestrocea un bundle DER concatenado usando las longitudes X.690 (sin parser PEM/base64 en el target), con tests.libnet::http_transport::system_roots()lee\NeoDOS\System\config\roots.dervíaReadContent; si falta o no se puede leer devuelve vacío y TLS falla cerrado.neocurlusa el almacén del sistema cuando no hay--ca(--casigue teniendo prioridad) y se niega a conectar si no hay anclas.NEODOS_TRUST_BUNDLEcambia el origen. En la imagen:roots.der128 520 B.Prerrequisito encontrado al verificar
MAX_BIN_SIZEera 192 KiB y el loader truncaba en silencio los binarios mayores: al crecerneocurl.nxepor encima, el shell decía «Comando o nombre de archivo incorrecto» y no arrancaba. Ahora el slot es de 512 KiB (576 KiB por proceso, 56 slots) y un binario que no cabe se rechaza conNoMemoryy un log con el tamaño, en vez de cargar una imagen truncada.Verificación en huésped (sin
--ca)Suite de kernel: 1000/1000 PASS.