message: remove trivial wrapper method

This commit is contained in:
Dirkjan Ochtman 2021-04-22 14:07:34 +02:00
parent 6b71c368f9
commit 00181a46be
3 changed files with 2 additions and 6 deletions

View File

@ -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(),

View File

@ -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?

View File

@ -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.