aboutsummaryrefslogtreecommitdiff
path: root/src/cert.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-07 15:20:45 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-07 15:20:45 +0100
commitcd7e5ad034b75d659d4d87a752ab7b11cf75de12 (patch)
tree32773f9758b33188402e137d435bdd61ce01b280 /src/cert.rs
parent5535c4951a832d65755afa53822a36e96681320f (diff)
downloadtricot-cd7e5ad034b75d659d4d87a752ab7b11cf75de12.tar.gz
tricot-cd7e5ad034b75d659d4d87a752ab7b11cf75de12.zip
Got a reverse proxy
Diffstat (limited to 'src/cert.rs')
-rw-r--r--src/cert.rs6
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 })
}