Skip to main content

ntex_tls/
types.rs

1//! Types intended for use with [`ntex_io::Filter::query`].
2
3/// A TLS PSK identity.
4///
5/// Used in conjunction with [`ntex_io::Filter::query`]:
6#[derive(Clone, Debug, PartialEq, Eq, Hash)]
7pub struct PskIdentity(pub Vec<u8>);
8
9/// The TLS SNI server name (DNS).
10///
11/// Used in conjunction with [`ntex_io::Filter::query`]:
12#[derive(Clone, Debug, PartialEq, Eq, Hash)]
13pub struct Servername(pub String);
14
15/// The peer's end-entity certificate in DER encoding.
16///
17/// Used in conjunction with [`ntex_io::Filter::query`], supported by all tls
18/// filters.
19#[derive(Clone, Debug, PartialEq, Eq, Hash)]
20pub struct PeerCertDer(pub Vec<u8>);
21
22/// The certificates sent by the peer in DER encoding, the end-entity
23/// certificate first.
24///
25/// Used in conjunction with [`ntex_io::Filter::query`], supported by all tls
26/// filters.
27#[derive(Clone, Debug, PartialEq, Eq, Hash)]
28pub struct PeerCertChainDer(pub Vec<Vec<u8>>);