pub struct Tls12CipherSuite {
pub common: CipherSuiteCommon,
pub prf_provider: &'static dyn Prf,
pub kx: KeyExchangeAlgorithm,
pub sign: &'static [SignatureScheme],
pub aead_alg: &'static dyn Tls12AeadAlgorithm,
}tls12 only.Expand description
A TLS 1.2 cipher suite supported by rustls.
Fields§
§common: CipherSuiteCommonCommon cipher suite fields.
prf_provider: &'static dyn PrfHow to compute the TLS1.2 PRF for the suite’s hash function.
If you have a TLS1.2 PRF implementation, you should directly implement the crypto::tls12::Prf trait.
If not, you can implement the crypto::hmac::Hmac trait (and associated), and then use
crypto::tls12::PrfUsingHmac.
kx: KeyExchangeAlgorithmHow to exchange/agree keys.
In TLS1.2, the key exchange method (eg, Elliptic Curve Diffie-Hellman with Ephemeral keys – ECDHE) is baked into the cipher suite, but the details to achieve it are negotiated separately.
This controls how protocol messages (like the ClientKeyExchange message) are interpreted
once this cipher suite has been negotiated.
sign: &'static [SignatureScheme]How to sign messages for authentication.
This is a set of SignatureSchemes that are usable once this cipher suite has been
negotiated.
The precise scheme used is then chosen from this set by the selected authentication key.
aead_alg: &'static dyn Tls12AeadAlgorithmHow to produce a MessageDecrypter or MessageEncrypter
from raw key material.
Implementations§
Source§impl Tls12CipherSuite
impl Tls12CipherSuite
Sourcepub fn resolve_sig_schemes(
&self,
offered: &[SignatureScheme],
) -> Vec<SignatureScheme>
pub fn resolve_sig_schemes( &self, offered: &[SignatureScheme], ) -> Vec<SignatureScheme>
Resolve the set of supported SignatureSchemes from the
offered signature schemes. If we return an empty
set, the handshake terminates.
Trait Implementations§
Source§impl Debug for Tls12CipherSuite
impl Debug for Tls12CipherSuite
Source§impl From<&'static Tls12CipherSuite> for SupportedCipherSuite
impl From<&'static Tls12CipherSuite> for SupportedCipherSuite
Source§fn from(s: &'static Tls12CipherSuite) -> Self
fn from(s: &'static Tls12CipherSuite) -> Self
Source§impl PartialEq for Tls12CipherSuite
impl PartialEq for Tls12CipherSuite
Auto Trait Implementations§
impl Freeze for Tls12CipherSuite
impl !RefUnwindSafe for Tls12CipherSuite
impl Send for Tls12CipherSuite
impl Sync for Tls12CipherSuite
impl Unpin for Tls12CipherSuite
impl !UnwindSafe for Tls12CipherSuite
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes