[package]
name = "os-truststore"
description = "One symmetric API for installing and removing CA certificates in the operating system's trust store, across Windows, macOS, and Linux."
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
keywords = ["truststore", "certificate", "tls", "ca", "ca-certificates"]
categories = ["cryptography", "os"]

[dependencies]
tracing.workspace = true
thiserror.workspace = true
pem.workspace = true
x509-parser.workspace = true
sha2.workspace = true
# In-process trust helper (no OS store, no elevation) — opt-in.
rustls = { workspace = true, optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
libc.workspace = true
which.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
# Race-free temp file for handing the PEM to the `security` CLI (no /tmp symlink TOCTOU).
tempfile.workspace = true

[target.'cfg(windows)'.dependencies]
schannel.workspace = true

[features]
default = []
# Build the in-process `rustls` trust helper (os_truststore::inprocess).
rustls = ["dep:rustls"]

[dev-dependencies]
rcgen.workspace = true

[package.metadata.docs.rs]
all-features = true
