libkernel: the console CA file /<sandbox word>/common/cert/CA_LIST.cer is not provided, so bundled OpenSSL fails every HTTPS request once #4796 lands (ProsperoRadio, SwanStation, PSXS5, ProsperoTV) #5001
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-13T07:47:06Z.
Once #4796 (SO_ERROR) and #4525 (POLLPRI) are in, HTTPS from inside the guest gets past the TCP connect, and the next stop for every title that bundles its own OpenSSL is the console's CA file. ProsperoRadio (PPSA99001, bundled libcurl 8.18.0 + OpenSSL 3.5.2), Windows 11 Pro 26220,
mainc2565f01+ #4796 + #4525:The path is
/<sceKernelGetFsSandboxRandomWord()>/common/cert/CA_LIST.cer, whichdocs/dev/debt/libkernel.mdalready records as "nothing is mounted under the name". Placing a PEM bundle (Git'sca-bundle.crt) at that path in the run directory, as a test only, makes the whole chain work: ProsperoRadio downloads its catalog (11838693 bytes in 845 ms,accepted=9556, six pages) and SwanStation (PPSA98510) goes fromgamedb.yaml -> curl 7, http 0togamedb: index written. PSXS5 (PPSA97510) and ProsperoTV (PPSA99003) use the same import set and are expected to follow.Open design question for the maintainers before anyone implements it: expose the host's trust store at that path (Windows: export the ROOT store to PEM at startup; Linux: the distro bundle such as
/etc/ssl/certs/ca-certificates.crt), or ship a bundle. Only that a PEM file works with OpenSSL here is proven; the console's file format is not. A generic mapping of the sandbox-word prefix plus a host-provided PEM would be the smallest change; I can prepare a branch if the direction is agreed.Traced with Claude Code assistance (the full
socket/connect/poll/getsockopttrace is in my comment on #4796).Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-13T09:38:55Z.
Fix branch ready:
screamm:feat/libkernel-sandbox-ca-list(dc51db5b, one commit onmain2a2a3dc6). Anyone eligible is welcome to carry it, keeping the commit as is; I can also open it as a PR myself now if the maintainers prefer that route.General.cpp), so it gainsAddPathProvider_nid_no_patch(guestPath, provider): one exact normalized path (case-insensitive), consulted only when that path is opened; if the provider yields nothing the path resolves under the guest root as before and staysENOENT. Every other path under the sandbox word is unchanged.libkernel/File/src/SandboxCertificates.cppregisters a provider for/<sceKernelGetFsSandboxRandomWord()>/common/cert/CA_LIST.cer. On first open it builds the PEM bundle once per process: Windows exports the user'sROOTandCAstores (CertOpenSystemStoreW,CertEnumCertificatesInStore,CryptBinaryToStringW(CRYPT_STRING_BASE64HEADER); linkscrypt32), Linux usesSSL_CERT_FILEor the first of/etc/ssl/certs/ca-certificates.crt,/etc/pki/tls/certs/ca-bundle.crt,/etc/ssl/ca-bundle.pem; the result is written read-only to<run>/cert_cache/CA_LIST.cervia temp file and rename, rewritten only when the content changes, and never an empty file (no certificate block meansENOENT; a store or write failure throws). Recorded indocs/dev/debt/libkernel.md: the console's file format (only that OpenSSL accepts PEM is shown), the rest of thecommon/certlisting, the directory itself and the write-open error are unverified; Windows fetches some roots on demand so the local store can lack them.guest_sandbox_certificates: reads the file throughsceKernelOpen/sceKernelReadandfopen/fread, requires a BEGIN/END CERTIFICATE pair, checks the./and lower-case variants,sceKernelStatsize, the read-only cache file, andENOENTfor sibling names; on Linux it pointsSSL_CERT_FILEat its own bundle and compares exactly. The Windows export here gives 119 certificates, all parsed by openssl.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs: the new test plusguest_fiopen,guest_realpath,guest_path_case,guest_directory,guest_filesystem,guest_posix_filesystem,guest_shm_open3/3 (the implementer ran 22 filesystem tests 3/3);ctest -j8 -E "^agc_driver_|^video_out_flip"688/690, the failures beingpatched_libraries(broken onmainby #4877, fix #5025) and a load timeout ofguest_raise_exception; conventions andgit diff --checkpass. Titles, with #4796 + #4525 + #5025 applied on top and no CA file placed by hand: ProsperoRadio downloads its whole catalog (11846160 bytes in 1458 ms, seven pages,total=59371) and is still rendering at 60 s; SwanStation logsupdate: latest 1.2.5, this 1.1.3, available,gamedb: index written,update: installed 1.2.5 (249 files), its self-updater now really downloading. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-13T09:46:50Z.
Linux run of
screamm:feat/libkernel-sandbox-ca-list(dc51db5b4, onmain2a2a3dc6), since the branch hasn't been run on Linux yet. Ubuntu 24.04, GCC 13.3 (CI's compiler), Release with CI's configure flags:guest_sandbox_certificatespasses 20/20, and all 335guest_*tests pass in two runs.SSL_CERT_FILEto its own bundle. With that line removed, the file served at/gkbHtXc3Wq/common/cert/CA_LIST.ceris byte for byte/etc/ssl/certs/ca-certificates.crt: 183320 bytes, 122 certificates, all parsed byopenssl pkcs7 -print_certs..tmpfile left behind.I haven't run a title on Linux, and the design question above is still the maintainers' to answer.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by santhoshkumar-dev on 2026-10-13T16:24:56Z.
Opened #5280, originally carrying @screamm's
dc51db5b4unchanged and adding a separate follow-up commit for Windows distrust/TLS-usage filtering and supplied-file/alias/blocked-mount precedence.Local validation on e8f179733: full Windows build and 125 patched libraries, sandbox/path tests on Windows and Ubuntu/WSL2, in-memory certificate-store tests, and negative controls that fail when the corresponding fixes are removed. That validation used the original commit before rebasing. Main
0214069e3was subsequently merged in 8fd97c296, retaining both Crypt32 and the new hardware-service dependencies; Windows/Linux sandbox/path tests and conventions pass after that merge.I also reran the public homebrew packages on a separate validation branch with #4796 + #4525 (excluded from the PR; #5025 is on the base), without placing a CA file manually:
Both used the automatically generated 66-certificate Windows bundle. The host-trust design remains for maintainers to review. AI-assisted: yes.
Update 2026-10-14: per the maintainer request on #5280, rebased onto main
31bfc4e86(head 5f1b1fe01), retaining the original author/coauthor attribution in two feature commits with no merge commits. Four Windows and three Ubuntu/WSL2 sandbox/path tests pass in a fresh checkout, along with conventions. The revision-specific results above describe the earlier validation; the host-trust design still awaits the decision in this issue.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-17T08:14:33Z.
Closing: #5280 merged into
mainasdfdc3dec4(2026-10-17) and carries the host-trust-store CA list this issue asked for (commit9f4a8d6ecis included in that PR). TheCA_LIST.cerpath is now served from the host roots on Windows, Linux and macOS, so the bundled OpenSSL no longer fails HTTPS on the titles listed above. Follow-ups, if any, belong on new issues with the title ID and the verbatim stop line on currentmain.