Struct Tls12CipherSuite
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,
}tls 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§
§impl Tls12CipherSuite
impl Tls12CipherSuite
pub 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§
§impl Debug for Tls12CipherSuite
impl Debug for Tls12CipherSuite
§impl From<&'static Tls12CipherSuite> for SupportedCipherSuite
impl From<&'static Tls12CipherSuite> for SupportedCipherSuite
§fn from(s: &'static Tls12CipherSuite) -> SupportedCipherSuite
fn from(s: &'static Tls12CipherSuite) -> SupportedCipherSuite
§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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more