{"id":13632572,"url":"https://github.com/rustls/rustls-native-certs","last_synced_at":"2025-06-10T12:10:51.105Z","repository":{"id":38822234,"uuid":"196629842","full_name":"rustls/rustls-native-certs","owner":"rustls","description":"Integration with OS certificate stores for rustls","archived":false,"fork":false,"pushed_at":"2025-06-04T14:54:52.000Z","size":203,"stargazers_count":214,"open_issues_count":4,"forks_count":63,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-08T00:08:38.024Z","etag":null,"topics":["rust","tls"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-12T18:49:38.000Z","updated_at":"2025-06-06T13:19:42.000Z","dependencies_parsed_at":"2023-12-21T16:44:14.633Z","dependency_job_id":"d895444c-4b7b-4d0a-b7e9-64171546d3c3","html_url":"https://github.com/rustls/rustls-native-certs","commit_stats":{"total_commits":193,"total_committers":18,"mean_commits":"10.722222222222221","dds":0.6683937823834196,"last_synced_commit":"3147a4f221b03e82ce48cad58f27253df3053f1e"},"previous_names":["ctz/rustls-native-certs"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustls%2Frustls-native-certs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustls%2Frustls-native-certs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustls%2Frustls-native-certs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustls%2Frustls-native-certs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustls","download_url":"https://codeload.github.com/rustls/rustls-native-certs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustls%2Frustls-native-certs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258788487,"owners_count":22758222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","tls"],"created_at":"2024-08-01T22:03:07.307Z","updated_at":"2025-06-10T12:10:51.083Z","avatar_url":"https://github.com/rustls.png","language":"Rust","funding_links":[],"categories":["Rust","rust"],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/rustls/rustls/main/admin/rustls-logo-web.png)\n\n**rustls-native-certs** allows [rustls](https://github.com/rustls/rustls) to use the\nplatform's native certificate store when operating as a TLS client.\n\n\u003e [!IMPORTANT]\n\u003e Instead of this crate, we suggest using [rustls-platform-verifier](https://github.com/rustls/rustls-platform-verifier),\n\u003e which provides a more robust solution with a simpler API. This crate is still maintained,\n\u003e but mostly for use inside the platform verifier on platforms where no other\n\u003e solution is available. For more context, see\n\u003e [deployment considerations](https://github.com/rustls/rustls-platform-verifier?tab=readme-ov-file#deployment-considerations).\n\n# Status\nrustls-native-certs is mature and widely used.\n\nIf you'd like to help out, please see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n[![rustls](https://github.com/rustls/rustls-native-certs/actions/workflows/rust.yml/badge.svg)](https://github.com/rustls/rustls-native-certs/actions/workflows/rust.yml)\n[![Documentation](https://docs.rs/rustls-native-certs/badge.svg)](https://docs.rs/rustls-native-certs)\n\nRelease notes can be found [on GitHub](https://github.com/rustls/rustls-native-certs/releases).\n\n# API\n\nThis library exposes a single function with this signature:\n\n```rust\npub fn load_native_certs() -\u003e Result\u003cVec\u003cpki_types::CertificateDer\u003c'static\u003e\u003e, std::io::Error\u003e\n```\n\nOn success, this returns a `Vec\u003cpki_types::CertificateDer\u003c'static\u003e\u003e` loaded with a\nsnapshot of the root certificates found on this platform.  This\nfunction fails in a platform-specific way, expressed in a `std::io::Error`.\n\nThis function can be expensive: on some platforms it involves loading\nand parsing a ~300KB disk file.  It's therefore prudent to call\nthis sparingly.\n\n# Platform support\n\nThis is supported on Windows, macOS and Linux:\n\n- On all platforms, the `SSL_CERT_FILE` environment variable is checked first.\n  If that's set, certificates are loaded from the path specified by that variable,\n  or an error is returned if certificates cannot be loaded from the given path.\n  If it's not set, then the platform-specific certificate source is used.\n- On Windows, certificates are loaded from the system certificate store.\n  The [`schannel`](https://github.com/steffengy/schannel-rs) crate is used to access\n  the Windows certificate store APIs.\n- On macOS, certificates are loaded from the keychain.\n  The user, admin and system trust settings are merged together as documented\n  by Apple.  The [`security-framework`](https://github.com/kornelski/rust-security-framework)\n  crate is used to access the keystore APIs.\n- On Linux and other UNIX-like operating systems, the\n  [`openssl-probe`](https://github.com/alexcrichton/openssl-probe) crate is used to discover\n  the filename of the system CA bundle.\n\n# Worked example\n\nSee [`examples/google.rs`](examples/google.rs).\n\n# License\n\nrustls-native-certs is distributed under the following three licenses:\n\n- Apache License version 2.0.\n- MIT license.\n- ISC license.\n\nThese are included as LICENSE-APACHE, LICENSE-MIT and LICENSE-ISC\nrespectively.  You may use this software under the terms of any\nof these licenses, at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustls%2Frustls-native-certs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustls%2Frustls-native-certs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustls%2Frustls-native-certs/lists"}