pub struct SessionTicketIssuer(/* private fields */);Expand description
The keys a DTLS server seals its session tickets under (DTLS 1.3 tickets, RFC 8446 section
4.6.1, and DTLS 1.2 tickets, RFC 5077), with the record of the tickets already accepted,
for several configurations to share
(ConfigBuilder::with_session_ticket_issuer):
a ticket one of them issued is accepted, once, by any of them. A configuration given none
makes keys of its own when it is built (ConfigBuilder::with_session_tickets),
which no other configuration can open. Clones share the same keys.
Self::retire wipes them before the last holder is dropped.
Implementations§
Source§impl SessionTicketIssuer
impl SessionTicketIssuer
Sourcepub fn new(
provider: &dyn RTCCryptoProvider,
count: u8,
lifetime: Duration,
) -> Result<Self>
pub fn new( provider: &dyn RTCCryptoProvider, count: u8, lifetime: Duration, ) -> Result<Self>
New random keys, from provider’s random source: count DTLS 1.3 tickets after each
handshake (any count above 0 also issues DTLS 1.2 tickets, one per handshake to a client
that asks for one), each valid for lifetime (at most seven days).
Sourcepub fn retire(&self)
pub fn retire(&self)
Wipes the keys for good, in every clone and every configuration that shares them: the key bytes are zeroized, no ticket is issued from now on, and none of the tickets issued so far is accepted (a client that offers one gets a full handshake). For an application that is done with the sessions these keys protect before the last configuration holding them is dropped (the keys are also zeroized on drop). Associations already established are not affected.
Sourcepub fn is_retired(&self) -> bool
pub fn is_retired(&self) -> bool
Whether the keys were wiped (Self::retire).
Trait Implementations§
Source§impl Clone for SessionTicketIssuer
impl Clone for SessionTicketIssuer
Auto Trait Implementations§
impl Forget for SessionTicketIssuer
impl Freeze for SessionTicketIssuer
impl Move for SessionTicketIssuer
impl RefUnwindSafe for SessionTicketIssuerwhere
Atomic<usize>: RefUnwindSafe,
Mutex<Option<TicketKeys>>: RefUnwindSafe,
Mutex<Option<Instant>>: RefUnwindSafe,
Mutex<HashMap<[u8; 12], u64>>: RefUnwindSafe,
impl Send for SessionTicketIssuer
impl Sync for SessionTicketIssuer
impl Unpin for SessionTicketIssuer
impl UnsafeUnpin for SessionTicketIssuerwhere
*const ArcInner<TicketIssuer> is !null: UnsafeUnpin,
PhantomData<ArcInner<TicketIssuer>>: UnsafeUnpin,
impl UnwindSafe for SessionTicketIssuerwhere
Arc<TicketIssuer>: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.