Trait rustls::StoresServerSessions [] [src]

pub trait StoresServerSessions: Send + Sync {
    fn generate(&self) -> SessionID;
    fn put(&mut self, id: &SessionID, value: Vec<u8>) -> bool;
    fn get(&self, id: &SessionID) -> Option<Vec<u8>>;
    fn del(&mut self, id: &SessionID) -> bool;
}

A trait for the ability to generate Session IDs, and store server session data. The keys and values are opaque.

Both the keys and values should be treated as highly sensitive data, containing enough key material to break all security of the corresponding session.

Required Methods

Generate a session ID.

Store session secrets encoded in value against key id, overwrites any existing value against id. Returns true if the value was stored.

Find a session with the given id. Return it, or None if it doesn't exist.

Erase a session with the given id. Return true if id existed and was removed.

Implementors