pub struct Tls { /* private fields */ }Expand description
Fields related to a TLS connection. These fields focus on the TLS protocol itself and intentionally avoids in-depth analysis of the related x.509 certificate files.
Implementations§
Source§impl Tls
impl Tls
Sourcepub fn get_version(&self) -> Option<&String>
pub fn get_version(&self) -> Option<&String>
Numeric part of the version parsed from the original string.
Sourcepub fn set_version(&mut self, version_arg: String)
pub fn set_version(&mut self, version_arg: String)
Sourcepub fn get_version_protocol(&self) -> Option<&String>
pub fn get_version_protocol(&self) -> Option<&String>
Normalized lowercase protocol name parsed from original string.
Sourcepub fn set_version_protocol(&mut self, version_protocol_arg: String)
pub fn set_version_protocol(&mut self, version_protocol_arg: String)
Sourcepub fn get_cipher(&self) -> Option<&String>
pub fn get_cipher(&self) -> Option<&String>
String indicating the cipher used during the current connection.
Sourcepub fn set_cipher(&mut self, cipher_arg: String)
pub fn set_cipher(&mut self, cipher_arg: String)
String indicating the cipher used during the current connection.
§Example
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
Sourcepub fn get_curve(&self) -> Option<&String>
pub fn get_curve(&self) -> Option<&String>
String indicating the curve used for the given cipher, when applicable.
Sourcepub fn get_resumed(&self) -> Option<&bool>
pub fn get_resumed(&self) -> Option<&bool>
Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
Sourcepub fn set_resumed(&mut self, resumed_arg: bool)
pub fn set_resumed(&mut self, resumed_arg: bool)
Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.
Sourcepub fn get_established(&self) -> Option<&bool>
pub fn get_established(&self) -> Option<&bool>
Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.
Sourcepub fn set_established(&mut self, established_arg: bool)
pub fn set_established(&mut self, established_arg: bool)
Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.
Sourcepub fn get_next_protocol(&self) -> Option<&String>
pub fn get_next_protocol(&self) -> Option<&String>
String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.
Sourcepub fn set_next_protocol(&mut self, next_protocol_arg: String)
pub fn set_next_protocol(&mut self, next_protocol_arg: String)
String indicating the protocol being tunneled. Per the values in the IANA registry (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.
§Example
http/1.1
Sourcepub fn get_client_ja3(&self) -> Option<&String>
pub fn get_client_ja3(&self) -> Option<&String>
A hash that identifies clients based on how they perform an SSL/TLS handshake.
Sourcepub fn set_client_ja3(&mut self, client_ja3_arg: String)
pub fn set_client_ja3(&mut self, client_ja3_arg: String)
A hash that identifies clients based on how they perform an SSL/TLS handshake.
§Example
d4e5b18d6b55c71272893221c96ba240
Sourcepub fn get_client_server_name(&self) -> Option<&String>
pub fn get_client_server_name(&self) -> Option<&String>
Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to destination.domain.
Sourcepub fn set_client_server_name(&mut self, client_server_name_arg: String)
pub fn set_client_server_name(&mut self, client_server_name_arg: String)
Also called an SNI, this tells the server which hostname to which the client is attempting to connect to. When this value is available, it should get copied to destination.domain.
§Example
www.elastic.co
Sourcepub fn get_client_supported_ciphers(&self) -> &Vec<String>
pub fn get_client_supported_ciphers(&self) -> &Vec<String>
Array of ciphers offered by the client during the client hello.
Sourcepub fn add_client_supported_cipher(
&mut self,
client_supported_cipher_arg: String,
)
pub fn add_client_supported_cipher( &mut self, client_supported_cipher_arg: String, )
Array of ciphers offered by the client during the client hello.
§Example
["TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."]
Sourcepub fn get_client_subject(&self) -> Option<&String>
pub fn get_client_subject(&self) -> Option<&String>
Distinguished name of subject of the x.509 certificate presented by the client.
Sourcepub fn set_client_subject(&mut self, client_subject_arg: String)
pub fn set_client_subject(&mut self, client_subject_arg: String)
Distinguished name of subject of the x.509 certificate presented by the client.
§Example
CN=myclient, OU=Documentation Team, DC=example, DC=com
Sourcepub fn get_client_issuer(&self) -> Option<&String>
pub fn get_client_issuer(&self) -> Option<&String>
Distinguished name of subject of the issuer of the x.509 certificate presented by the client.
Sourcepub fn set_client_issuer(&mut self, client_issuer_arg: String)
pub fn set_client_issuer(&mut self, client_issuer_arg: String)
Distinguished name of subject of the issuer of the x.509 certificate presented by the client.
§Example
CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com
Sourcepub fn get_client_not_before(&self) -> Option<&Timestamp>
pub fn get_client_not_before(&self) -> Option<&Timestamp>
Date/Time indicating when client certificate is first considered valid.
Sourcepub fn set_client_not_before(&mut self, client_not_before_arg: Timestamp)
pub fn set_client_not_before(&mut self, client_not_before_arg: Timestamp)
Date/Time indicating when client certificate is first considered valid.
§Example
1970-01-01T00:00:00.000Z
Sourcepub fn get_client_not_after(&self) -> Option<&Timestamp>
pub fn get_client_not_after(&self) -> Option<&Timestamp>
Date/Time indicating when client certificate is no longer considered valid.
Sourcepub fn set_client_not_after(&mut self, client_not_after_arg: Timestamp)
pub fn set_client_not_after(&mut self, client_not_after_arg: Timestamp)
Date/Time indicating when client certificate is no longer considered valid.
§Example
2021-01-01T00:00:00.000Z
Sourcepub fn get_client_certificate_chain(&self) -> &Vec<String>
pub fn get_client_certificate_chain(&self) -> &Vec<String>
Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of client.certificate since that value should be the first certificate in the chain.
Sourcepub fn add_client_certificate_chain(
&mut self,
client_certificate_chain_arg: String,
)
pub fn add_client_certificate_chain( &mut self, client_certificate_chain_arg: String, )
Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of client.certificate since that value should be the first certificate in the chain.
§Example
["MII...", "MII..."]
Sourcepub fn get_client_certificate(&self) -> Option<&String>
pub fn get_client_certificate(&self) -> Option<&String>
PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of client.certificate_chain since this value also exists in that list.
Sourcepub fn set_client_certificate(&mut self, client_certificate_arg: String)
pub fn set_client_certificate(&mut self, client_certificate_arg: String)
PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of client.certificate_chain since this value also exists in that list.
§Example
MII...
Sourcepub fn get_client_hash_md5(&self) -> Option<&String>
pub fn get_client_hash_md5(&self) -> Option<&String>
Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_client_hash_md5(&mut self, client_hash_md5_arg: String)
pub fn set_client_hash_md5(&mut self, client_hash_md5_arg: String)
Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC
Sourcepub fn get_client_hash_sha1(&self) -> Option<&String>
pub fn get_client_hash_sha1(&self) -> Option<&String>
Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_client_hash_sha1(&mut self, client_hash_sha1_arg: String)
pub fn set_client_hash_sha1(&mut self, client_hash_sha1_arg: String)
Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
9E393D93138888D288266C2D915214D1D1CCEB2A
Sourcepub fn get_client_hash_sha256(&self) -> Option<&String>
pub fn get_client_hash_sha256(&self) -> Option<&String>
Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_client_hash_sha256(&mut self, client_hash_sha256_arg: String)
pub fn set_client_hash_sha256(&mut self, client_hash_sha256_arg: String)
Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0
Sourcepub fn get_server_ja3s(&self) -> Option<&String>
pub fn get_server_ja3s(&self) -> Option<&String>
A hash that identifies servers based on how they perform an SSL/TLS handshake.
Sourcepub fn set_server_ja3s(&mut self, server_ja3s_arg: String)
pub fn set_server_ja3s(&mut self, server_ja3s_arg: String)
A hash that identifies servers based on how they perform an SSL/TLS handshake.
§Example
394441ab65754e2207b1e1b457b3641d
Sourcepub fn get_server_subject(&self) -> Option<&String>
pub fn get_server_subject(&self) -> Option<&String>
Subject of the x.509 certificate presented by the server.
Sourcepub fn set_server_subject(&mut self, server_subject_arg: String)
pub fn set_server_subject(&mut self, server_subject_arg: String)
Subject of the x.509 certificate presented by the server.
§Example
CN=www.example.com, OU=Infrastructure Team, DC=example, DC=com
Sourcepub fn get_server_issuer(&self) -> Option<&String>
pub fn get_server_issuer(&self) -> Option<&String>
Subject of the issuer of the x.509 certificate presented by the server.
Sourcepub fn set_server_issuer(&mut self, server_issuer_arg: String)
pub fn set_server_issuer(&mut self, server_issuer_arg: String)
Subject of the issuer of the x.509 certificate presented by the server.
§Example
CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com
Sourcepub fn get_server_not_before(&self) -> Option<&Timestamp>
pub fn get_server_not_before(&self) -> Option<&Timestamp>
Timestamp indicating when server certificate is first considered valid.
Sourcepub fn set_server_not_before(&mut self, server_not_before_arg: Timestamp)
pub fn set_server_not_before(&mut self, server_not_before_arg: Timestamp)
Timestamp indicating when server certificate is first considered valid.
§Example
1970-01-01T00:00:00.000Z
Sourcepub fn get_server_not_after(&self) -> Option<&Timestamp>
pub fn get_server_not_after(&self) -> Option<&Timestamp>
Timestamp indicating when server certificate is no longer considered valid.
Sourcepub fn set_server_not_after(&mut self, server_not_after_arg: Timestamp)
pub fn set_server_not_after(&mut self, server_not_after_arg: Timestamp)
Timestamp indicating when server certificate is no longer considered valid.
§Example
2021-01-01T00:00:00.000Z
Sourcepub fn get_server_certificate_chain(&self) -> &Vec<String>
pub fn get_server_certificate_chain(&self) -> &Vec<String>
Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of server.certificate since that value should be the first certificate in the chain.
Sourcepub fn add_server_certificate_chain(
&mut self,
server_certificate_chain_arg: String,
)
pub fn add_server_certificate_chain( &mut self, server_certificate_chain_arg: String, )
Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of server.certificate since that value should be the first certificate in the chain.
§Example
["MII...", "MII..."]
Sourcepub fn get_server_certificate(&self) -> Option<&String>
pub fn get_server_certificate(&self) -> Option<&String>
PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of server.certificate_chain since this value also exists in that list.
Sourcepub fn set_server_certificate(&mut self, server_certificate_arg: String)
pub fn set_server_certificate(&mut self, server_certificate_arg: String)
PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of server.certificate_chain since this value also exists in that list.
§Example
MII...
Sourcepub fn get_server_hash_md5(&self) -> Option<&String>
pub fn get_server_hash_md5(&self) -> Option<&String>
Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_server_hash_md5(&mut self, server_hash_md5_arg: String)
pub fn set_server_hash_md5(&mut self, server_hash_md5_arg: String)
Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC
Sourcepub fn get_server_hash_sha1(&self) -> Option<&String>
pub fn get_server_hash_sha1(&self) -> Option<&String>
Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_server_hash_sha1(&mut self, server_hash_sha1_arg: String)
pub fn set_server_hash_sha1(&mut self, server_hash_sha1_arg: String)
Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
9E393D93138888D288266C2D915214D1D1CCEB2A
Sourcepub fn get_server_hash_sha256(&self) -> Option<&String>
pub fn get_server_hash_sha256(&self) -> Option<&String>
Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
Sourcepub fn set_server_hash_sha256(&mut self, server_hash_sha256_arg: String)
pub fn set_server_hash_sha256(&mut self, server_hash_sha256_arg: String)
Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.
§Example
0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0