From b4ef313cc7a7be9399a33568453b302012bf4fab Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 01:04:13 +0000 Subject: [PATCH] Accept a write error for a client rejected after the TLS 1.3 handshake On TLS 1.3 the server rejects a client without a certificate only after the client has finished its side of the handshake, so the client notices either when it writes the request or when it reads the response. CI saw the write fail on Windows (OpenSSL) and once on macOS (Mbed TLS), which ClientCertMissing did not accept. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WGAYpQgXt95LdDQcJYgjB8 --- test/test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test.cc b/test/test.cc index edf1aec3..65e69c1e 100644 --- a/test/test.cc +++ b/test/test.cc @@ -14604,8 +14604,9 @@ void ClientCertMissing(const ClientCertServerSetup &setup = nullptr) { auto res = cli.Get("/test"); ASSERT_FALSE(res); // The server rejects the client during the handshake, or on TLS 1.3 right - // after it, which the client only notices on its first read - EXPECT_TRUE(res.error() == Error::SSLConnection || res.error() == Error::Read) + // after it, which the client notices on its first write or read + EXPECT_TRUE(res.error() == Error::SSLConnection || + res.error() == Error::Write || res.error() == Error::Read) << to_string(res.error()); if (res.error() == Error::SSLConnection) {