diff --git a/quic/s2n-quic-rustls/src/client.rs b/quic/s2n-quic-rustls/src/client.rs index fa40c62b4e..52d3a3e3ed 100644 --- a/quic/s2n-quic-rustls/src/client.rs +++ b/quic/s2n-quic-rustls/src/client.rs @@ -8,6 +8,7 @@ use s2n_codec::EncoderValue; use s2n_quic_core::{application::ServerName, crypto::tls}; use std::sync::Arc; +#[derive(Clone)] pub struct Client { config: Arc, } @@ -39,6 +40,12 @@ impl From for Client { } } +impl From> for Client { + fn from(config: Arc) -> Self { + Self { config } + } +} + impl tls::Endpoint for Client { type Session = Session; diff --git a/quic/s2n-quic-rustls/src/server.rs b/quic/s2n-quic-rustls/src/server.rs index e55f20c8e6..afb5ee9993 100644 --- a/quic/s2n-quic-rustls/src/server.rs +++ b/quic/s2n-quic-rustls/src/server.rs @@ -7,6 +7,7 @@ use s2n_codec::EncoderValue; use s2n_quic_core::{application::ServerName, crypto::tls}; use std::sync::Arc; +#[derive(Clone)] pub struct Server { config: Arc, } @@ -37,6 +38,12 @@ impl From for Server { } } +impl From> for Server { + fn from(config: Arc) -> Self { + Self { config } + } +} + impl tls::Endpoint for Server { type Session = Session;