mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-17 10:59:39 +00:00
Fix set_ca_cert_store() to skip system certs like set_ca_cert_path() (#2335)
Both APIs conceptually do the same thing: "use these CA certs for verification." However, set_ca_cert_store() falls through to the else branch in load_certs() where system certs are added to the user's custom store, defeating the purpose of certificate pinning. This change makes set_ca_cert_store() behave consistently with set_ca_cert_path() by checking ca_cert_store_ before loading system certificates. Added test to verify system certs are not loaded when custom store is set. Co-authored-by: Your <you@example.com>
This commit is contained in:
1 parent
f73e694f0c
commit
c3fa06112b
2 files changed
+22
-1