diff --git a/core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp b/core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp index ee5937deb669..228c6eb34669 100644 --- a/core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp +++ b/core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp @@ -88,10 +88,6 @@ int APS5_VABI X509_EXTENSION_free_nid_postfix() { NotImplemented_nid_no_patch(__func__); } -int APS5_VABI X509_STORE_CTX_get0_param_nid_postfix() { - NotImplemented_nid_no_patch(__func__); -} - int APS5_VABI X509_STORE_load_locations_nid_postfix() { NotImplemented_nid_no_patch(__func__); } diff --git a/core/libs/prx/libSceLibreSsl3/CMakeLists.txt b/core/libs/prx/libSceLibreSsl3/CMakeLists.txt index 2fcc65cd21cc..8fd4b1f02b0e 100644 --- a/core/libs/prx/libSceLibreSsl3/CMakeLists.txt +++ b/core/libs/prx/libSceLibreSsl3/CMakeLists.txt @@ -23,6 +23,7 @@ target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/X509Algor target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/BioFields.cpp) target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/BioMethod.cpp) target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/TimeNew.cpp) +target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/X509StoreContext.cpp) if(WIN32) target_sources(libSceLibreSsl3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ParentExports.cpp) endif() @@ -237,6 +238,16 @@ if(BUILD_TESTING) set_tests_properties(guest_libressl3_hmac_context PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$") endif() + add_test_executable(guest_libressl3_x509_store_context_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/X509StoreContext.cpp) + target_include_directories(guest_libressl3_x509_store_context_tests PRIVATE ${LIBS_INCLUDE_DIR}) + target_link_libraries(guest_libressl3_x509_store_context_tests PRIVATE libSceLibreSsl3 libSceLibreSsl libc) + configure_windows_unwind(guest_libressl3_x509_store_context_tests) + add_test(NAME guest_libressl3_x509_store_context COMMAND guest_libressl3_x509_store_context_tests) + set_tests_properties(guest_libressl3_x509_store_context PROPERTIES TIMEOUT 30) + if(WIN32) + set_tests_properties(guest_libressl3_x509_store_context PROPERTIES ENVIRONMENT_MODIFICATION + "PATH=path_list_prepend:$") + endif() add_test_executable(guest_libressl3_cipher_tests ${CMAKE_CURRENT_SOURCE_DIR}/tests/Cipher.cpp) target_include_directories(guest_libressl3_cipher_tests PRIVATE ${LIBS_INCLUDE_DIR}) target_link_libraries(guest_libressl3_cipher_tests PRIVATE libSceLibreSsl3) diff --git a/core/libs/prx/libSceLibreSsl3/Export.cpp b/core/libs/prx/libSceLibreSsl3/Export.cpp index 61faf5701e35..b1e2b35734c1 100644 --- a/core/libs/prx/libSceLibreSsl3/Export.cpp +++ b/core/libs/prx/libSceLibreSsl3/Export.cpp @@ -201,26 +201,11 @@ int APS5_VABI SSL_CTX_clear_chain_certs_nid_postfix(void) { return 0; } -int APS5_VABI X509_STORE_CTX_free_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - int APS5_VABI X509_STORE_CTX_init_nid_postfix(void) { NotImplemented_nid_no_patch(__func__); return 0; } -int APS5_VABI X509_STORE_CTX_new_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - -int APS5_VABI X509_STORE_up_ref_nid_postfix(void) { - NotImplemented_nid_no_patch(__func__); - return 0; -} - int APS5_VABI d2i_ECParameters_nid_postfix(void) { NotImplemented_nid_no_patch(__func__); return 0; diff --git a/core/libs/prx/libSceLibreSsl3/include/Api.hpp b/core/libs/prx/libSceLibreSsl3/include/Api.hpp index 2a34fb5f5c60..3f25494fe1c4 100644 --- a/core/libs/prx/libSceLibreSsl3/include/Api.hpp +++ b/core/libs/prx/libSceLibreSsl3/include/Api.hpp @@ -244,10 +244,10 @@ int APS5_VABI SSL_SESSION_up_ref_nid_postfix(LibreSsl3SslSession* session); std::size_t APS5_VABI SSL_get_client_random_nid_postfix(const LibreSsl3Ssl* ssl, unsigned char* out, std::size_t maxOut); int APS5_VABI SSL_up_ref_nid_postfix(LibreSsl3Ssl* ssl); int APS5_VABI X509_PUBKEY_get0_param_nid_postfix(void** publicKeyAlgorithm, const unsigned char** publicKey, int* publicKeyLength, void** algorithm, const void* pub); -int APS5_VABI X509_STORE_CTX_free_nid_postfix(void); +void APS5_VABI X509_STORE_CTX_free_nid_postfix(LibreSslX509StoreContext* context); int APS5_VABI X509_STORE_CTX_init_nid_postfix(void); -int APS5_VABI X509_STORE_CTX_new_nid_postfix(void); -int APS5_VABI X509_STORE_up_ref_nid_postfix(void); +LibreSslX509StoreContext* APS5_VABI X509_STORE_CTX_new_nid_postfix(void); +int APS5_VABI X509_STORE_up_ref_nid_postfix(LibreSslX509Store* store); const LibreSsl3Stack* APS5_VABI X509_get0_extensions_nid_postfix(const LibreSsl3ExtensionsX509* certificate); const void* APS5_VABI X509_get0_notAfter_nid_postfix(const LibreSsl3ValidityX509* certificate); const void* APS5_VABI X509_get0_notBefore_nid_postfix(const LibreSsl3ValidityX509* certificate); @@ -307,7 +307,7 @@ int APS5_VABI SSL_set_info_callback_nid_postfix(); int APS5_VABI TLS_method_nid_postfix(); int APS5_VABI TLS_server_method_nid_postfix(); int APS5_VABI X509_EXTENSION_free_nid_postfix(); -int APS5_VABI X509_STORE_CTX_get0_param_nid_postfix(); +void* APS5_VABI X509_STORE_CTX_get0_param_nid_postfix(LibreSslX509StoreContext* context); int APS5_VABI X509_STORE_load_locations_nid_postfix(); int APS5_VABI X509_VERIFY_PARAM_set_flags_nid_postfix(LibreSslX509VerifyParam* param, std::uint64_t flags); int APS5_VABI X509_get0_pubkey_nid_postfix(); diff --git a/core/libs/prx/libSceLibreSsl3/src/X509StoreContext.cpp b/core/libs/prx/libSceLibreSsl3/src/X509StoreContext.cpp new file mode 100644 index 000000000000..d1d1e1d4f04c --- /dev/null +++ b/core/libs/prx/libSceLibreSsl3/src/X509StoreContext.cpp @@ -0,0 +1,48 @@ +#include "prx/libSceLibreSsl3/libSceLibreSsl3.hpp" +#include "prx/libc/include/Api.hpp" +#include "prx/libc/include/General.hpp" + +#include +#include +#include +#include +#include + +namespace { + +constexpr std::size_t CleanupCallback = 11; + +} + +extern "C" { + +LibreSslX509StoreContext* APS5_VABI X509_STORE_CTX_new_nid_postfix(void) { + return static_cast(calloc_nid_postfix(1, sizeof(LibreSslX509StoreContext))); +} + +void APS5_VABI X509_STORE_CTX_free_nid_postfix(LibreSslX509StoreContext* context) { + if (!context) return; + if (context->callbacks[CleanupCallback]) NotImplemented_nid_no_patch("X509_STORE_CTX_free: cleanup callback"); + if (context->param && !context->parent) NotImplemented_nid_no_patch("X509_STORE_CTX_free: owned verify parameters"); + if (context->tree) NotImplemented_nid_no_patch("X509_STORE_CTX_free: policy tree"); + if (context->chain) NotImplemented_nid_no_patch("X509_STORE_CTX_free: certificate chain"); + if (context->exData) NotImplemented_nid_no_patch("X509_STORE_CTX_free: extra data"); + free_nid_postfix(context); +} + +void* APS5_VABI X509_STORE_CTX_get0_param_nid_postfix(LibreSslX509StoreContext* context) { + if (!context) throw std::invalid_argument("X509_STORE_CTX_get0_param: null context"); + return context->param; +} + +int APS5_VABI X509_STORE_up_ref_nid_postfix(LibreSslX509Store* store) { + if (!store) throw std::invalid_argument("X509_STORE_up_ref: null store"); + std::atomic_ref count(store->references); + auto previous = count.load(); + for (;;) { + if (previous == std::numeric_limits::max()) throw std::overflow_error("X509_STORE_up_ref: reference count overflow"); + if (count.compare_exchange_weak(previous, previous + 1)) return previous > 0; + } +} + +} diff --git a/core/libs/prx/libSceLibreSsl3/tests/X509StoreContext.cpp b/core/libs/prx/libSceLibreSsl3/tests/X509StoreContext.cpp new file mode 100644 index 000000000000..f57a293b1076 --- /dev/null +++ b/core/libs/prx/libSceLibreSsl3/tests/X509StoreContext.cpp @@ -0,0 +1,194 @@ +#include "prx/libSceLibreSsl3/libSceLibreSsl3.hpp" +#include "prx/libc/include/ApplicationHeap.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static_assert(sizeof(LibreSslX509StoreContext) == 240); +static_assert(offsetof(LibreSslX509StoreContext, param) == 40); +static_assert(offsetof(LibreSslX509StoreContext, callbacks) == 56); +static_assert(offsetof(LibreSslX509StoreContext, chain) == 160); +static_assert(offsetof(LibreSslX509StoreContext, tree) == 168); +static_assert(offsetof(LibreSslX509StoreContext, parent) == 224); +static_assert(offsetof(LibreSslX509StoreContext, exData) == 232); +static_assert(offsetof(LibreSslX509Store, references) == 128); +static_assert(std::atomic_ref::required_alignment <= alignof(std::int32_t)); + +namespace { + +void Require(bool condition, std::source_location location = std::source_location::current()) { + if (condition) return; + std::fprintf(stderr, "LibreSSL3 X509_STORE_CTX check failed at line %u\n", location.line()); + std::abort(); +} + +template +bool Throws(Function function) { + try { + function(); + } catch (const std::exception&) { + return true; + } + return false; +} + +std::unordered_map allocations; + +void* APS5_VABI Allocate_nid_no_patch(std::size_t size) { + void* result = std::malloc(size); + Require(result != nullptr); + std::memset(result, 0xA5, size); + allocations.emplace(result, size); + return result; +} + +void* APS5_VABI Calloc_nid_no_patch(std::size_t count, std::size_t size) { + void* result = std::calloc(count, size); + Require(result != nullptr); + allocations.emplace(result, count * size); + return result; +} + +void APS5_VABI Free_nid_no_patch(void* pointer) { + if (!pointer) return; + Require(allocations.erase(pointer) == 1); + std::free(pointer); +} + +void* APS5_VABI Reallocate_nid_no_patch(void* pointer, std::size_t size) { + if (pointer) Require(allocations.erase(pointer) == 1); + void* result = std::realloc(pointer, size); + Require(result != nullptr); + allocations.emplace(result, size); + return result; +} + +void* APS5_VABI UnexpectedAlign_nid_no_patch(std::size_t, std::size_t) { throw std::runtime_error("unexpected aligned allocation"); } +void* APS5_VABI UnexpectedRealign_nid_no_patch(void*, std::size_t, std::size_t) { throw std::runtime_error("unexpected aligned reallocation"); } +int APS5_VABI UnexpectedPosixAlign_nid_no_patch(void**, std::size_t, std::size_t) { throw std::runtime_error("unexpected posix_memalign"); } + +int Marker = 0; + +void TestNewAndFree() { + auto* context = X509_STORE_CTX_new_nid_postfix(); + Require(context != nullptr); + std::array zero{}; + Require(std::memcmp(context, zero.data(), zero.size()) == 0); + X509_STORE_CTX_free_nid_postfix(context); + X509_STORE_CTX_free_nid_postfix(nullptr); +} + +void TestFreeBorrowedParam() { + auto* context = X509_STORE_CTX_new_nid_postfix(); + Require(context != nullptr); + context->parent = context; + context->param = &Marker; + X509_STORE_CTX_free_nid_postfix(context); +} + +template +void CheckFreeThrows(Setter set) { + auto* context = X509_STORE_CTX_new_nid_postfix(); + Require(context != nullptr); + set(*context); + LibreSslX509StoreContext before; + std::memcpy(&before, context, sizeof(before)); + Require(Throws([&] { X509_STORE_CTX_free_nid_postfix(context); })); + Require(std::memcmp(&before, context, sizeof(before)) == 0); + std::memset(context, 0, sizeof(*context)); + X509_STORE_CTX_free_nid_postfix(context); +} + +void TestFreeUnsupported() { + CheckFreeThrows([](LibreSslX509StoreContext& context) { context.param = &Marker; }); + CheckFreeThrows([](LibreSslX509StoreContext& context) { context.callbacks[11] = &Marker; }); + CheckFreeThrows([](LibreSslX509StoreContext& context) { context.chain = &Marker; }); + CheckFreeThrows([](LibreSslX509StoreContext& context) { context.tree = &Marker; }); + CheckFreeThrows([](LibreSslX509StoreContext& context) { context.exData = &Marker; }); +} + +void TestGetParam() { + auto* context = X509_STORE_CTX_new_nid_postfix(); + Require(context != nullptr); + Require(X509_STORE_CTX_get0_param_nid_postfix(context) == nullptr); + context->parent = context; + context->param = &Marker; + Require(X509_STORE_CTX_get0_param_nid_postfix(context) == &Marker); + X509_STORE_CTX_free_nid_postfix(context); + Require(Throws([] { X509_STORE_CTX_get0_param_nid_postfix(nullptr); })); +} + +void TestUpRef() { + auto* store = X509_STORE_new_nid_postfix(); + Require(store != nullptr); + Require(store->references == 1); + Require(X509_STORE_up_ref_nid_postfix(store) == 1); + Require(store->references == 2); + Require(X509_STORE_up_ref_nid_postfix(store) == 1); + Require(store->references == 3); + X509_STORE_free_nid_postfix(store); + X509_STORE_free_nid_postfix(store); + Require(store->references == 1); + X509_STORE_free_nid_postfix(store); + + LibreSslX509Store owned{}; + owned.references = 0; + Require(X509_STORE_up_ref_nid_postfix(&owned) == 0); + Require(owned.references == 1); + owned.references = -5; + Require(X509_STORE_up_ref_nid_postfix(&owned) == 0); + Require(owned.references == -4); + owned.references = std::numeric_limits::max(); + Require(Throws([&] { X509_STORE_up_ref_nid_postfix(&owned); })); + Require(owned.references == std::numeric_limits::max()); + Require(Throws([] { X509_STORE_up_ref_nid_postfix(nullptr); })); +} + +void TestUpRefRace() { + constexpr int Threads = 8; + constexpr int Increments = 20000; + LibreSslX509Store shared{}; + shared.references = 1; + std::atomic go{false}; + std::vector workers; + for (int index = 0; index < Threads; ++index) { + workers.emplace_back([&] { + while (!go.load()) std::this_thread::yield(); + for (int count = 0; count < Increments; ++count) X509_STORE_up_ref_nid_postfix(&shared); + }); + } + go.store(true); + for (auto& worker : workers) worker.join(); + Require(shared.references == 1 + Threads * Increments); +} + +} + +int main() { + std::array api{ + reinterpret_cast(Allocate_nid_no_patch), reinterpret_cast(Free_nid_no_patch), reinterpret_cast(Calloc_nid_no_patch), + reinterpret_cast(Reallocate_nid_no_patch), reinterpret_cast(UnexpectedAlign_nid_no_patch), reinterpret_cast(UnexpectedRealign_nid_no_patch), + reinterpret_cast(UnexpectedPosixAlign_nid_no_patch)}; + ApplicationHeapRegister_nid_no_patch(api.data()); + TestNewAndFree(); + Require(allocations.empty()); + TestFreeBorrowedParam(); + TestFreeUnsupported(); + TestGetParam(); + TestUpRef(); + TestUpRefRace(); + Require(allocations.empty()); + std::puts("libSceLibreSsl3 X509_STORE_CTX tests passed"); + return 0; +} diff --git a/docs/dev/debt/libSceLibreSsl3.md b/docs/dev/debt/libSceLibreSsl3.md index 629184edb39c..1ca4f1723069 100644 --- a/docs/dev/debt/libSceLibreSsl3.md +++ b/docs/dev/debt/libSceLibreSsl3.md @@ -16,7 +16,7 @@ - [EVP_PKEY_new, EVP_PKEY_free, EVP_PKEY_set1_RSA, EVP_PKEY_copy_parameters](../../../core/libs/prx/libSceLibreSsl3/src/PkeyLifecycle.cpp) - not checked on a console. Native allocation and release follow the 32-byte [LibreSSL 4.0.0 layout and p_lib.c](https://github.com/libressl/openbsd/tree/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp). Allocation failure returns null without its allocation error. Final release of a nonnull method or payload throws and restores the reference instead of calling the method; no native payload destruction is implemented. Empty objects are cleared before release. set1_RSA and copy_parameters throw locally instead of forwarding to the incompatible 56-byte legacy layout. The native RSA producers and get1_RSA remain local throwing stubs. Objects from the two modules must not be mixed. - [Native PKEY forwarding gaps](../../../core/libs/prx/libSceLibreSsl3/ParentExports.cpp) - `X509_get_pubkey` and `PEM_read_bio_PrivateKey` still forward to legacy throwing stubs. `SSL_get_privatekey` forwards to the parent library and returns its legacy PKEY. The consumers `EVP_PKEY_get1_EC_KEY`, `EVP_DigestVerifyInit`, `SSL_CTX_use_PrivateKey`, `SSL_CTX_use_PrivateKey_ASN1`, `SSL_CTX_use_PrivateKey_file` and `SSL_use_PrivateKey_ASN1` do too. Each needs a native wrapper before its legacy implementation can run, to prevent mixing the incompatible PKEY layouts. -- [libSceLibreSsl3 pending exports](../../../core/libs/prx/libSceLibreSsl3/Export.cpp) - 45 named callable exports, excluding `ASN1_OBJECT_free`, `CRYPTO_memcmp`, `MD5`, `SHA1`, `d2i_ASN1_INTEGER`, `EVP_PKEY_up_ref`, `EC_KEY_up_ref`, `RSA_up_ref`, `SSL_CTX_up_ref`, `SSL_up_ref`, `SSL_SESSION_up_ref`, `SSL_CTX_set_min_proto_version`, `SSL_CTX_set_max_proto_version`, `SSL_get_client_random`, `X509_up_ref`, `X509_get_version`, `EVP_PKEY_get0_RSA`, `EVP_PKEY_get0_DSA`, `EVP_PKEY_get0_DH`, `EVP_MD_CTX_new`, `EVP_MD_CTX_free`, `EVP_DigestInit`, `EVP_sha1`, `EVP_sha224`, `ERR_load_crypto_strings`, `ERR_peek_last_error`, `OpenSSL_version`, `X509_PUBKEY_get0_param`, `OBJ_cmp`, `ASN1_STRING_get0_data`, `ASN1_INTEGER_free`, `X509_get0_extensions`, `X509_get_ext_count`, `X509_get_ext`, `EVP_PKEY_size`, `X509_getm_notBefore`, `X509_getm_notAfter`, `X509_get0_notBefore`, `X509_get0_notAfter`, `X509_get0_signature`, `RSA_get0_key`, `DH_get0_pqg`, `DH_get0_key`, `DSA_get0_pqg`, `DSA_get0_key` and `BIO_up_ref`, remain unimplemented from the [PS5 3.20 export table](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceLibreSsl3.c), cross-checked against the same module in PS5 firmware 13.60. Their signatures and behaviour are unverified; the declarations use the no-parameter unknown-signature convention and throw through `NotImplemented_nid_no_patch`. +- [libSceLibreSsl3 pending exports](../../../core/libs/prx/libSceLibreSsl3/Export.cpp) - 42 named callable exports, excluding `ASN1_OBJECT_free`, `CRYPTO_memcmp`, `MD5`, `SHA1`, `d2i_ASN1_INTEGER`, `EVP_PKEY_up_ref`, `EC_KEY_up_ref`, `RSA_up_ref`, `SSL_CTX_up_ref`, `SSL_up_ref`, `SSL_SESSION_up_ref`, `SSL_CTX_set_min_proto_version`, `SSL_CTX_set_max_proto_version`, `SSL_get_client_random`, `X509_up_ref`, `X509_get_version`, `EVP_PKEY_get0_RSA`, `EVP_PKEY_get0_DSA`, `EVP_PKEY_get0_DH`, `EVP_MD_CTX_new`, `EVP_MD_CTX_free`, `EVP_DigestInit`, `EVP_sha1`, `EVP_sha224`, `ERR_load_crypto_strings`, `ERR_peek_last_error`, `OpenSSL_version`, `X509_PUBKEY_get0_param`, `OBJ_cmp`, `ASN1_STRING_get0_data`, `ASN1_INTEGER_free`, `X509_get0_extensions`, `X509_get_ext_count`, `X509_get_ext`, `EVP_PKEY_size`, `X509_getm_notBefore`, `X509_getm_notAfter`, `X509_get0_notBefore`, `X509_get0_notAfter`, `X509_get0_signature`, `RSA_get0_key`, `DH_get0_pqg`, `DH_get0_key`, `DSA_get0_pqg`, `DSA_get0_key`, `BIO_up_ref`, `X509_STORE_CTX_free`, `X509_STORE_CTX_new` and `X509_STORE_up_ref`, remain unimplemented from the [PS5 3.20 export table](https://github.com/DNNDHH/PS5-3.20_Libs/blob/b2a77c09cd71c01f34c790cfbe98c751a13262ad/libSceLibreSsl3.c), cross-checked against the same module in PS5 firmware 13.60. Their signatures and behaviour are unverified; the declarations use the no-parameter unknown-signature convention and throw through `NotImplemented_nid_no_patch`. ### Functional @@ -77,9 +77,11 @@ - [EVP_PKEY_size, EVP_PKEY_security_bits and EVP_PKEY_cmp](../../../core/libs/prx/libSceLibreSsl3/src/PkeyQueries.cpp) have no console ABI or behavior verification. Dispatch follows [LibreSSL 4.0.0](https://github.com/libressl/openbsd/blob/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/evp/p_lib.c) using the existing 32-byte key and the LP64 method slots in that revision's `evp_local.h`: public comparison at 56, size at 96, security bits at 112 and parameter comparison at 160. Tests use caller-owned keys and callbacks; real key-constructor and algorithm-method interoperability remains unverified. Null comparison operands, undefined upstream, throw; null size/security queries and missing callbacks keep upstream's distinct results. Malformed method pointers remain unverified. Closes when: layouts and complete key lifetimes are measured on a console. - [OBJ_find_sigid_algs](../../../core/libs/prx/libSceLibreSsl3/src/SignatureAlgorithms.cpp) - console identifiers/mappings and certificate interoperability are unverified. The shared parent registry reserves IDs from 956 for custom objects, so the 18 higher-ID mappings in [LibreSSL 4.0.0](https://github.com/libressl/openbsd/tree/ce488b78e0bd994780569df718596b9776ff681a/src/lib/libcrypto/objects) are unavailable: those inputs return no match without changing outputs, before or after object creation/cleanup. The remaining 33 mappings, including zero-digest identifiers, use built-in IDs below that boundary. A match does not establish availability of the named algorithms. Closes when: a compatible modern object registry and firmware mappings are verified. +- [X509_STORE_CTX_new, X509_STORE_CTX_free, X509_STORE_CTX_get0_param and X509_STORE_up_ref](../../../core/libs/prx/libSceLibreSsl3/src/X509StoreContext.cpp) (libSceLibreSsl3) - nothing is checked on the console. They follow LibreSSL [x509_vfy.c and x509_lu.c](https://github.com/libressl/openbsd/tree/078b3d1d/src/lib/libcrypto/x509) with libSceLibreSsl's context and store layouts. `new` does not queue `ERR_R_MALLOC_FAILURE` on failure; the LibreSSL3 error queue is not modelled. `free` throws, leaving the context untouched, when a cleanup callback, owned `param` (no `parent`), policy tree, chain or extra data is set. Null arguments to `get0_param` and `up_ref`, and `up_ref` at `INT32_MAX`, throw. Closes when: compared with the console and context cleanup is implemented. + ### Additional callable export inventory -- [Additional exports](../../../core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp) declare 106 still-unimplemented callable exports: 97 named and 9 known only by NID. These entries throw. Parameterless `int` declarations are unknown-signature placeholders, not verified ABI contracts. Names/NIDs match the 13.60 export table. The fourteen libtls lifecycle/config exports are implemented in `LibTls.cpp`; title compatibility beyond preconnection behavior remains unverified. +- [Additional exports](../../../core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp) declare 105 still-unimplemented callable exports: 96 named and 9 known only by NID. These entries throw. Parameterless `int` declarations are unknown-signature placeholders, not verified ABI contracts. Names/NIDs match the 13.60 export table. The fourteen libtls lifecycle/config exports are implemented in `LibTls.cpp`; title compatibility beyond preconnection behavior remains unverified. | Name | NID | | --- | --- | @@ -101,7 +103,6 @@ | `tls_read` | `7RvDjfy4gUA` | | `EC_POINT_set_affine_coordinates_GFp` | `8AGfaSvdDq4` | | `SSL_CTX_set_max_early_data` | `8kct4CSWwOA` | -| `X509_STORE_CTX_get0_param` | `8wroYNJAQpo` | | `unknown` | `A-Hs-8mau+8` | | `ERR_load_X509_strings` | `A0lZtFjhcTw` | | `unknown` | `AiNud8LR8B4` |