02_identity_pkcs12/02_identity_pkcs12.rs
1#[path = "support/mod.rs"]
2mod support;
3
4use security::Identity;
5
6fn main() -> Result<(), Box<dyn std::error::Error>> {
7 let identity = Identity::import_pkcs12_first(&support::fixture("test-identity.p12"), "password")?;
8 let certificate = identity.certificate()?;
9 println!(
10 "label={:?} chain_count={} subject={:?}",
11 identity.label()?,
12 identity.chain_count(),
13 certificate.subject_summary()?
14 );
15 Ok(())
16}