mirror of https://github.com/ctz/rustls
message: remove trivial wrapper method
This commit is contained in:
parent
6b71c368f9
commit
00181a46be
|
@ -620,7 +620,7 @@ impl ConnectionCommon {
|
|||
// - prior to determining the version (it's illegal as a first message)
|
||||
// - if it's not a CCS at all
|
||||
// - if we've finished the handshake
|
||||
if msg.is_content_type(ContentType::ChangeCipherSpec) && !self.traffic && self.is_tls13() {
|
||||
if msg.typ == ContentType::ChangeCipherSpec && !self.traffic && self.is_tls13() {
|
||||
if self.received_middlebox_ccs {
|
||||
return Err(Error::PeerMisbehavedError(
|
||||
"illegal middlebox CCS received".into(),
|
||||
|
|
|
@ -36,7 +36,7 @@ impl HandshakeJoiner {
|
|||
|
||||
/// Do we want to process this message?
|
||||
pub fn want_message(&self, msg: &OpaqueMessage) -> bool {
|
||||
msg.is_content_type(ContentType::Handshake)
|
||||
msg.typ == ContentType::Handshake
|
||||
}
|
||||
|
||||
/// Do we have any buffered data?
|
||||
|
|
|
@ -128,10 +128,6 @@ impl OpaqueMessage {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_content_type(&self, typ: ContentType) -> bool {
|
||||
self.typ == typ
|
||||
}
|
||||
|
||||
/// This is the maximum on-the-wire size of a TLSCiphertext.
|
||||
/// That's 2^14 payload bytes, a header, and a 2KB allowance
|
||||
/// for ciphertext overheads.
|
||||
|
|
Loading…
Reference in New Issue