Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(s2n-quic-tls): update s2n-tls dependency to 0.0.8 #1352

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions quic/s2n-quic-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ libc = "0.2"
s2n-codec = { version = "=0.1.0", path = "../../common/s2n-codec", default-features = false }
s2n-quic-core = { version = "=0.4.0", path = "../s2n-quic-core", default-features = false }
s2n-quic-crypto = { version = "=0.4.0", path = "../s2n-quic-crypto", default-features = false }
s2n-tls = { version = "=0.0.7", features = ["quic"] }
s2n-tls = { version = "=0.0.8", features = ["quic"] }

[target.'cfg(all(s2n_quic_unstable, s2n_quic_enable_pq_tls))'.dependencies]
s2n-tls = { version = "=0.0.7", features = ["quic", "pq"] }
s2n-tls = { version = "=0.0.8", features = ["quic", "pq"] }

[dev-dependencies]
checkers = "0.6"
Expand Down
5 changes: 2 additions & 3 deletions quic/s2n-quic-tls/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use s2n_codec::EncoderValue;
use s2n_quic_core::{application::ServerName, crypto::tls, endpoint};
use s2n_tls::raw::{
config::{self, Config},
enums::ClientAuthType,
error::Error,
ffi::s2n_cert_auth_type,
};
use std::sync::Arc;

Expand Down Expand Up @@ -114,8 +114,7 @@ impl Builder {
.as_pem()
.expect("pem is currently the only certificate format supported"),
)?;
self.config
.set_client_auth_type(s2n_cert_auth_type::REQUIRED)?;
self.config.set_client_auth_type(ClientAuthType::Required)?;
Ok(self)
}

Expand Down
5 changes: 2 additions & 3 deletions quic/s2n-quic-tls/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use s2n_quic_core::{application::ServerName, crypto::tls, endpoint};
use s2n_tls::raw::config::ClientHelloHandler;
use s2n_tls::raw::{
config::{self, Config, VerifyClientCertificateHandler},
enums::ClientAuthType,
error::Error,
ffi::s2n_cert_auth_type,
};
use std::sync::Arc;

Expand Down Expand Up @@ -128,8 +128,7 @@ impl Builder {

/// Configures this server instance to require client authentication (mutual TLS).
pub fn with_client_authentication(mut self) -> Result<Self, Error> {
self.config
.set_client_auth_type(s2n_cert_auth_type::REQUIRED)?;
self.config.set_client_auth_type(ClientAuthType::Required)?;
Ok(self)
}

Expand Down
10 changes: 5 additions & 5 deletions quic/s2n-quic-tls/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use s2n_quic_core::{
use s2n_quic_crypto::Suite;
use s2n_tls::raw::{
config::Config,
connection::{self, Connection},
connection::Connection,
enums::{Blinding, Mode},
error::Error,
ffi::s2n_blinding,
};

#[derive(Debug)]
Expand All @@ -37,15 +37,15 @@ impl Session {
server_name: Option<ServerName>,
) -> Result<Self, Error> {
let mut connection = Connection::new(match endpoint {
endpoint::Type::Server => connection::Mode::Server,
endpoint::Type::Client => connection::Mode::Client,
endpoint::Type::Server => Mode::Server,
endpoint::Type::Client => Mode::Client,
});

connection.set_config(config)?;
connection.enable_quic()?;
connection.set_quic_transport_parameters(params)?;
// QUIC handles sending alerts, so no need to apply TLS blinding
connection.set_blinding(s2n_blinding::SELF_SERVICE_BLINDING)?;
connection.set_blinding(Blinding::SelfService)?;

if let Some(server_name) = server_name.as_ref() {
connection
Expand Down