Rename tls::Client to ClientTls

This commit is contained in:
Dirkjan Ochtman
2018-04-30 13:05:28 +02:00
parent 8215e03b93
commit 19eb91c72b
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -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
View File
@@ -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
View File
@@ -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)),
}
}