Update dependencies
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Alex 2022-12-05 17:45:21 +01:00
parent d523c27ae4
commit 43a0fe14b2
Signed by: lx
GPG key ID: 0E496D15096376BE
5 changed files with 1727 additions and 2283 deletions

1424
Cargo.lock generated

File diff suppressed because it is too large Load diff

2557
Cargo.nix

File diff suppressed because it is too large Load diff

View file

@ -7,34 +7,34 @@ authors = ["Alex Auvolat <alex@adnab.me>"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0.28"
anyhow = "1.0.66"
envy = "0.4"
futures = "0.3"
log = "0.4"
pretty_env_logger = "0.4"
regex = "1"
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls-manual-roots" ] }
serde = { version = "1.0.107", features = ["derive"] }
serde_json = "1.0.53"
tokio = { version = "1.0", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] }
serde = { version = "1.0.149", features = ["derive"] }
serde_json = "1.0.89"
tokio = { version = "1.22", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] }
bytes = "1"
acme-micro = "0.12"
rustls = { version = "0.20", features = [ "dangerous_configuration" ] }
rustls-pemfile = "0.2"
rustls-pemfile = "1.0"
chrono = { version = "0.4", features = [ "serde" ] }
hyper = { version = "0.14", features = [ "full" ] }
futures-util = "0.3"
tokio-rustls = "0.23"
hyper-rustls = "0.23"
http = "0.2"
hyper-reverse-proxy = "0.4"
structopt = "0.3"
glob = "0.3"
rcgen = "0.8"
rcgen = "0.10"
accept-encoding-fork = "0.2.0-alpha.3"
async-compression = { version = "0.3", features = ["tokio", "gzip", "zstd", "deflate", "brotli"] }
tokio-util = { version = "0.6", features = ["io"] }
uuid = { version = "0.8.2", features = ["v4"] }
tokio-util = { version = "0.7", features = ["io"] }
uuid = { version = "1.2", features = ["v4"] }
dhat = { version = "0.3", optional = true }
[profile.release]

View file

@ -2,7 +2,7 @@ use std::sync::Arc;
use anyhow::Result;
use chrono::{Date, NaiveDate, Utc};
use chrono::{NaiveDate, Utc};
use rustls::sign::CertifiedKey;
use serde::{Deserialize, Serialize};
@ -54,8 +54,7 @@ impl Cert {
}
pub fn is_old(&self) -> bool {
let date = Date::<Utc>::from_utc(self.ser.date, Utc);
let today = Utc::today();
today - date > chrono::Duration::days(self.ser.valid_days / 2)
let today = Utc::now().date_naive();
today - self.ser.date > chrono::Duration::days(self.ser.valid_days / 2)
}
}

View file

@ -278,7 +278,7 @@ impl CertStore {
let certser = CertSer {
hostname: domain.to_string(),
date: Utc::today().naive_utc(),
date: Utc::now().date_naive(),
valid_days: cert.valid_days_left()?,
key_pem,
cert_pem,
@ -345,7 +345,7 @@ impl CertStore {
let certser = CertSer {
hostname: domain.to_string(),
date: Utc::today().naive_utc(),
date: Utc::now().date_naive(),
valid_days: 1024,
key_pem: cert.serialize_private_key_pem(),
cert_pem: cert.serialize_pem()?,