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
1
2
3
4
5
6
7
8
9
10
11
mod common;

use security::Identity;

#[test]
fn imports_first_pkcs12_identity() -> security::Result<()> {
    let identity = Identity::import_pkcs12_first(&common::fixture("test-identity.p12"), "password")?;
    assert!(identity.chain_count() >= 1);
    assert!(identity.certificate()?.subject_summary()?.is_some());
    Ok(())
}