pub struct SslInfo<'a>(/* private fields */);
Expand description
SSL information from a PROXY protocol header
Implementations§
Source§impl<'a> SslInfo<'a>
impl<'a> SslInfo<'a>
Sourcepub fn new(
client_ssl: bool,
client_cert_conn: bool,
client_cert_sess: bool,
verify: u32,
) -> Self
pub fn new( client_ssl: bool, client_cert_conn: bool, client_cert_sess: bool, verify: u32, ) -> Self
Create a new SSL information struct
Sourcepub fn client_ssl(&self) -> bool
pub fn client_ssl(&self) -> bool
Client connected over SSL/TLS
The PP2_CLIENT_SSL flag indicates that the client connected over SSL/TLS. When this field is present, the US-ASCII string representation of the TLS version is appended at the end of the field in the TLV format using the type PP2_SUBTYPE_SSL_VERSION.
Sourcepub fn client_cert_conn(&self) -> bool
pub fn client_cert_conn(&self) -> bool
Client certificate presented in the connection
PP2_CLIENT_CERT_CONN indicates that the client provided a certificate over the current connection.
Sourcepub fn client_cert_sess(&self) -> bool
pub fn client_cert_sess(&self) -> bool
Client certificate presented in the session
PP2_CLIENT_CERT_SESS indicates that the client provided a certificate at least once over the TLS session this connection belongs to.
Sourcepub fn verify(&self) -> u32
pub fn verify(&self) -> u32
Whether the certificate was verified
The verify field will be zero if the client presented a certificate and it was successfully verified, and non-zero otherwise.
Sourcepub fn version(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
SSL version
See Tlv::SslVersion
for more information.
Sourcepub fn cn(&self) -> Option<&str>
pub fn cn(&self) -> Option<&str>
SSL CN
See Tlv::SslCn
for more information.
Sourcepub fn cipher(&self) -> Option<&str>
pub fn cipher(&self) -> Option<&str>
SSL cipher
See Tlv::SslCipher
for more information.
Sourcepub fn sig_alg(&self) -> Option<&str>
pub fn sig_alg(&self) -> Option<&str>
SSL signature algorithm
See Tlv::SslSigAlg
for more information.
Sourcepub fn key_alg(&self) -> Option<&str>
pub fn key_alg(&self) -> Option<&str>
SSL key algorithm
See Tlv::SslKeyAlg
for more information.
Sourcepub fn into_owned(self) -> SslInfo<'static>
pub fn into_owned(self) -> SslInfo<'static>
Returns an owned version of this struct
Sourcepub fn append_tlv(&mut self, tlv: Tlv<'_>)
pub fn append_tlv(&mut self, tlv: Tlv<'_>)
Appends an additional sub-TLV field
See ProxyHeader::append_tlv
for more information.