orbit_rustls/lib.rs
1//! Fleet-shared rustls state over Orbit shared memory.
2//!
3//! The public adapters implement the enabled rustls version's
4//! `server::StoresServerSessions` trait and, with rustls 0.24,
5//! `client::ClientSessionStore`. The underlying tables are connected to rustls
6//! only through version-specific adapters: they import no rustls types and
7//! treat rustls-generated keys and encoded values as opaque, sensitive bytes.
8//! rustls owns generation, encoding, and validation; this crate owns bounded
9//! storage, TTL, and atomic single-use `take` across fleet processes.
10//!
11//! This crate is not an application or web-session store. Its table is lossy,
12//! fixed-capacity, and allowed to turn a missing entry into a full TLS
13//! handshake. Application sessions normally require reusable reads, explicit
14//! durability, and different eviction guarantees.
15
16#[cfg(not(unix))]
17compile_error!("orbit-rustls currently requires a Unix target");
18
19#[cfg(unix)]
20mod session;
21
22#[cfg(all(unix, feature = "rustls_0_24"))]
23pub use session::{
24 CLIENT_SESSION_STATE_KIND, FleetClientSessions, OrbitClientSessionStorage,
25};
26#[cfg(unix)]
27pub use session::{
28 DEFAULT_SESSION_TTL, FleetServerSessions, MAX_SESSION_TTL,
29 OrbitServerSessionStorage, OrbitSessionStorage, SERVER_SESSION_STATE_KIND,
30 SessionDomain,
31};