Jelajahi Sumber

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAYpQgXt95LdDQcJYgjB8
Claude 3 hari lalu
induk
melakukan
b4ef313cc7
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      test/test.cc

+ 3 - 2
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) {