Package io.github.mahmoudimus.quic.tls
Class FingerprintSslContext.Builder
java.lang.Object
io.github.mahmoudimus.quic.tls.FingerprintSslContext.Builder
- Enclosing class:
FingerprintSslContext
Configures a
FingerprintSslContext.-
Method Summary
Modifier and TypeMethodDescriptionapplicationSettings(Map<String, byte[]> settings) The ALPS settings (application_settings) answered to a server that sends its own, by ALPN protocol.Something to go with the context's sockets, which code holding one reads fromFingerprintSocket.attachment(): MicroProxy's HTTP/2 client takes anHttp2ClientProfilefrom it for connections over the socket.build()Returns the context.certificateDecompressor(CertificateDecompressor decompressor) Decompresses server certificates the profile offers to receive compressed; zlib only by default.clock(InstantSource clock) The clock tickets are timed with.defaultApplicationProtocols(List<String> protocols) The ALPN protocols offered when a socket's caller sets none:http/1.1by default, since a browser always offers ALPN and a hello without it is not one a browser sends.echConfigProvider(EchConfigProvider provider) Where the sockets find a server's Encrypted Client Hello configurations (RFC 9849).keyManager(X509KeyManager keyManager) The client certificates offered when a server asks for one; none if not set.keyManagers(KeyManager[] keyManagers) The firstX509KeyManagerofkeyManagers, asSSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)takes them.maxHandshakeMessageSize(int bytes) The longest handshake message accepted, 64 KiB by default.random(SecureRandom random) The source of the handshakes' randomness.sessions(ClientSessionStore sessions) Where session tickets are kept; a fresh in-memory store by default,ClientSessionStore.NONEfor none.trustManager(X509TrustManager trustManager) The servers trusted; the JDK's default trust store if not set.trustManagers(TrustManager[] trustManagers) The firstX509TrustManageroftrustManagers, asSSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)takes them; the default trust store if there is none.
-
Method Details
-
trustManager
The servers trusted; the JDK's default trust store if not set. -
trustManagers
The firstX509TrustManageroftrustManagers, asSSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)takes them; the default trust store if there is none. -
keyManager
The client certificates offered when a server asks for one; none if not set. -
keyManagers
The firstX509KeyManagerofkeyManagers, asSSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom)takes them. -
sessions
Where session tickets are kept; a fresh in-memory store by default,ClientSessionStore.NONEfor none. -
applicationSettings
The ALPS settings (application_settings) answered to a server that sends its own, by ALPN protocol. Chrome's, the default, are empty settings forh2. -
certificateDecompressor
Decompresses server certificates the profile offers to receive compressed; zlib only by default. Chrome's profile offers Brotli alone, so a Brotli decompressor belongs here for it. -
random
The source of the handshakes' randomness. -
clock
The clock tickets are timed with. -
defaultApplicationProtocols
The ALPN protocols offered when a socket's caller sets none:http/1.1by default, since a browser always offers ALPN and a hello without it is not one a browser sends. Empty to offer none. -
attach
Something to go with the context's sockets, which code holding one reads fromFingerprintSocket.attachment(): MicroProxy's HTTP/2 client takes anHttp2ClientProfilefrom it for connections over the socket. -
echConfigProvider
Where the sockets find a server's Encrypted Client Hello configurations (RFC 9849). With a list for the server's name, the ClientHello is encrypted to it and the outer hello names the configuration's public name; a server that rejects ECH fails the handshake with anEchRejectedExceptioncarrying its retry configurations, which this client never retries with by itself. Not set (the default), or for a server without a list, the profile's GREASE ECH is sent, as a browser does.- Parameters:
provider- the configurations by server name, or null for GREASE only
-
maxHandshakeMessageSize
The longest handshake message accepted, 64 KiB by default. -
build
Returns the context.- Returns:
- the context
-