Struct proxy_header::SslInfo
source · 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.
Trait Implementations§
impl<'a> Eq for SslInfo<'a>
impl<'a> StructuralPartialEq for SslInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for SslInfo<'a>
impl<'a> RefUnwindSafe for SslInfo<'a>
impl<'a> Send for SslInfo<'a>
impl<'a> Sync for SslInfo<'a>
impl<'a> Unpin for SslInfo<'a>
impl<'a> UnwindSafe for SslInfo<'a>
Blanket Implementations§
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)