Skip to content

Commit

Permalink
Roll dependency updates (Nov 2023)
Browse files Browse the repository at this point in the history
Resolve incompatibilities as follows:

- src/certificate.rs: RustCrypto/formats#771
- src/cmd/serve.rs: Move to FromRequestParts and use headers crate

- src/ecdsa_sha256.rs: RustCrypto/traits#1196
  and RustCrypto/signatures#574

- src/error.rs: Remove Duplicates

- src/identity.rs: Remove owned validation logic as it should be done at
    x509_cert::serial_number::SerialNumber<x509_cert::certificate::Rfc5280>

- src/sign.rs: RustCrypto/RSA#244
  • Loading branch information
sorah committed Nov 4, 2023
1 parent 8f73386 commit 9a16a3f
Show file tree
Hide file tree
Showing 8 changed files with 1,011 additions and 703 deletions.
1,254 changes: 695 additions & 559 deletions Cargo.lock

Large diffs are not rendered by default.

71 changes: 37 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,50 @@ native-tls = ["reqwest/default-tls"]
rustls = ["reqwest/rustls-tls-native-roots"]

[dependencies]
anyhow = "1.0.65"
async-trait = "0.1.57"
axum = "0.5.16"
base16ct = { version = "0.1.1", features = ["alloc"]}
base64ct = { version = "1.5.2", features = ["alloc"]}
bytes = "1.2.1"
chrono = { version = "0.4.22", features = ["serde"] }
anyhow = "1.0.75"
async-trait = "0.1.74"
axum = "0.6.20"
base16ct = { version = "0.2.0", features = ["alloc"]}
base64ct = { version = "1.6.0", features = ["alloc"]}
bytes = "1.5.0"
chrono = { version = "0.4.31", features = ["serde"] }
clap = { version = "3.2.22", features = ["cargo", "env", "derive"] }
crypto-bigint = { version = "0.4.8", features = ["generic-array"] }
crypto-bigint = { version = "0.5.3", features = ["generic-array"] }
digest = { version = "0.10.5", features = ["mac"] }
ecdsa = { version = "0.14.8", features = ["std", "digest", "sign", "verify", "pkcs8", "pem", "hazmat"] }
elliptic-curve = { version = "0.12.3", features = ["arithmetic", "pem", "alloc", "std", "sec1", "hazmat"] }
generic-array = "0.14.6"
http = "0.2.8"
ecdsa = { version = "0.16.8", features = ["std", "digest", "signing", "verifying", "pkcs8", "pem", "hazmat"] }
elliptic-curve = { version = "0.13.6", features = ["arithmetic", "pem", "alloc", "std", "sec1", "hazmat"] }
generic-array = "1.0.0"
headers = "0.3.9"
http = "0.2.9"
listenfd = "1.0.0"
num-bigint = "0.4.3"
once_cell = "1.15.0"
p256 = "0.11.1"
p384 = "0.11.2"
pem-rfc7468 = { version = "0.6.0" , features = ["alloc", "std"] }
pkcs1 = { version = "0.4.0", features = ["alloc", "std", "pem", "pkcs8"] }
pkcs8 = { version = "0.9.0", features = ["alloc", "std", "pem"]}
once_cell = "1.18.0"
p256 = "0.13.2"
p384 = "0.13.0"
pem-rfc7468 = { version = "0.7.0" , features = ["alloc", "std"] }
pkcs1 = { version = "0.7.5", features = ["alloc", "std", "pem", "pkcs8"] }
pkcs8 = { version = "0.10.2", features = ["alloc", "std", "pem"]}
rand = "0.8.5"
regex = "1.6.0"
reqwest = { version = "0.11.12", features = ["json"], default-features = false }
rfc6979 = "0.3.0"
rsa = { version = "0.6.1", features = ["std", "pem"] }
sec1 = { version = "0.3.0", features = ["alloc", "std", "pem", "pkcs8"] }
reqwest = { version = "0.11.22", features = ["json"], default-features = false }
rfc6979 = "0.4.0"
rsa = { version = "0.9.3", features = ["std", "pem"] }
sec1 = { version = "0.7.3", features = ["alloc", "std", "pem", "pkcs8"] }
secrecy = { version = "0.8.0", features = ["serde", "bytes"] }
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.85"
sha2 = "0.10.6"
thiserror = "1.0.37"
tokio = { version = "1.21.2", features = ["net", "macros", "rt-multi-thread", "fs"] }
tracing = "0.1.36"
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
url = "2.3.1"
x509-cert = { version = "0.1.0", features = ["alloc", "pem", "std"] }
zeroize = { version = "1.5.7", features = ["derive", "std", "alloc"] }
serde = { version = "1.0.190", features = ["derive"] }
serde_json = "1.0.108"
sha2 = { version = "0.10.8", features = ["oid"] }
thiserror = "1.0.50"
tokio = { version = "1.33.0", features = ["net", "macros", "rt-multi-thread", "fs"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
url = "2.4.1"
x509-cert = { version = "0.2.4", features = ["pem", "std"] }
zeroize = { version = "1.6.0", features = ["derive", "std", "alloc"] }

[dev-dependencies]
indoc = "1.0.7"
openssl = "0.10.42"
hyper = "0.14.27"
indoc = "2.0.4"
openssl = "0.10.59"
temp-dir = "0.1.11"
tower = "0.4.13"
15 changes: 11 additions & 4 deletions src/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,19 @@ mod test {

for name in subject {
let frag = name.0.get(0).unwrap();
// id-at-commonName
if frag.oid == "2.5.4.3".parse().unwrap() {
let value = match frag.value.tag() {
x509_cert::der::Tag::Utf8String => frag.value.utf8_string().unwrap().as_str(),
x509_cert::der::Tag::PrintableString => {
frag.value.printable_string().unwrap().as_str()
}
x509_cert::der::Tag::Utf8String => frag
.value
.decode_as::<x509_cert::der::asn1::Utf8StringRef>()
.unwrap()
.as_str(),
x509_cert::der::Tag::PrintableString => frag
.value
.decode_as::<x509_cert::der::asn1::PrintableStringRef>()
.unwrap()
.as_str(),
_ => panic!("unknown tag"),
};
return Some(value);
Expand Down
Loading

0 comments on commit 9a16a3f

Please sign in to comment.