diff options
author | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2023-07-11 19:25:37 +0200 |
---|---|---|
committer | Henauxg <19689618+Henauxg@users.noreply.github.com> | 2023-07-11 19:25:37 +0200 |
commit | a2228d0a2d6de96190484d0e4db84db16d4a9854 (patch) | |
tree | 742c80d6308309f38ea74af32498f19d60b0e8b4 | |
parent | 6f58c6bc611d4a207607899e781dfbd4a40e3001 (diff) |
[cargo] Update quinn and rustls versions
-rw-r--r-- | Cargo.lock | 73 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | src/client/certificate.rs | 19 |
3 files changed, 43 insertions, 55 deletions
@@ -2401,9 +2401,9 @@ checksum = "332cd62e95873ea4f41f3dfd6bbbfc5b52aec892d7e8d534197c4720a0bbbab2" [[package]] name = "quinn" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445cbfe2382fa023c4f2f3c7e1c95c03dcc1df2bf23cebcb2b13e1402c4394d1" +checksum = "21252f1c0fc131f1b69182db8f34837e8a69737b8251dff75636a9be0518c324" dependencies = [ "bytes", "pin-project-lite", @@ -2414,14 +2414,13 @@ dependencies = [ "thiserror", "tokio", "tracing", - "webpki", ] [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "85af4ed6ee5a89f26a26086e9089a6643650544c025158449a3626ebf72884b3" dependencies = [ "bytes", "rand", @@ -2433,20 +2432,19 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki", ] [[package]] name = "quinn-udp" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +checksum = "6df19e284d93757a9fb91d63672f7741b129246a669db09d1c0063071debc0c0" dependencies = [ + "bytes", "libc", - "quinn-proto", - "socket2", + "socket2 0.5.3", "tracing", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -2633,13 +2631,13 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] @@ -2664,6 +2662,16 @@ dependencies = [ ] [[package]] +name = "rustls-webpki" +version = "0.101.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2802,6 +2810,16 @@ dependencies = [ ] [[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2959,7 +2977,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio-macros", "windows-sys 0.48.0", ] @@ -3242,16 +3260,6 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] name = "wgpu" version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3432,21 +3440,6 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" @@ -13,14 +13,14 @@ exclude = ["assets/"] [dependencies] bevy = { version = "0.11.0", default-features = false, features = [] } -rustls = { version = "0.20.6", default-features = false, features = ["quic", "dangerous_configuration"] } +rustls = { version = "0.21.0", default-features = false, features = ["quic", "dangerous_configuration"] } rustls-pemfile = "1.0.1" ring = "0.16.20" tokio = { version = "1.21.2", features = ["sync", "rt-multi-thread", "macros"] } tokio-util = { version = "0.7.4", features = ["codec"] } rcgen = "0.10.0" -quinn = "0.9.1" -quinn-proto = "0.9.1" +quinn = "0.10.1" +quinn-proto = "0.10.1" futures-util = "0.3.24" futures = "0.3.24" bincode = "1.3.3" diff --git a/src/client/certificate.rs b/src/client/certificate.rs index 930093c..4dc4a76 100644 --- a/src/client/certificate.rs +++ b/src/client/certificate.rs @@ -259,8 +259,8 @@ impl TofuServerVerification { .unwrap(); match block_on(cert_action_recv) { Ok(action) => self.apply_verifier_immediate_action(&action, status, cert_info), - Err(err) => Err(rustls::Error::InvalidCertificateData(format!( - "Failed to receive CertVerifierAction: {}", + Err(err) => Err(rustls::Error::General(format!( + "Failed to receive CertVerifierAction from client: {}", err ))), } @@ -282,7 +282,7 @@ impl TofuServerVerification { status: status, cert_info, }) { - Ok(_) => Err(rustls::Error::InvalidCertificateData(format!( + Ok(_) => Err(rustls::Error::General(format!( "CertVerifierAction requested to abort the connection" ))), Err(_) => Err(rustls::Error::General(format!( @@ -339,19 +339,14 @@ impl rustls::client::ServerCertVerifier for TofuServerVerification { }; if let Some(ref known_fingerprint) = cert_info.known_fingerprint { if *known_fingerprint == cert_info.fingerprint { - status = Some(CertVerificationStatus::TrustedCertificate); + status = CertVerificationStatus::TrustedCertificate; } else { - status = Some(CertVerificationStatus::UntrustedCertificate); + status = CertVerificationStatus::UntrustedCertificate; } } else { - status = Some(CertVerificationStatus::UnknownCertificate); - } - match status { - Some(status) => self.apply_verifier_behaviour_for_status(status, cert_info), - None => Err(rustls::Error::InvalidCertificateData(format!( - "Internal error, no CertVerificationStatus" - ))), + status = CertVerificationStatus::UnknownCertificate; } + self.apply_verifier_behaviour_for_status(status, cert_info) } } |