mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-17 16:55:16 +00:00
Rename tls::Client to ClientTls
This commit is contained in:
+3
-3
@@ -3,7 +3,7 @@ use futures::{Async, Future, Poll};
|
||||
use crypto::{self, PacketKey};
|
||||
use frame::{Ack, AckFrame, Frame, StreamFrame};
|
||||
use packet::{DRAFT_10, Header, LongType, Packet, PartialDecode};
|
||||
use tls;
|
||||
use tls::ClientTls;
|
||||
use types::Endpoint;
|
||||
|
||||
use std::io;
|
||||
@@ -95,14 +95,14 @@ impl Future for ConnectFuture {
|
||||
|
||||
pub(crate) struct ClientStreamState {
|
||||
pub(crate) endpoint: Endpoint,
|
||||
pub(crate) tls: tls::Client,
|
||||
pub(crate) tls: ClientTls,
|
||||
}
|
||||
|
||||
impl ClientStreamState {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
endpoint: Endpoint::new(),
|
||||
tls: tls::Client::new(),
|
||||
tls: ClientTls::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ use std::sync::Arc;
|
||||
|
||||
use client::ClientStreamState;
|
||||
use server::ServerStreamState;
|
||||
use tls;
|
||||
use tls::{self, ClientTls};
|
||||
use types::Endpoint;
|
||||
|
||||
use self::untrusted::Input;
|
||||
@@ -52,7 +52,7 @@ fn client_state() -> ClientStreamState {
|
||||
webpki::trust_anchor_util::cert_der_as_trust_anchor(Input::from(&bytes)).unwrap();
|
||||
let anchor_vec = vec![anchor];
|
||||
let config = tls::build_client_config(Some(&webpki::TLSServerTrustAnchors(&anchor_vec)));
|
||||
tls::Client::with_config(config)
|
||||
ClientTls::with_config(config)
|
||||
};
|
||||
|
||||
ClientStreamState {
|
||||
|
||||
+5
-5
@@ -15,17 +15,17 @@ pub use rustls::internal::msgs::quic::{Parameter, ServerTransportParameters};
|
||||
pub use rustls::{Certificate, PrivateKey, ServerConfig, Session, TLSError};
|
||||
pub use rustls::quic::ServerSession;
|
||||
|
||||
pub struct Client {
|
||||
pub struct ClientTls {
|
||||
pub session: ClientSession,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
pub fn new() -> Client {
|
||||
impl ClientTls {
|
||||
pub fn new() -> Self {
|
||||
Self::with_config(build_client_config(None))
|
||||
}
|
||||
|
||||
pub fn with_config(config: ClientConfig) -> Client {
|
||||
Client {
|
||||
pub fn with_config(config: ClientConfig) -> Self {
|
||||
Self {
|
||||
session: ClientSession::new(&Arc::new(config)),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user