Package io.github.mahmoudimus.quic.tls
Class ClientHelloProfile
java.lang.Object
io.github.mahmoudimus.quic.tls.ClientHelloProfile
What a client's ClientHello looks like:
- its cipher suites, in order;
- its extensions, in order, with how each body is made;
- whether the extensions are shuffled per hello, as Chrome has done since version 110
(BoringSSL
SSL_set_permute_extensions); - the length of its
legacy_session_id.
HelloContext supplies what changes per connection.-
Constructor Summary
ConstructorsConstructorDescriptionClientHelloProfile(String name, int[] cipherSuites, List<ExtensionSpec> extensions, boolean shuffleExtensions, int sessionIdLength) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode(HelloContext context) The ClientHello handshake message for one connection: type, 24-bit length and body.int[]The groups the profile'skey_sharecarries real shares for, in order: the keys a client makes beforeencode(io.github.mahmoudimus.quic.tls.HelloContext).name()Returns the profile's name.
-
Constructor Details
-
ClientHelloProfile
public ClientHelloProfile(String name, int[] cipherSuites, List<ExtensionSpec> extensions, boolean shuffleExtensions, int sessionIdLength) - Parameters:
name- the profile's name, such aschrome-156cipherSuites- the cipher suites in order,ProfileExtensions.GREASEfor the hello's GREASE suiteextensions- the extensions in order (the order they are shuffled from, if shuffled)shuffleExtensions- whether each hello permutes the extensions that are notfixedsessionIdLength- the length of the randomlegacy_session_id: 32 for a client in middlebox compatibility mode (RFC 8446 appendix D.4), 0 for none
-
-
Method Details
-
name
Returns the profile's name.- Returns:
- the profile's name
-
encode
The ClientHello handshake message for one connection: type, 24-bit length and body.- Parameters:
context- the connection's inputs- Returns:
- the message
-