Don't set legacy_session_id for QUIC

This commit is contained in:
Benjamin Saunders 2020-05-20 19:11:34 -07:00 committed by ctz
parent f07f8b135d
commit 70c558b186
2 changed files with 10 additions and 1 deletions

View File

@ -205,7 +205,7 @@ fn emit_client_hello_for_retry(sess: &mut ClientSessionImpl,
(resuming.session_id, resuming.ticket.0.clone(), resuming.version)
} else {
debug!("Not resuming any session");
if handshake.session_id.is_empty() {
if handshake.session_id.is_empty() && !sess.common.is_quic() {
handshake.session_id = random_sessionid();
}
(handshake.session_id, Vec::new(), ProtocolVersion::Unknown(0))

View File

@ -721,6 +721,15 @@ impl SessionCommon {
let m = Message::build_alert(AlertLevel::Warning, desc);
self.send_msg(m, self.record_layer.is_encrypting());
}
pub fn is_quic(&self) -> bool {
#[cfg(feature = "quic")]
{
self.protocol == Protocol::Quic
}
#[cfg(not(feature = "quic"))]
false
}
}