security-rs 0.2.1

Safe Rust bindings for Apple's Security framework — keychain, identity, certificates, trust, authorization, CMS, SecureTransport, and cryptographic primitives on macOS
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.70"
name = "security-rs"
version = "0.2.1"
authors = ["Per Johansson <per@doom.fish>"]
build = "build.rs"
include = [
    "src/**/*",
    "examples/**/*",
    "tests/**/*",
    "swift-bridge/Package.swift",
    "swift-bridge/Sources/**/*",
    "build.rs",
    "Cargo.toml",
    "README.md",
    "CHANGELOG.md",
    "COVERAGE.md",
    "LICENSE-*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Safe Rust bindings for Apple's Security framework — keychain, identity, certificates, trust, authorization, CMS, SecureTransport, and cryptographic primitives on macOS"
homepage = "https://github.com/doom-fish/security-rs"
readme = "README.md"
keywords = [
    "security",
    "keychain",
    "certificates",
    "macos",
    "apple",
]
categories = [
    "api-bindings",
    "os::macos-apis",
    "cryptography",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/doom-fish/security-rs"

[package.metadata.docs.rs]
all-features = true
default-target = "aarch64-apple-darwin"
targets = [
    "aarch64-apple-darwin",
    "x86_64-apple-darwin",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[badges.maintenance]
status = "actively-developed"

[features]
default = []
raw-ffi = []

[lib]
name = "security"
crate-type = ["lib"]
path = "src/lib.rs"

[[example]]
name = "01_keychain_password"
path = "examples/01_keychain_password.rs"

[[example]]
name = "02_identity_pkcs12"
path = "examples/02_identity_pkcs12.rs"

[[example]]
name = "03_certificate_inspect"
path = "examples/03_certificate_inspect.rs"

[[example]]
name = "04_policy_properties"
path = "examples/04_policy_properties.rs"

[[example]]
name = "05_trust_evaluate"
path = "examples/05_trust_evaluate.rs"

[[example]]
name = "06_authorization_external_form"
path = "examples/06_authorization_external_form.rs"

[[example]]
name = "07_code_signing_info"
path = "examples/07_code_signing_info.rs"

[[example]]
name = "08_random_bytes"
path = "examples/08_random_bytes.rs"

[[example]]
name = "09_transform_base64"
path = "examples/09_transform_base64.rs"

[[example]]
name = "10_secure_transport_context"
path = "examples/10_secure_transport_context.rs"

[[example]]
name = "11_cms_cert_bag"
path = "examples/11_cms_cert_bag.rs"

[[example]]
name = "12_key_derivation_pbkdf2"
path = "examples/12_key_derivation_pbkdf2.rs"

[[example]]
name = "13_key_agreement_shared_secret"
path = "examples/13_key_agreement_shared_secret.rs"

[[example]]
name = "14_key_import_sign_verify"
path = "examples/14_key_import_sign_verify.rs"

[[test]]
name = "authorization_tests"
path = "tests/authorization_tests.rs"

[[test]]
name = "certificate_tests"
path = "tests/certificate_tests.rs"

[[test]]
name = "cms_tests"
path = "tests/cms_tests.rs"

[[test]]
name = "code_tests"
path = "tests/code_tests.rs"

[[test]]
name = "common"
path = "tests/common.rs"

[[test]]
name = "identity_tests"
path = "tests/identity_tests.rs"

[[test]]
name = "key_agreement_tests"
path = "tests/key_agreement_tests.rs"

[[test]]
name = "key_derivation_tests"
path = "tests/key_derivation_tests.rs"

[[test]]
name = "key_tests"
path = "tests/key_tests.rs"

[[test]]
name = "keychain_tests"
path = "tests/keychain_tests.rs"

[[test]]
name = "policy_tests"
path = "tests/policy_tests.rs"

[[test]]
name = "random_bytes_tests"
path = "tests/random_bytes_tests.rs"

[[test]]
name = "secure_transport_tests"
path = "tests/secure_transport_tests.rs"

[[test]]
name = "transform_tests"
path = "tests/transform_tests.rs"

[[test]]
name = "trust_tests"
path = "tests/trust_tests.rs"

[dependencies.apple-cf]
version = ">=0.4.0, <0.6"

[dependencies.base64]
version = "0.22"

[dependencies.bitflags]
version = "2.6"

[dependencies.libc]
version = "0.2"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]

[profile.release]
debug = 2
strip = "none"