forked from Deuxfleurs/tricot
correctly warmup cert store
This commit is contained in:
parent
388d5b2275
commit
5a326222c4
1 changed files with 3 additions and 2 deletions
|
@ -254,14 +254,15 @@ impl CertStore {
|
||||||
consul_certs.len()
|
consul_certs.len()
|
||||||
);
|
);
|
||||||
let mut loaded_certs: usize = 0;
|
let mut loaded_certs: usize = 0;
|
||||||
for (domain, cert) in consul_certs {
|
for (key, cert) in consul_certs {
|
||||||
let certser: CertSer = match serde_json::from_slice(&cert) {
|
let certser: CertSer = match serde_json::from_slice(&cert) {
|
||||||
Ok(cs) => cs,
|
Ok(cs) => cs,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!("Could not deserialize CertSer for {domain}: {e}");
|
warn!("Could not deserialize CertSer for {key}: {e}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let domain = certser.hostname.clone();
|
||||||
|
|
||||||
let cert = match Cert::new(certser) {
|
let cert = match Cert::new(certser) {
|
||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
|
|
Loading…
Reference in a new issue