Debian Codegraph @

examples/certificate.rs

raw symbols SCIP
1 extern crate sshkeys;
2
3 fn main() {
4 let cert = sshkeys::Certificate::from_path("examples/id_ed25519-cert.pub").unwrap();
5
6 println!("Type: {} {}", cert.key_type.name, cert.cert_type);
7 println!("Public key: {}", cert.key);
8 println!("Signing CA: {}", cert.signature_key);
9 println!("Key ID: {}", cert.key_id);
10 println!("Serial: {}", cert.serial);
11 println!("Valid from {} to {}", cert.valid_after, cert.valid_before);
12 println!("Principals:");
13 for p in cert.valid_principals {
14 println!("\t{}", p);
15 }
16 println!("Critical Options:");
17 for (name, value) in cert.critical_options {
18 println!("\t{} {}", name, value);
19 }
20 println!("Extensions:");
21 for (name, _) in cert.extensions {
22 println!("\t{}", name);
23 }
24 }