Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8584d25
Update rustls dependencies to upstream 0.24
iadev09 Aug 20, 2026
b574c62
Delay handshake data across HelloRetryRequest
iadev09 Aug 28, 2026
b955bfc
Reuse rustls PacketKey for retry integrity
iadev09 Aug 20, 2026
eb78aad
quinn-proto: inline insert_conn into register_connection
stablebits Aug 3, 2026
0afd72d
quinn-proto: register every CID in loc_cids, not just the first
stablebits Aug 3, 2026
47d2534
quinn-proto: move insert_initial into register_connection
stablebits Jun 17, 2026
d174a9b
quinn-proto: rename clean_up_incoming to remove_incoming_state
stablebits Aug 3, 2026
a56def1
quinn-proto: extract remove_incoming_buffer
stablebits Aug 3, 2026
26b4e9d
quinn-proto: route accept's early error paths through ignore()
stablebits Aug 3, 2026
d2eadcb
quinn-proto: construct accept's Connection directly
stablebits Aug 3, 2026
43b4613
quinn: extract State::is_idle
stablebits Aug 3, 2026
8e5cd5a
quinn-proto: register accept's connection after first-packet handling
stablebits Aug 3, 2026
2c4da2a
quinn-proto: route accept CIDs to the pending Incoming
stablebits Aug 3, 2026
76cfe3d
quinn-proto: split server-side accept around endpoint lock
stablebits Aug 3, 2026
ce3041a
quinn-proto: expose split-accept hooks for quinn
stablebits Aug 7, 2026
60638fd
quinn-proto: track pending accepts
stablebits Aug 3, 2026
f358713
quinn-proto: guard split-accept states against improper drop
stablebits Jun 2, 2026
7a28ab2
quinn: release endpoint lock across TLS handshake during accept
stablebits Aug 3, 2026
38a36d8
quinn-proto: add split-accept tests
stablebits May 18, 2026
60c673a
quinn-proto: test accept cleanup on handshake failure
stablebits Jun 2, 2026
54899cd
quinn: add split-accept behavior tests
stablebits Apr 23, 2026
02ca72c
quinn-proto: preserve pending accept buffer limits
stablebits Aug 10, 2026
9cf7b5f
quinn-proto: document split-accept internals
stablebits Aug 10, 2026
a5577b4
Continue rustls server handshakes after ClientHello
iadev09 Aug 20, 2026
848b9d6
Add staged ClientHello processing
iadev09 Aug 20, 2026
176a832
Expose staged ClientHello acceptor on Incoming
iadev09 Aug 20, 2026
0a94356
Test staged ClientHello processing
iadev09 Aug 20, 2026
d1b0edc
Test staged ClientHello acceptor paths
iadev09 Aug 20, 2026
d55fd0d
Delay staged handshake data across HelloRetryRequest
iadev09 Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 56 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ rand = "0.10.1"
rcgen = "0.14"
ring = "0.17"
rustc-hash = "2"
rustls = { version = "0.23.5", default-features = false, features = ["std"] }
rustls-platform-verifier = "0.7"
rustls = { version = "0.24.0-dev.1", git = "https://github.com/rustls/rustls.git", branch = "main", default-features = false, features = ["webpki"] }
rustls-aws-lc-rs = { version = "0.1.0-dev.1", git = "https://github.com/rustls/rustls.git", branch = "main", default-features = false, features = ["aws-lc-sys", "std"] }
rustls-platform-verifier = { version = "0.8.0", git = "https://github.com/iadev09/rustls-platform-verifier.git", rev = "df094724adf95136d5d09cf6d54296a3e809fff8", default-features = false }
rustls-ring = { version = "0.1.0-dev.1", git = "https://github.com/rustls/rustls.git", branch = "main", default-features = false, features = ["std"] }
rustls-util = { version = "0.1.0-dev.1", git = "https://github.com/rustls/rustls.git", branch = "main" }
rustls-pki-types = "1.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
Expand Down
3 changes: 2 additions & 1 deletion bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ anyhow = { workspace = true }
bytes = { workspace = true }
clap = { workspace = true }
hdrhistogram = { workspace = true }
quinn = { path = "../quinn", features = ["ring"] }
quinn = { path = "../quinn" }
rcgen = { workspace = true }
rustls = { workspace = true }
rustls-aws-lc-rs = { workspace = true }
tokio = { workspace = true, features = ["rt"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
Expand Down
17 changes: 6 additions & 11 deletions bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,12 @@ pub async fn connect_client(
let mut roots = RootCertStore::empty();
roots.add(server_cert)?;

let default_provider = rustls::crypto::ring::default_provider();
let provider = rustls::crypto::CryptoProvider {
cipher_suites: vec![opt.cipher.as_rustls()],
..default_provider
};
let mut provider = rustls_aws_lc_rs::DEFAULT_PROVIDER;
provider.tls13_cipher_suites = vec![opt.cipher.as_rustls()].into();

let crypto = rustls::ClientConfig::builder_with_provider(provider.into())
.with_protocol_versions(&[&rustls::version::TLS13])
.unwrap()
let crypto = rustls::ClientConfig::builder(Arc::new(provider))
.with_root_certificates(roots)
.with_no_client_auth();
.with_no_client_auth()?;

let mut client_config = quinn::ClientConfig::new(Arc::new(QuicClientConfig::try_from(crypto)?));
client_config.transport_config(Arc::new(transport_config(&opt)));
Expand Down Expand Up @@ -230,8 +225,8 @@ pub enum CipherSuite {
}

impl CipherSuite {
pub fn as_rustls(self) -> rustls::SupportedCipherSuite {
use rustls::crypto::ring::cipher_suite;
pub fn as_rustls(self) -> &'static rustls::Tls13CipherSuite {
use rustls_aws_lc_rs::cipher_suite;
match self {
Self::Aes128 => cipher_suite::TLS13_AES_128_GCM_SHA256,
Self::Aes256 => cipher_suite::TLS13_AES_256_GCM_SHA384,
Expand Down
1 change: 1 addition & 0 deletions docs/book/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ bytes = { workspace = true }
quinn = { version = "0.12.0", path = "../../quinn" }
rcgen.workspace = true
rustls.workspace = true
rustls-ring.workspace = true
73 changes: 31 additions & 42 deletions docs/book/src/bin/certificate.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
use std::{error::Error, sync::Arc};
use std::{error::Error, hash::Hasher, sync::Arc};

use quinn::{
ClientConfig,
crypto::rustls::{NoInitialCipherSuite, QuicClientConfig},
};
use quinn::{ClientConfig, crypto::rustls::QuicClientConfig};
use rustls::{
DigitallySignedStruct, SignatureScheme,
client::danger,
crypto::{CryptoProvider, verify_tls12_signature, verify_tls13_signature},
pki_types::{
CertificateDer, PrivateKeyDer, PrivatePkcs8KeyDer, ServerName, UnixTime, pem::PemObject,
},
pki_types::{CertificateDer, PrivateKeyDer, PrivatePkcs8KeyDer, pem::PemObject},
};

#[allow(unused_variables)]
Expand All @@ -22,69 +16,64 @@ fn main() {
}

#[allow(dead_code)] // Included in `certificate.md`
fn configure_client() -> Result<ClientConfig, NoInitialCipherSuite> {
let crypto = rustls::ClientConfig::builder()
fn configure_client() -> Result<ClientConfig, Box<dyn Error>> {
let crypto = rustls::ClientConfig::builder(Arc::new(rustls_ring::DEFAULT_PROVIDER))
.dangerous()
.with_custom_certificate_verifier(SkipServerVerification::new())
.with_no_client_auth();
.with_no_client_auth()?;

Ok(ClientConfig::new(Arc::new(QuicClientConfig::try_from(
crypto,
)?)))
}

// Implementation of `ServerCertVerifier` that verifies everything as trustworthy.
// Implementation of `ServerVerifier` that verifies everything as trustworthy.
#[derive(Debug)]
struct SkipServerVerification(Arc<CryptoProvider>);

impl SkipServerVerification {
fn new() -> Arc<Self> {
Arc::new(Self(Arc::new(rustls::crypto::ring::default_provider())))
Arc::new(Self(Arc::new(rustls_ring::DEFAULT_PROVIDER)))
}
}

impl danger::ServerCertVerifier for SkipServerVerification {
fn verify_server_cert(
impl danger::ServerVerifier for SkipServerVerification {
fn verify_identity<'a>(
&self,
_end_entity: &CertificateDer<'_>,
_intermediates: &[CertificateDer<'_>],
_server_name: &ServerName<'_>,
_ocsp: &[u8],
_now: UnixTime,
) -> Result<danger::ServerCertVerified, rustls::Error> {
Ok(danger::ServerCertVerified::assertion())
identity: &danger::ServerIdentity<'a, '_>,
) -> Result<rustls::crypto::VerifiedIdentity<'a>, rustls::Error> {
Ok(rustls::crypto::VerifiedIdentity::assertion(
identity.identity.clone(),
))
}

fn verify_tls12_signature(
&self,
message: &[u8],
cert: &CertificateDer<'_>,
dss: &DigitallySignedStruct,
input: &danger::SignatureVerificationInput<'_>,
) -> Result<danger::HandshakeSignatureValid, rustls::Error> {
verify_tls12_signature(
message,
cert,
dss,
&self.0.signature_verification_algorithms,
)
verify_tls12_signature(input, &self.0.signature_verification_algorithms)
}

fn verify_tls13_signature(
&self,
message: &[u8],
cert: &CertificateDer<'_>,
dss: &DigitallySignedStruct,
input: &danger::SignatureVerificationInput<'_>,
) -> Result<danger::HandshakeSignatureValid, rustls::Error> {
verify_tls13_signature(
message,
cert,
dss,
&self.0.signature_verification_algorithms,
)
verify_tls13_signature(input, &self.0.signature_verification_algorithms)
}

fn supported_verify_schemes(&self) -> Vec<SignatureScheme> {
fn supported_verify_schemes(&self) -> Vec<rustls::crypto::SignatureScheme> {
self.0.signature_verification_algorithms.supported_schemes()
}

fn request_ocsp_response(&self) -> bool {
false
}

fn hash_config(&self, h: &mut dyn Hasher) {
for scheme in self.supported_verify_schemes() {
h.write_u16(scheme.0);
}
}
}

fn generate_self_signed_cert()
Expand Down
Loading