Class FlowServiceTlsOptions.Builder
- Enclosing class:
FlowServiceTlsOptions
FlowServiceTlsOptions for a complete example.-
Method Summary
Modifier and TypeMethodDescriptionadditionalRootCAsPem(String value) Adds PEM-encoded root certificates to the JDK default trust roots.build()Builds immutable TLS settings without opening a connection.serverName(String value) Overrides the certificate name, TLS SNI, and HTTP/2 authority.
-
Method Details
-
additionalRootCAsPem
Adds PEM-encoded root certificates to the JDK default trust roots.The default null or an empty string uses only the default roots. A nonempty bundle must contain at least one parsable X.509 certificate. Other text and malformed certificate blocks are ignored when another certificate parses. No certificate contents are logged. See
FlowServiceTlsOptionsfor a complete example.- Parameters:
value- the PEM bundle, or null to use only default roots- Returns:
- this builder
-
serverName
Overrides the certificate name, TLS SNI, and HTTP/2 authority.The default null uses the address host for verification and SNI, and the address host and port for HTTP/2 authority. Supply a DNS name or unbracketed IP address without a port only when it differs from the endpoint host. An IP name requires a matching IP SAN. A gateway must accept the override as its authority, without a port. Prefer a DNS override for IPv6 endpoints because HTTP/2 authorities require IPv6 brackets. See
FlowServiceTlsOptionsfor an example of configuring TLS.- Parameters:
value- the certificate name, or null to use the address host; empty is invalid- Returns:
- this builder
-
build
Builds immutable TLS settings without opening a connection.- Returns:
- the configured TLS settings
- Throws:
IllegalArgumentException- if a nonempty PEM bundle contains no parsable certificate, or the supplied server name is empty or invalid
-