Repository navigation
libSceLibreSsl and libSceLibreSsl3 on a LibreSSL submodule #8981
Replies: 2 comments 1 reply
|
To make question 1 concrete, option (a) is now implemented on a branch, with step 1 of the plan on top: https://github.com/simonbronk/AnyPS5/tree/feat/libSceLibreSsl-libressl-primitives Vendoring (option a)
Step 1: 33 exports
If option (a) is acceptable, I will open it as the step 1 pull request. If you prefer (b) or something else, only AI-assisted: yes. |
|
Console data for the version and layout questions. Both libraries were loaded in a game process on a PS5 with firmware 13.40, measured 2026-10-21 with Gran Turismo 7 (PPSA01317) running. The method is ptrace remote calls from an elfldr payload:
Versions
So the two libraries are two LibreSSL releases, as the export names suggested. The older one being 2.5.4 pins the 2.x struct layouts titles can see. Context sizes in libSceLibreSsl (2.5.4). Each
Every size and offset matches LibreSSL 2.5.4's structs for x86-64: For the options in the post: titles that hold Not measured:
AI-assisted: yes (Claude Code) |
Uh oh!
There was an error while loading. Please reload this page.
Gap
libSceLibreSsl (399 exports) and libSceLibreSsl3 (87) are 0% implemented; every export throws through
NotImplemented_nid_no_patch. The exports are the plain OpenSSL/LibreSSL API (SHA256_Init,AES_cbc_encrypt,EVP_DigestInit_ex,SSL_read,X509_get_subject_name, ...), so the faithful implementation is LibreSSL itself built from source, the way libSceFreeType wraps the freetype submodule. No open pull request touches either library.Which LibreSSL
Inferred from the export lists (
docs/dev/debt/libSceLibreSsl*.mdsources), not from Sony documentation:EVP_MD_CTX_create,SSL_library_init,HMAC_CTX_init) andTLS_client_method, and none of the accessors LibreSSL 2.7 added (EVP_MD_CTX_new,RSA_get0_key,X509_get0_notAfter,SSL_CTX_set_min_proto_version): LibreSSL 2.3-2.6.*_up_ref: LibreSSL 2.7 or later.Consequence: titles linked against libSceLibreSsl were compiled against headers in which
EVP_MD_CTX,EVP_CIPHER_CTX,HMAC_CTX,BIO,X509and others are not opaque. They may allocate them by value and read fields. A current LibreSSL cannot back those exports directly; they need guest-layout objects (as libSceFreeType'sGuestObjects) or a 2.x build.Questions for maintainers
autogen.sh/update.shclone libressl/openbsd from the network and copy sources into the tree. Options:a. submodules
3rdparty/libressl-portableand3rdparty/libressl-openbsdpinned to matching commits, with a CMake step that performsupdate.sh's copy from the local submodule (no network, works on Windows without bash);b. a fork of libressl/portable with the prepared tree committed, used as a single submodule;
c. another approach you prefer.
--exclude-libs,ALLas libSceFreeType does).Plan once agreed
One pull request per step, each with tests in
core/libs/tests/:MD4_*,MD5_*,SHA1_*,SHA224_*,SHA256_*,SHA256,SHA384_*,SHA512_*,AES_*(8),RAND_bytes,RAND_status,RAND_add.ERR_*,BN_*,CRYPTO_memcmpand the libSceLibreSsl3 one-shot digests.SSL_CTX_*,SSL_*, BIO pairs; sockets through the existing libSceNet layer; guest callbacks (SSL_CTX_set_verify,SSL_CTX_set_client_cert_cb) through SysV thunks on Windows.sceLibreSslInit/InitEx/InitEx2/Term/GetMemoryPoolStatsand the memory pool semantics, once a title shows how they are used.Variadic exports (
ERR_add_error_data,BIO_printf) andRAND_load_file/RAND_file_name(path translation) are listed separately and stay throwing until a title needs them.AI-assisted: yes. I can start step 1 as soon as question 1 is settled.
All reactions