truststore
truststore copied to clipboard
Implement-get_ca_certs-for-macos
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.
Pinging @sethmlarson