mirror of https://github.com/ctz/rustls
Improve concision
This commit is contained in:
parent
70c558b186
commit
b940acce5e
|
@ -25,10 +25,7 @@ use crate::log::{debug, trace};
|
|||
use crate::error::TLSError;
|
||||
use crate::handshake::check_handshake_message;
|
||||
#[cfg(feature = "quic")]
|
||||
use crate::{
|
||||
msgs::base::PayloadU16,
|
||||
session::Protocol
|
||||
};
|
||||
use crate::msgs::base::PayloadU16;
|
||||
|
||||
use crate::client::common::{ServerCertDetails, HandshakeDetails};
|
||||
use crate::client::common::{ClientHelloDetails, ReceivedTicketDetails};
|
||||
|
@ -112,7 +109,7 @@ fn find_session(sess: &mut ClientSessionImpl, dns_name: webpki::DNSNameRef)
|
|||
None
|
||||
} else {
|
||||
#[cfg(feature = "quic")] {
|
||||
if sess.common.protocol == Protocol::Quic {
|
||||
if sess.common.is_quic() {
|
||||
let params = PayloadU16::read(&mut reader)?;
|
||||
sess.common.quic.params = Some(params.0);
|
||||
}
|
||||
|
|
|
@ -305,9 +305,7 @@ pub fn prepare_resumption(sess: &mut ClientSessionImpl,
|
|||
}
|
||||
|
||||
pub fn emit_fake_ccs(hs: &mut HandshakeDetails, sess: &mut ClientSessionImpl) {
|
||||
#[cfg(feature = "quic")] {
|
||||
if let Protocol::Quic = sess.common.protocol { return; }
|
||||
}
|
||||
if sess.common.is_quic() { return; }
|
||||
|
||||
if hs.sent_tls13_fake_ccs {
|
||||
return;
|
||||
|
@ -784,10 +782,7 @@ fn emit_finished_tls13(handshake: &mut HandshakeDetails,
|
|||
|
||||
fn emit_end_of_early_data_tls13(handshake: &mut HandshakeDetails,
|
||||
sess: &mut ClientSessionImpl) {
|
||||
#[cfg(feature = "quic")]
|
||||
{
|
||||
if let Protocol::Quic = sess.common.protocol { return; }
|
||||
}
|
||||
if sess.common.is_quic() { return; }
|
||||
|
||||
let m = Message {
|
||||
typ: ContentType::Handshake,
|
||||
|
|
|
@ -211,9 +211,7 @@ impl CompleteClientHelloHandling {
|
|||
|
||||
fn emit_fake_ccs(&mut self,
|
||||
sess: &mut ServerSessionImpl) {
|
||||
#[cfg(feature = "quic")] {
|
||||
if let Protocol::Quic = sess.common.protocol { return; }
|
||||
}
|
||||
if sess.common.is_quic() { return; }
|
||||
let m = Message {
|
||||
typ: ContentType::ChangeCipherSpec,
|
||||
version: ProtocolVersion::TLSv1_2,
|
||||
|
|
Loading…
Reference in New Issue