diff options
Diffstat (limited to 'src/cert.rs')
-rw-r--r-- | src/cert.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cert.rs b/src/cert.rs index de0d821..0be43f3 100644 --- a/src/cert.rs +++ b/src/cert.rs @@ -1,3 +1,5 @@ +use std::sync::Arc; + use anyhow::Result; use chrono::{Date, NaiveDate, Utc}; @@ -17,7 +19,7 @@ pub struct CertSer { pub struct Cert { pub ser: CertSer, - pub certkey: CertifiedKey, + pub certkey: Arc<CertifiedKey>, } impl Cert { @@ -46,7 +48,7 @@ impl Cert { bail!("{} keys present in pem file", keys.len()); } - let certkey = CertifiedKey::new(certs, keys.into_iter().next().unwrap()); + let certkey = Arc::new(CertifiedKey::new(certs, keys.into_iter().next().unwrap())); Ok(Cert { ser, certkey }) } |