truststore icon indicating copy to clipboard operation
truststore copied to clipboard

Implement-get_ca_certs-for-macos

Open BrokenDuck opened this issue 7 months ago • 1 comments

Rationale

On Mac OS, the load_default_certs SSLContext method does not load the system root certificate. In order for the get_ca_certs method to work properly on mac os, we need to override the load_defaults_certs method on Mac OS.

Method

We extract the certificates using the Security Framework, with the SecTrustCopyAnchorCertificates function. We then load the certificates using the load_verify_location SSLContext method which accepts DER-encoded byte-like certificates in the cadata argument.

BrokenDuck avatar May 18 '25 22:05 BrokenDuck

Pinging @sethmlarson

jmaillefaud avatar Jun 17 '25 08:06 jmaillefaud