#[non_exhaustive]pub enum CipherSuite {
Tls13Aes128GcmSha256,
Tls13Aes256GcmSha384,
Tls13Chacha20Poly1305Sha256,
Tls12EcdheEcdsaAes128GcmSha256,
Tls12EcdheEcdsaAes256GcmSha384,
Tls12EcdheRsaAes128GcmSha256,
Tls12EcdheRsaAes256GcmSha384,
Tls12EcdheEcdsaChacha20Poly1305Sha256,
Tls12EcdheRsaChacha20Poly1305Sha256,
Unknown,
}Expand description
TLS cipher suite identifiers covering TLS 1.3 mandatory suites and commonly-used TLS 1.2 AEAD suites.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tls13Aes128GcmSha256
TLS_AES_128_GCM_SHA256 (0x13,0x01)
Tls13Aes256GcmSha384
TLS_AES_256_GCM_SHA384 (0x13,0x02)
Tls13Chacha20Poly1305Sha256
TLS_CHACHA20_POLY1305_SHA256 (0x13,0x03)
Tls12EcdheEcdsaAes128GcmSha256
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (0xC0,0x2B)
Tls12EcdheEcdsaAes256GcmSha384
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (0xC0,0x2C)
Tls12EcdheRsaAes128GcmSha256
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xC0,0x2F)
Tls12EcdheRsaAes256GcmSha384
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xC0,0x30)
Tls12EcdheEcdsaChacha20Poly1305Sha256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (0xCC,0xA9)
Tls12EcdheRsaChacha20Poly1305Sha256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xCC,0xA8)
Unknown
An unrecognised cipher suite not covered by the variants above.
Implementations§
Source§impl CipherSuite
impl CipherSuite
Sourcepub const ALL: &'static [CipherSuite]
pub const ALL: &'static [CipherSuite]
All named cipher suites (excluding CipherSuite::Unknown).
Sourcepub fn iana_value(&self) -> [u8; 2]
pub fn iana_value(&self) -> [u8; 2]
Returns the IANA two-byte identifier for this cipher suite.
Returns [0x00, 0x00] for CipherSuite::Unknown.
Sourcepub fn from_iana(bytes: [u8; 2]) -> Option<Self>
pub fn from_iana(bytes: [u8; 2]) -> Option<Self>
Try to look up a cipher suite from its IANA two-byte identifier.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Whether this is the Unknown catch-all variant.
Trait Implementations§
Source§impl Clone for CipherSuite
impl Clone for CipherSuite
Source§fn clone(&self) -> CipherSuite
fn clone(&self) -> CipherSuite
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CipherSuite
Source§impl Debug for CipherSuite
impl Debug for CipherSuite
Source§impl Display for CipherSuite
impl Display for CipherSuite
impl Eq for CipherSuite
Source§impl FromStr for CipherSuite
impl FromStr for CipherSuite
Source§impl Hash for CipherSuite
impl Hash for CipherSuite
Source§impl PartialEq for CipherSuite
impl PartialEq for CipherSuite
Source§fn eq(&self, other: &CipherSuite) -> bool
fn eq(&self, other: &CipherSuite) -> bool
self and other values to be equal, and is used by ==.