mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
set_verify_client() and set_verify_callback() each set the verify mode on their own, and set_verify_callback() ignored whether the peer's certificate was required. A server that required client certificates therefore stopped requiring them as soon as a verify callback was set on its context (OpenSSL, Mbed TLS, wolfSSL) or set and then cleared again (OpenSSL, Mbed TLS). Compute the mode from "peer certificate required" and "callback set" in one helper per backend and call it from set_verify_client(), set_verify_callback() and the context constructors. The context now records that a client verifies the server by default, so clearing a callback on a client context restores that default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGAYpQgXt95LdDQcJYgjB8