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
12
use security::{Code, Task};

#[test]
fn inspects_current_process() -> security::Result<()> {
    let code = Code::current()?;
    let static_code = code.static_code()?;
    assert!(static_code.path()?.exists());
    let _ = static_code.check_validity();
    let _ = code.signing_information()?;
    let _ = Task::current()?.signing_identifier()?;
    Ok(())
}