From d986a418ad4cdd409ad4e7820a9f4482bec6f6a4 Mon Sep 17 00:00:00 2001 From: milescoviello Date: Mon, 26 Oct 2026 22:48:52 +0000 Subject: [PATCH 1/4] fix(libSceHttp2): retry a failed lookup the number of times sceHttp2SetResolveRetry sets Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceHttp2/Export.cpp | 5 ++++- core/libs/prx/libSceHttp2/Transport.cpp | 10 ++++++---- core/libs/prx/libSceHttp2/Transport.hpp | 1 + core/libs/tests/GuestHttp2.cpp | 3 ++- core/libs/tests/GuestHttp2Transport.cpp | 1 + docs/dev/debt/libSceHttp2.md | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/core/libs/prx/libSceHttp2/Export.cpp b/core/libs/prx/libSceHttp2/Export.cpp index 4b9956e544ca..eae76330b33b 100644 --- a/core/libs/prx/libSceHttp2/Export.cpp +++ b/core/libs/prx/libSceHttp2/Export.cpp @@ -383,7 +383,10 @@ int APS5_VABI sceHttp2SetRequestNoContentLength(int id) { } int APS5_VABI sceHttp2SetResolveRetry(int id, int32_t retry) { - return Update(id, __func__, [&](auto&) { if (retry != 0) NotImplemented_nid_no_patch("sceHttp2SetResolveRetry"); }); + return Update(id, __func__, [&](auto& settings) { + if (retry < 0) NotImplemented_nid_no_patch("sceHttp2SetResolveRetry"); + settings.resolveRetry = retry; + }); } int APS5_VABI sceHttp2WebSocketCreateRequest(std::int32_t templateId, const char* url, Http2WebSocketTextCallback textCallback, Http2WebSocketDataCallback dataCallback, Http2WebSocketCloseCallback closeCallback, Http2WebSocketErrorCallback errorCallback, void* receiveBuffer, std::size_t receiveBufferSize, void* userData, const void* option) { diff --git a/core/libs/prx/libSceHttp2/Transport.cpp b/core/libs/prx/libSceHttp2/Transport.cpp index a8a9ac6b71e9..80a56f27140e 100644 --- a/core/libs/prx/libSceHttp2/Transport.cpp +++ b/core/libs/prx/libSceHttp2/Transport.cpp @@ -323,16 +323,18 @@ struct Request::State { Require(startup >= 0, "sceHttp2: network initialization failed; console error mapping is unknown"); Require(sceNetSocketClose(startup) == 0, "sceHttp2: network initialization socket close failed"); #endif - const auto deadline = Deadline(settings.resolveTimeout); - const auto job = Dns().Submit(url); - { + std::shared_ptr job; + for (std::int32_t attempt = 0;; ++attempt) { + const auto deadline = Deadline(settings.resolveTimeout); + job = Dns().Submit(url); std::unique_lock lock(job->mutex); while (!job->complete) { Check(deadline); job->changed.wait_for(lock, std::chrono::milliseconds(5)); } Check(deadline); - if (job->failure) std::rethrow_exception(job->failure); + if (!job->failure) break; + if (attempt >= settings.resolveRetry) std::rethrow_exception(job->failure); } const auto connectDeadline = Deadline(settings.connectTimeout); int result = 0; diff --git a/core/libs/prx/libSceHttp2/Transport.hpp b/core/libs/prx/libSceHttp2/Transport.hpp index 116790ad2bd7..265fde203d8d 100644 --- a/core/libs/prx/libSceHttp2/Transport.hpp +++ b/core/libs/prx/libSceHttp2/Transport.hpp @@ -20,6 +20,7 @@ struct Settings { std::uint32_t verifyFlags = 0x3d; std::uint32_t timeout = 120000000; std::uint32_t connectTimeout = 30000000; + std::int32_t resolveRetry = 0; std::uint32_t sendTimeout = 120000000; std::uint32_t recvTimeout = 120000000; std::uint32_t resolveTimeout = 30000000; diff --git a/core/libs/tests/GuestHttp2.cpp b/core/libs/tests/GuestHttp2.cpp index 2f1525f541a9..8bd6b7e26e34 100644 --- a/core/libs/tests/GuestHttp2.cpp +++ b/core/libs/tests/GuestHttp2.cpp @@ -33,7 +33,8 @@ int main() { Require(Throws([&] { sceHttp2SetCookieBox(tmpl, box); })); Require(sceHttp2CookieFlush(box) == 0); Require(sceHttp2SetResolveRetry(tmpl, 0) == 0); - Require(Throws([&] { sceHttp2SetResolveRetry(tmpl, 3); })); + Require(sceHttp2SetResolveRetry(tmpl, 3) == 0); + Require(Throws([&] { sceHttp2SetResolveRetry(tmpl, -1); })); Require(sceHttp2SetRequestNoContentLength(request) == 0); Require(Throws([&] { sceHttp2AddRequestHeader(request, "bad:name", "value", 0); })); Require(Throws([&] { sceHttp2AddRequestHeader(request, "x-header", "value\r\ninjected: yes", 0); })); diff --git a/core/libs/tests/GuestHttp2Transport.cpp b/core/libs/tests/GuestHttp2Transport.cpp index 03594e78b639..0aa8bccde118 100644 --- a/core/libs/tests/GuestHttp2Transport.cpp +++ b/core/libs/tests/GuestHttp2Transport.cpp @@ -308,6 +308,7 @@ void Success(int ssl, Mode mode, bool disableCa = false) { if (disableCa) Require(sceHttp2SslDisableOption(client.tmpl, 0x20) == 0, "disable known CA check"); if (mode == Mode::Normal && !disableCa) Require(sceHttp2SslEnableOption(client.tmpl, 0x4) == 0, "verify localhost certificate name"); Require(sceHttp2AddRequestHeader(client.tmpl, "X-Inherited", "original", 0) == 0, "template header"); + Require(sceHttp2SetResolveRetry(client.tmpl, 2) == 0, "resolve retries"); const std::string upload = mode == Mode::Large ? std::string(150000, 'u') : std::string{}; client.Create(server.Url(mode == Mode::Normal && !disableCa ? "localhost" : "127.0.0.1"), mode == Mode::Head ? "HEAD" : upload.empty() ? "GET" : "POST", upload.size()); Require(sceHttp2AddRequestHeader(client.tmpl, "X-Inherited", "changed", 0) == 0, "template mutation"); diff --git a/docs/dev/debt/libSceHttp2.md b/docs/dev/debt/libSceHttp2.md index 206b6857623e..ee1a70c7aa65 100644 --- a/docs/dev/debt/libSceHttp2.md +++ b/docs/dev/debt/libSceHttp2.md @@ -30,7 +30,7 @@ - [libSceHttp2 transport](../../../core/libs/prx/libSceHttp2/Transport.cpp) - only synchronous HTTPS requests with version 3 and ALPN `h2` are supported. HTTP/1.x, cleartext HTTP/2, negotiation fallback, connection reuse, multiplexing across requests, CONNECT, response trailers, automatic redirects and authentication challenges throw. Version values, method strings, header overwrite/append modes, status/read/content-length signatures and timeout units follow [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Net/Http2.cs); wire framing and negotiation follow [RFC 9113 sections 3, 5, 6 and 8](https://www.rfc-editor.org/rfc/rfc9113.html). [prosper](https://github.com/mattias800/prosper/blob/b1bec57186a0/prosper/src/hle/net/hle_http2.cpp) instead records the method argument as an integer; the string signature follows SharpProspero. These are public compatibility contracts, not console measurements. - [libSceHttp2 error paths](../../../core/libs/prx/libSceHttp2/Transport.cpp) - cancellation, deadlines, DNS/TLS/protocol failures, malformed inputs, concurrent calls on one request and exhausted connection slots throw because their console error mappings are unknown. Socket connect errors propagate the libSceNet result, following the module-analysis report in [prosper #2894](https://github.com/mattias800/prosper/issues/2894); the report does not establish every exported error path. A request uses one connection; a context's concurrency cap counts connections until EOF, failure or deletion. Native pooling, scheduling, validation order and teardown semantics remain unverified. DNS uses two host workers and a queue of eight; cancellation/deadlines abandon the caller's wait, not libc's lookup. Library unload can wait for a host lookup to return. -- [libSceHttp2 TLS settings](../../../core/libs/prx/libSceHttp2/Export.cpp) - minimum SSL versions outside 2 to 5, nonnull SSL callbacks and flags outside `0x3d` throw. Supported certificate-check bits follow SharpProspero and use libSceSsl's TLS 1.2 backend and CA context; native defaults and error translation are unverified. Settings on object kinds other than templates/requests throw, except for the request options below; native object-kind restrictions are otherwise unverified. Settings become immutable when transport is created. Zero timeout values, nonzero resolve retries, gzip inflation and connection-slot wait timeouts throw. Host HTTP allocations are not charged to the context pool, so `sceHttp2GetMemoryPoolStats` reports a live context's pool size with zero peak and current use. PPSA01494, PPSA30839 and PPSA31162 read the three sizes for memory logging without checking the result, and stopped at startup while it threw. +- [libSceHttp2 TLS settings](../../../core/libs/prx/libSceHttp2/Export.cpp) - minimum SSL versions outside 2 to 5, nonnull SSL callbacks and flags outside `0x3d` throw. Supported certificate-check bits follow SharpProspero and use libSceSsl's TLS 1.2 backend and CA context; native defaults and error translation are unverified. Settings on object kinds other than templates/requests throw, except for the request options below; native object-kind restrictions are otherwise unverified. Settings become immutable when transport is created. Zero timeout values, negative resolve retries, gzip inflation and connection-slot wait timeouts throw; a nonnegative retry count repeats a failed lookup that many times before the failure throws. Host HTTP allocations are not charged to the context pool, so `sceHttp2GetMemoryPoolStats` reports a live context's pool size with zero peak and current use. PPSA01494, PPSA30839 and PPSA31162 read the three sizes for memory logging without checking the result, and stopped at startup while it threw. - [sceHttp2SetMinSslVersion](../../../core/libs/prx/libSceHttp2/Export.cpp) - libSceHttp2's own range and validation order are not measured: versions 2 (SSL 3.0) to 5 (TLS 1.2) are accepted, the range `sceSslSetMinSslVersion` takes on a 13.40 console ([libSceSsl](libSceSsl.md)). The floor is not kept: libSceSsl negotiates TLS 1.2 only, which meets every accepted floor, so a server limited to versions older than TLS 1.2 fails the handshake whatever the floor; what a lower floor does with such a server on a console is not measured. - [libSceHttp2 request options](../../../core/libs/prx/libSceHttp2/Export.cpp) - extends the TLS settings entry: the auth and redirect flags, headers and the auth-info and pre-send callbacks live in `Http2::Settings`, are copied into each new request and become immutable once transport exists; the getters still read them then. Accepted kinds, defaults, copying, header modes, error codes and their order follow the 13.42 module run in an emulator ([#10536](https://github.com/boykopovar/AnyPS5/pull/10536)), not a console. A null out-pointer to `sceHttp2GetAuthEnabled` is written through on that module; here it throws. The pre-send callback type is unknown. The transport never calls either callback, and the auth cache flush only validates the context - [sceHttp2GetAllResponseHeaders](../../../core/libs/prx/libSceHttp2/Export.cpp) throws: the serialization, size and lifetime of a decoded HTTP/2 header block have not been established. Status and Content-Length fields are decoded; absent Content-Length reports `NotFound`, following SharpProspero. From 200e1c0f7ce4f34a94ed27b507d3bc725f7f571d Mon Sep 17 00:00:00 2001 From: milescoviello Date: Mon, 26 Oct 2026 23:06:07 +0000 Subject: [PATCH 2/4] test(libSceHttp2): count the lookups of a retried and an exhausted resolve Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceHttp2/Export.cpp | 4 +++ core/libs/prx/libSceHttp2/Transport.cpp | 11 +++++++ core/libs/prx/libSceHttp2/Transport.hpp | 4 +++ core/libs/tests/GuestHttp2Transport.cpp | 39 +++++++++++++++++++++++++ 4 files changed, 58 insertions(+) diff --git a/core/libs/prx/libSceHttp2/Export.cpp b/core/libs/prx/libSceHttp2/Export.cpp index eae76330b33b..66fe42115e5f 100644 --- a/core/libs/prx/libSceHttp2/Export.cpp +++ b/core/libs/prx/libSceHttp2/Export.cpp @@ -382,6 +382,10 @@ int APS5_VABI sceHttp2SetRequestNoContentLength(int id) { return Update(id, __func__, [&](auto& settings) { settings.noContentLength = true; }); } +extern "C" void Http2SetLookupHook_nid_no_patch(Http2::LookupHook hook) { + Http2::SetLookupHook(hook); +} + int APS5_VABI sceHttp2SetResolveRetry(int id, int32_t retry) { return Update(id, __func__, [&](auto& settings) { if (retry < 0) NotImplemented_nid_no_patch("sceHttp2SetResolveRetry"); diff --git a/core/libs/prx/libSceHttp2/Transport.cpp b/core/libs/prx/libSceHttp2/Transport.cpp index 80a56f27140e..63a76aba015b 100644 --- a/core/libs/prx/libSceHttp2/Transport.cpp +++ b/core/libs/prx/libSceHttp2/Transport.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -118,6 +119,11 @@ struct Lookup { std::exception_ptr failure; }; +std::atomic& LookupHookSlot() { + static std::atomic hook{nullptr}; + return hook; +} + class Resolver { public: Resolver() { @@ -163,6 +169,7 @@ class Resolver { hints.ai_family = AF_UNSPEC; addrinfo* raw = nullptr; const auto service = std::to_string(job->port); + if (const auto hook = LookupHookSlot().load(std::memory_order_acquire)) Require(hook(job->host.c_str()) == 0, "sceHttp2: DNS failed; console error mapping is unknown"); const int result = getaddrinfo(job->host.c_str(), service.c_str(), &hints, &raw); std::unique_ptr addresses(raw, freeaddrinfo); Require(result == 0, "sceHttp2: DNS failed; console error mapping is unknown"); @@ -638,6 +645,10 @@ std::shared_ptr CreateCapacity_nid_no_patch(int maximum) { return std::make_shared(maximum); } +void SetLookupHook(LookupHook hook) { + LookupHookSlot().store(hook, std::memory_order_release); +} + std::shared_ptr CreateRequest_nid_no_patch(int sslContext, std::shared_ptr capacity, Settings settings, std::string method, std::string url) { return std::make_shared(sslContext, std::move(capacity), std::move(settings), std::move(method), std::move(url)); } diff --git a/core/libs/prx/libSceHttp2/Transport.hpp b/core/libs/prx/libSceHttp2/Transport.hpp index 265fde203d8d..12cb80de3ec2 100644 --- a/core/libs/prx/libSceHttp2/Transport.hpp +++ b/core/libs/prx/libSceHttp2/Transport.hpp @@ -55,6 +55,10 @@ class Request { int AddHeader(Settings& settings, const char* name, const char* value, std::uint32_t mode); std::shared_ptr CreateCapacity_nid_no_patch(int maximum); +using LookupHook = int (*)(const char* host); +void SetLookupHook(LookupHook hook); std::shared_ptr CreateRequest_nid_no_patch(int sslContext, std::shared_ptr capacity, Settings settings, std::string method, std::string url); } + +extern "C" void Http2SetLookupHook_nid_no_patch(Http2::LookupHook hook); diff --git a/core/libs/tests/GuestHttp2Transport.cpp b/core/libs/tests/GuestHttp2Transport.cpp index 0aa8bccde118..1c2511282942 100644 --- a/core/libs/tests/GuestHttp2Transport.cpp +++ b/core/libs/tests/GuestHttp2Transport.cpp @@ -10,6 +10,7 @@ #include "SceTypes.hpp" #include "prx/libkernel/include/Api.hpp" #include "prx/libSceHttp2/include/Http2.hpp" +#include "prx/libSceHttp2/Transport.hpp" #include "prx/libSceNet/include/Net.hpp" #include "prx/libSceSsl/include/Ssl.hpp" #include "prx/libSceSsl/SslTypes.hpp" @@ -481,6 +482,43 @@ void Refused(int ssl) { Require(sceHttp2GetStatusCode(client.request, &status) == static_cast(0x8041013d) && status == 123, "failed status untouched"); } +std::atomic lookups{0}; +std::atomic failedLookups{0}; + +int CountedLookup(const char*) { + return ++lookups <= failedLookups.load() ? -1 : 0; +} + +void Retries(int ssl) { + std::fprintf(stderr, "HTTP2 resolve retry scenarios\n"); + Http2SetLookupHook_nid_no_patch(CountedLookup); + { + Server server(Mode::Normal); + Client client(ssl); + Require(sceHttp2SetResolveRetry(client.tmpl, 2) == 0, "two resolve retries"); + client.Create(server.Url()); + lookups = 0; + failedLookups = 2; + Require(sceHttp2SendRequest(client.request, nullptr, 0) == 0, "a lookup that fails twice succeeds on its second retry"); + Require(lookups == 3, "two failed lookups and the third one were made"); + std::array buffer; + std::string body; + for (int count; (count = sceHttp2ReadData(client.request, buffer.data(), buffer.size())) > 0;) body.append(buffer.data(), static_cast(count)); + Require(body == "response body", "body after retried lookups"); + server.Join(); + } + for (const int retry : {0, 1}) { + Client client(ssl); + Require(sceHttp2SetResolveRetry(client.tmpl, retry) == 0, "resolve retry count"); + client.Create("https://127.0.0.1:1/"); + lookups = 0; + failedLookups = 100; + Require(Throws([&] { sceHttp2SendRequest(client.request, nullptr, 0); }), "every lookup failing fails the request"); + Require(lookups == retry + 1, "a request makes its retry count plus one lookups before failing"); + } + Http2SetLookupHook_nid_no_patch(nullptr); +} + void Capacity(int ssl) { Server server(Mode::StallBody); Client client(ssl, 1); @@ -557,6 +595,7 @@ int main(int argc, char** argv) { } Refused(ssl); Capacity(ssl); + Retries(ssl); const int untrusted = sceSslInit_nid_postfix(8 * 1024 * 1024); Require(untrusted > 0, "untrusted SSL context"); Failure(untrusted, Mode::Normal); From bb2620548c9f89055b9602f1cc98bb49fd7f8f15 Mon Sep 17 00:00:00 2001 From: milescoviello Date: Tue, 27 Oct 2026 02:16:07 +0000 Subject: [PATCH 3/4] refactor(libSceHttp2): keep the lookup hook in the transport header Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceHttp2/Export.cpp | 2 +- core/libs/prx/libSceHttp2/Transport.cpp | 10 ---------- core/libs/prx/libSceHttp2/Transport.hpp | 9 +++++++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/core/libs/prx/libSceHttp2/Export.cpp b/core/libs/prx/libSceHttp2/Export.cpp index 66fe42115e5f..4f38d94ad10a 100644 --- a/core/libs/prx/libSceHttp2/Export.cpp +++ b/core/libs/prx/libSceHttp2/Export.cpp @@ -383,7 +383,7 @@ int APS5_VABI sceHttp2SetRequestNoContentLength(int id) { } extern "C" void Http2SetLookupHook_nid_no_patch(Http2::LookupHook hook) { - Http2::SetLookupHook(hook); + Http2::LookupHookSlot().store(hook, std::memory_order_release); } int APS5_VABI sceHttp2SetResolveRetry(int id, int32_t retry) { diff --git a/core/libs/prx/libSceHttp2/Transport.cpp b/core/libs/prx/libSceHttp2/Transport.cpp index 63a76aba015b..52aab59d914f 100644 --- a/core/libs/prx/libSceHttp2/Transport.cpp +++ b/core/libs/prx/libSceHttp2/Transport.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -119,11 +118,6 @@ struct Lookup { std::exception_ptr failure; }; -std::atomic& LookupHookSlot() { - static std::atomic hook{nullptr}; - return hook; -} - class Resolver { public: Resolver() { @@ -645,10 +639,6 @@ std::shared_ptr CreateCapacity_nid_no_patch(int maximum) { return std::make_shared(maximum); } -void SetLookupHook(LookupHook hook) { - LookupHookSlot().store(hook, std::memory_order_release); -} - std::shared_ptr CreateRequest_nid_no_patch(int sslContext, std::shared_ptr capacity, Settings settings, std::string method, std::string url) { return std::make_shared(sslContext, std::move(capacity), std::move(settings), std::move(method), std::move(url)); } diff --git a/core/libs/prx/libSceHttp2/Transport.hpp b/core/libs/prx/libSceHttp2/Transport.hpp index 12cb80de3ec2..5131206d6c03 100644 --- a/core/libs/prx/libSceHttp2/Transport.hpp +++ b/core/libs/prx/libSceHttp2/Transport.hpp @@ -10,6 +10,13 @@ namespace Http2 { +using LookupHook = int (*)(const char* host); + +inline std::atomic& LookupHookSlot() { + static std::atomic hook{nullptr}; + return hook; +} + struct Settings { std::string userAgent; std::vector> headers; @@ -55,8 +62,6 @@ class Request { int AddHeader(Settings& settings, const char* name, const char* value, std::uint32_t mode); std::shared_ptr CreateCapacity_nid_no_patch(int maximum); -using LookupHook = int (*)(const char* host); -void SetLookupHook(LookupHook hook); std::shared_ptr CreateRequest_nid_no_patch(int sslContext, std::shared_ptr capacity, Settings settings, std::string method, std::string url); } From 4e921aa0e302fb59053a4925718c0a7242def62a Mon Sep 17 00:00:00 2001 From: milescoviello Date: Thu, 29 Oct 2026 04:26:47 +0000 Subject: [PATCH 4/4] docs(libSceHttp2): say how resolve retries count and that the console's semantics are unverified Co-Authored-By: Claude Opus 5.5 --- docs/dev/debt/libSceHttp2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/debt/libSceHttp2.md b/docs/dev/debt/libSceHttp2.md index ee1a70c7aa65..65aec642bf63 100644 --- a/docs/dev/debt/libSceHttp2.md +++ b/docs/dev/debt/libSceHttp2.md @@ -29,8 +29,8 @@ - [Default TLS trust](../../../core/libs/prx/libSceHttp2/Transport.cpp) (libSceHttp2) - HTTPS connections also trust the system CA list, `//common/cert/CA_LIST.cer`, served by libkernel from the host trust store, after the title's own libSceSsl certificates. RetroArch (PPSA99169, [updater](https://github.com/mihawk-99/PS5_RetroArch/blob/7268510b12fe7461342e0cc4497c87a0910c1055/src/webui_update.cpp#L302-L312)), PS5LM (PPSA99575) and Porpoise (PPSA99764) send version-3 requests to public `https://` servers with no loaded certificate, verify callback or verification option, which pass the known-CA check only if the console trusts public roots by default. That the console's roots are exactly this file is not measured - [libSceHttp2 transport](../../../core/libs/prx/libSceHttp2/Transport.cpp) - only synchronous HTTPS requests with version 3 and ALPN `h2` are supported. HTTP/1.x, cleartext HTTP/2, negotiation fallback, connection reuse, multiplexing across requests, CONNECT, response trailers, automatic redirects and authentication challenges throw. Version values, method strings, header overwrite/append modes, status/read/content-length signatures and timeout units follow [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Net/Http2.cs); wire framing and negotiation follow [RFC 9113 sections 3, 5, 6 and 8](https://www.rfc-editor.org/rfc/rfc9113.html). [prosper](https://github.com/mattias800/prosper/blob/b1bec57186a0/prosper/src/hle/net/hle_http2.cpp) instead records the method argument as an integer; the string signature follows SharpProspero. These are public compatibility contracts, not console measurements. -- [libSceHttp2 error paths](../../../core/libs/prx/libSceHttp2/Transport.cpp) - cancellation, deadlines, DNS/TLS/protocol failures, malformed inputs, concurrent calls on one request and exhausted connection slots throw because their console error mappings are unknown. Socket connect errors propagate the libSceNet result, following the module-analysis report in [prosper #2894](https://github.com/mattias800/prosper/issues/2894); the report does not establish every exported error path. A request uses one connection; a context's concurrency cap counts connections until EOF, failure or deletion. Native pooling, scheduling, validation order and teardown semantics remain unverified. DNS uses two host workers and a queue of eight; cancellation/deadlines abandon the caller's wait, not libc's lookup. Library unload can wait for a host lookup to return. -- [libSceHttp2 TLS settings](../../../core/libs/prx/libSceHttp2/Export.cpp) - minimum SSL versions outside 2 to 5, nonnull SSL callbacks and flags outside `0x3d` throw. Supported certificate-check bits follow SharpProspero and use libSceSsl's TLS 1.2 backend and CA context; native defaults and error translation are unverified. Settings on object kinds other than templates/requests throw, except for the request options below; native object-kind restrictions are otherwise unverified. Settings become immutable when transport is created. Zero timeout values, negative resolve retries, gzip inflation and connection-slot wait timeouts throw; a nonnegative retry count repeats a failed lookup that many times before the failure throws. Host HTTP allocations are not charged to the context pool, so `sceHttp2GetMemoryPoolStats` reports a live context's pool size with zero peak and current use. PPSA01494, PPSA30839 and PPSA31162 read the three sizes for memory logging without checking the result, and stopped at startup while it threw. +- [libSceHttp2 error paths](../../../core/libs/prx/libSceHttp2/Transport.cpp) - cancellation, deadlines, DNS/TLS/protocol failures, malformed inputs, concurrent calls on one request and exhausted connection slots throw because their console error mappings are unknown. Socket connect errors propagate the libSceNet result, following the module-analysis report in [prosper #2894](https://github.com/mattias800/prosper/issues/2894); the report does not establish every exported error path. A request uses one connection; a context's concurrency cap counts connections until EOF, failure or deletion. Native pooling, scheduling, validation order and teardown semantics remain unverified. DNS uses two host workers and a queue of eight; cancellation/deadlines abandon the caller's wait, not libc's lookup. Library unload can wait for a host lookup to return. A resolve retry resubmits a failed lookup with a new timeout; a timed-out lookup isn't retried. The console's retry semantics are unverified. +- [libSceHttp2 TLS settings](../../../core/libs/prx/libSceHttp2/Export.cpp) - minimum SSL versions outside 2 to 5, nonnull SSL callbacks and flags outside `0x3d` throw. Supported certificate-check bits follow SharpProspero and use libSceSsl's TLS 1.2 backend and CA context; native defaults and error translation are unverified. Settings on object kinds other than templates/requests throw, except for the request options below; native object-kind restrictions are otherwise unverified. Settings become immutable when transport is created. Zero timeout values, negative resolve retries, gzip inflation and connection-slot wait timeouts throw; a failed lookup is retried up to the set count. Host HTTP allocations are not charged to the context pool, so `sceHttp2GetMemoryPoolStats` reports a live context's pool size with zero peak and current use. PPSA01494, PPSA30839 and PPSA31162 read the three sizes for memory logging without checking the result, and stopped at startup while it threw. - [sceHttp2SetMinSslVersion](../../../core/libs/prx/libSceHttp2/Export.cpp) - libSceHttp2's own range and validation order are not measured: versions 2 (SSL 3.0) to 5 (TLS 1.2) are accepted, the range `sceSslSetMinSslVersion` takes on a 13.40 console ([libSceSsl](libSceSsl.md)). The floor is not kept: libSceSsl negotiates TLS 1.2 only, which meets every accepted floor, so a server limited to versions older than TLS 1.2 fails the handshake whatever the floor; what a lower floor does with such a server on a console is not measured. - [libSceHttp2 request options](../../../core/libs/prx/libSceHttp2/Export.cpp) - extends the TLS settings entry: the auth and redirect flags, headers and the auth-info and pre-send callbacks live in `Http2::Settings`, are copied into each new request and become immutable once transport exists; the getters still read them then. Accepted kinds, defaults, copying, header modes, error codes and their order follow the 13.42 module run in an emulator ([#10536](https://github.com/boykopovar/AnyPS5/pull/10536)), not a console. A null out-pointer to `sceHttp2GetAuthEnabled` is written through on that module; here it throws. The pre-send callback type is unknown. The transport never calls either callback, and the auth cache flush only validates the context - [sceHttp2GetAllResponseHeaders](../../../core/libs/prx/libSceHttp2/Export.cpp) throws: the serialization, size and lifetime of a decoded HTTP/2 header block have not been established. Status and Content-Length fields are decoded; absent Content-Length reports `NotFound`, following SharpProspero.