100 lines
3.4 KiB
Rust
100 lines
3.4 KiB
Rust
use crate::extensions::{
|
|
extension_data::{
|
|
alpn::AlpnProtocolNameList,
|
|
key_share::{KeyShareClientHello, KeyShareServerHello},
|
|
max_fragment_length::MaxFragmentLength,
|
|
pre_shared_key::{PreSharedKeyClientHello, PreSharedKeyServerHello},
|
|
psk_key_exchange_modes::PskKeyExchangeModes,
|
|
server_name::{ServerNameList, ServerNameResponse},
|
|
signature_algorithms::SignatureAlgorithms,
|
|
signature_algorithms_cert::SignatureAlgorithmsCert,
|
|
supported_groups::SupportedGroups,
|
|
supported_versions::{SupportedVersionsClientHello, SupportedVersionsServerHello},
|
|
unimplemented::Unimplemented,
|
|
},
|
|
extension_group_macro::extension_group,
|
|
};
|
|
|
|
extension_group! {
|
|
pub enum ClientHelloExtension<'a> {
|
|
ServerName(ServerNameList<'a, 1>),
|
|
SupportedVersions(SupportedVersionsClientHello<1>),
|
|
SignatureAlgorithms(SignatureAlgorithms<25>),
|
|
SupportedGroups(SupportedGroups<13>),
|
|
KeyShare(KeyShareClientHello<'a, 1>),
|
|
PreSharedKey(PreSharedKeyClientHello<'a, 4>),
|
|
PskKeyExchangeModes(PskKeyExchangeModes<4>),
|
|
SignatureAlgorithmsCert(SignatureAlgorithmsCert<25>),
|
|
MaxFragmentLength(MaxFragmentLength),
|
|
StatusRequest(Unimplemented<'a>),
|
|
UseSrtp(Unimplemented<'a>),
|
|
Heartbeat(Unimplemented<'a>),
|
|
ApplicationLayerProtocolNegotiation(AlpnProtocolNameList<'a>),
|
|
SignedCertificateTimestamp(Unimplemented<'a>),
|
|
ClientCertificateType(Unimplemented<'a>),
|
|
ServerCertificateType(Unimplemented<'a>),
|
|
Padding(Unimplemented<'a>),
|
|
EarlyData(Unimplemented<'a>),
|
|
Cookie(Unimplemented<'a>),
|
|
CertificateAuthorities(Unimplemented<'a>),
|
|
OidFilters(Unimplemented<'a>),
|
|
PostHandshakeAuth(Unimplemented<'a>)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum ServerHelloExtension<'a> {
|
|
KeyShare(KeyShareServerHello<'a>),
|
|
PreSharedKey(PreSharedKeyServerHello),
|
|
Cookie(Unimplemented<'a>),
|
|
SupportedVersions(SupportedVersionsServerHello)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum EncryptedExtensionsExtension<'a> {
|
|
ServerName(ServerNameResponse),
|
|
MaxFragmentLength(MaxFragmentLength),
|
|
SupportedGroups(SupportedGroups<13>),
|
|
UseSrtp(Unimplemented<'a>),
|
|
Heartbeat(Unimplemented<'a>),
|
|
ApplicationLayerProtocolNegotiation(AlpnProtocolNameList<'a>),
|
|
ClientCertificateType(Unimplemented<'a>),
|
|
ServerCertificateType(Unimplemented<'a>),
|
|
EarlyData(Unimplemented<'a>)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum CertificateRequestExtension<'a> {
|
|
StatusRequest(Unimplemented<'a>),
|
|
SignatureAlgorithms(SignatureAlgorithms<25>),
|
|
SignedCertificateTimestamp(Unimplemented<'a>),
|
|
CertificateAuthorities(Unimplemented<'a>),
|
|
OidFilters(Unimplemented<'a>),
|
|
SignatureAlgorithmsCert(Unimplemented<'a>),
|
|
CompressCertificate(Unimplemented<'a>)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum CertificateExtension<'a> {
|
|
StatusRequest(Unimplemented<'a>),
|
|
SignedCertificateTimestamp(Unimplemented<'a>)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum NewSessionTicketExtension<'a> {
|
|
EarlyData(Unimplemented<'a>)
|
|
}
|
|
}
|
|
|
|
extension_group! {
|
|
pub enum HelloRetryRequestExtension<'a> {
|
|
KeyShare(Unimplemented<'a>),
|
|
Cookie(Unimplemented<'a>),
|
|
SupportedVersions(Unimplemented<'a>)
|
|
}
|
|
}
|