mirror of https://github.com/ctz/rustls
Don't set legacy_session_id for QUIC
This commit is contained in:
parent
f07f8b135d
commit
70c558b186
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue