GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — SSLClient CA cert configuration: separating `ca_cert_pem_` from system CA control, and supporting complementary CA combinations · Issue #2471 · yhirose/cpp-httplib Closed DescriptionContextAfter reviewing the
This is reflected in the if (!ca_cert_file_path_.empty()) { // file } else if (!ca_cert_dir_path_.empty()) { // dir } else if (ca_cert_pem_.empty()) { load_system_certs(ctx_); } I respect this design decision and would like to ask a few questions before proposing anything concrete. Observation
These are conceptually independent concerns, and I would like to ask whether this coupling is an intentional design decision or whether there might be room to separate the two roles in the future. As a result of this structure, setting a custom PEM simultaneously disables system CA loading, which means there is currently no supported way to configure the client to trust a custom CA (e.g., a corporate self-signed CA) while also trusting the system CA store. I would like to ask whether there is an intended approach for this use case. Possible DirectionThe following three approaches came to mind, all of which preserve the existing interfaces and their behavior entirely, with no breaking changes to existing users. Option A — Dedicated functions per combination Add a separate "with system CA" variant for each existing interface: load_ca_cert_store_with_system(pem, size); set_ca_cert_path_with_system(file, dir);
Option B — A single Add a single function that explicitly controls whether the system CA is loaded: // Existing interface unchanged client.load_ca_cert_store(pem, size); // Explicitly opt in to system CA client.enable_system_ca(true);
Option C — Configuration struct Introduce a new entry point that allows all CA sources to be configured explicitly at once: struct CAConfig { std::string pem; std.string file_path; std::string dir_path; bool use_system_ca = false; }; client.set_ca_config(config);
QuestionsI would greatly appreciate your thoughts on the following:
Thank you very much for maintaining this library and for your time reading through this. I wanted to check alignment with your vision before moving forward with any concrete proposal. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |