From 0fe883da977c301b364aa2b93de83c29ef34724c Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 16 Oct 2026 16:39:00 -0400 Subject: [PATCH] Document when an SSL client loads its CA certificates They are loaded on the first connection, so later changes to the CA path or the system CA setting have no effect. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index afd9d55a..74b218a4 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,9 @@ cli.enable_server_certificate_verification(false); cli.enable_server_hostname_verification(false); ``` +> [!NOTE] +> The CA certificates are loaded when the client makes its first connection. Changing `set_ca_cert_path()` or `enable_system_ca()` after that has no effect, so make the settings before the first request, or use a new client. + ### SSL Error Handling When SSL operations fail, cpp-httplib provides detailed error information through `ssl_error()` and `ssl_backend_error()`: