client: move TLs12Resumption enum down

The `ClientConfig` parts should appear before the types it references.
The `Tls12Resumption` enum should appear after the `Resumption` type
that uses it.
This commit is contained in:
Daniel McCarney 2023-12-19 13:24:40 -05:00
parent 20ac87f64f
commit 8285bf1b28
1 changed files with 16 additions and 16 deletions

View File

@ -204,22 +204,6 @@ pub struct ClientConfig {
pub enable_early_data: bool,
}
/// What mechanisms to support for resuming a TLS 1.2 session.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Tls12Resumption {
/// Disable 1.2 resumption.
Disabled,
/// Support 1.2 resumption using session ids only.
SessionIdOnly,
/// Support 1.2 resumption using session ids or RFC 5077 tickets.
///
/// See[^1] for why you might like to disable RFC 5077 by instead choosing the `SessionIdOnly`
/// option. Note that TLS 1.3 tickets do not have those issues.
///
/// [^1]: <https://words.filippo.io/we-need-to-talk-about-session-tickets/>
SessionIdOrTickets,
}
impl Clone for ClientConfig {
fn clone(&self) -> Self {
Self {
@ -386,6 +370,22 @@ impl Default for Resumption {
}
}
/// What mechanisms to support for resuming a TLS 1.2 session.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Tls12Resumption {
/// Disable 1.2 resumption.
Disabled,
/// Support 1.2 resumption using session ids only.
SessionIdOnly,
/// Support 1.2 resumption using session ids or RFC 5077 tickets.
///
/// See[^1] for why you might like to disable RFC 5077 by instead choosing the `SessionIdOnly`
/// option. Note that TLS 1.3 tickets do not have those issues.
///
/// [^1]: <https://words.filippo.io/we-need-to-talk-about-session-tickets/>
SessionIdOrTickets,
}
/// Container for unsafe APIs
pub(super) mod danger {
use alloc::sync::Arc;