pub struct ServerHandshakeCtx<Config, Crypto, Rng> { /* private fields */ }Expand description
State machine context for yTLS Server
Implementations§
Source§impl<Config, Crypto, Rng> ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ServerHandshakeCtx<Config, Crypto, Rng>
Sourcepub fn with_required(config: Config, crypto: Crypto, rng: Rng) -> Self
pub fn with_required(config: Config, crypto: Crypto, rng: Rng) -> Self
New yTLS server context with the given configuration
Trait Implementations§
Source§impl<Config, Crypto, Rng> ClientHelloProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ClientHelloProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
fn handle_extension(&mut self, ext_id: u16, ext_data: &[u8])
fn handle_cipher_suite(&mut self, cipher_suite: &[u8; 2])
fn handle_client_random(&mut self, cr: &[u8; 32])
fn handle_session_id(&mut self, ses_id: &[u8])
Source§impl<Config, Crypto, Rng> CtxHandshakeProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> CtxHandshakeProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn spin_handshake<Li: TlsLeftIn, Lo: TlsLeftOut, Ks: SecretStore>(
&mut self,
li: &mut Li,
lo: &mut Lo,
ks: &mut Ks,
) -> Result<Option<HandshakeComplete>, Self::Error>
fn spin_handshake<Li: TlsLeftIn, Lo: TlsLeftOut, Ks: SecretStore>( &mut self, li: &mut Li, lo: &mut Lo, ks: &mut Ks, ) -> Result<Option<HandshakeComplete>, Self::Error>
Spin yTLS Server Handshake Context
type Error = CtxError
Source§impl<Config, Crypto, Rng> ExtAlpnProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtAlpnProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§impl<Config, Crypto, Rng> ExtCompressCertProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtCompressCertProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn compress_certificate(&mut self, _alg: CertificateCompressKind)
fn compress_certificate(&mut self, _alg: CertificateCompressKind)
Client indicates support for a given Certificate Compression algorithm.
Source§impl<Config, Crypto, Rng> ExtDelegatedCredentialProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtDelegatedCredentialProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn delegated_credential_signature_algorithm(
&mut self,
_sa: SignatureAlgorithm,
) -> bool
fn delegated_credential_signature_algorithm( &mut self, _sa: SignatureAlgorithm, ) -> bool
Indicate support for the given Signature Algorithm.
Source§impl<Config, Crypto, Rng> ExtEncryptedClientHelloProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtEncryptedClientHelloProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§impl<Config, Crypto, Rng> ExtGroupProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtGroupProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§impl<Config, Crypto, Rng> ExtPskeProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtPskeProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§impl<Config, Crypto, Rng> ExtRecSizeLimitProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtRecSizeLimitProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
fn record_size_limit(&mut self, lim: u16)
Source§impl<Config, Crypto, Rng> ExtSigAlgProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtSigAlgProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn signature_algorithm(&mut self, s_alg: SignatureAlgorithm) -> bool
fn signature_algorithm(&mut self, s_alg: SignatureAlgorithm) -> bool
Indicate support for the given Signature Algorithm.
Source§impl<Config, Crypto, Rng> ExtSniProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtSniProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
Source§impl<Config, Crypto, Rng> ExtVersionProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ExtVersionProcessor for ServerHandshakeCtx<Config, Crypto, Rng>
fn supported_version(&mut self, s_ver: Version) -> bool
Source§impl<Config, Crypto, Rng> ServerCertificateVerifyBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ServerCertificateVerifyBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn signature_algorithm(&self) -> [u8; 2]
fn signature_algorithm(&self) -> [u8; 2]
Provide the signature algorithm used
Source§fn sign_cert_verify(&self) -> &[u8]
fn sign_cert_verify(&self) -> &[u8]
Sign the current handshake hash with the used signature
algorithm and the server private key used to generate the public key
within the server certificate.
Source§impl<Config, Crypto, Rng> ServerCertificatesBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ServerCertificatesBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn server_certs_list(&self) -> &[u8]
fn server_certs_list(&self) -> &[u8]
Provide ordered list of certificates and their internal id
Source§fn server_cert_data(&self, id: u8) -> &[u8]
fn server_cert_data(&self, id: u8) -> &[u8]
Provide the ASN.1 DER encoded certificate by the given cert id
Source§fn server_cert_extensions(&self, _id: u8) -> &[u8]
fn server_cert_extensions(&self, _id: u8) -> &[u8]
Provide any certificate extensions if any by the given cert id.
Source§impl<Config, Crypto, Rng> ServerHandshakeFinishedBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ServerHandshakeFinishedBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn hash_finished(&self) -> &[u8]
fn hash_finished(&self) -> &[u8]
Provide the hash
Source§impl<Config, Crypto, Rng> ServerHelloBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> ServerHelloBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
Source§fn legacy_version(&self) -> &[u8; 2]
fn legacy_version(&self) -> &[u8; 2]
This should return [3, 3] for TLS 1.3
Source§fn server_random(&self) -> &[u8; 32]
fn server_random(&self) -> &[u8; 32]
Generate 32 bytes server random for the Hello
Source§fn legacy_session_id(&self) -> &[u8]
fn legacy_session_id(&self) -> &[u8]
In TLS 1.3 provide the ClientHello session id (if any) back
Source§fn selected_cipher_suite(&self) -> &[u8; 2]
fn selected_cipher_suite(&self) -> &[u8; 2]
Server selected the cipher suite from client’s list.
Source§fn selected_legacy_insecure_compression_method(&self) -> Option<u8>
fn selected_legacy_insecure_compression_method(&self) -> Option<u8>
Server selected compression list. This must be None for TLS 1.3.
Source§fn extensions_list(&self) -> &[u16]
fn extensions_list(&self) -> &[u16]
Extensions used list
Source§fn extension_data(&self, ext: u16) -> &[u8]
fn extension_data(&self, ext: u16) -> &[u8]
Given extension relevant encoded data. See [
ytls_extensions] to encode.impl<Config, Crypto, Rng> EncryptedExtensionsBuilder for ServerHandshakeCtx<Config, Crypto, Rng>
Auto Trait Implementations§
impl<Config, Crypto, Rng> Freeze for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> RefUnwindSafe for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> Send for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> Sync for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> Unpin for ServerHandshakeCtx<Config, Crypto, Rng>
impl<Config, Crypto, Rng> UnwindSafe for ServerHandshakeCtx<Config, Crypto, Rng>
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
Mutably borrows from an owned value. Read more