Class TlsOptions.Builder
java.lang.Object
codes.grow.packages.betterstack.core.TlsOptions.Builder
- Enclosing class:
TlsOptions
Builder for
TlsOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the options.caCertPath(Path path) Trusts the CA certificates in a PEM file instead of the system trust store.Trusts the CA certificates in inline PEM text.clientCertPath(Path path) Sets the client certificate file (mutual TLS); requires a key.clientCertPem(String pem) Sets the client certificate as inline PEM.clientKeyPath(Path path) Sets the client key file (unencrypted PKCS#8 PEM).clientKeyPem(Secret pem) Sets the client key as inline PEM.insecureSkipVerify(boolean insecure) Disables certificate and host name verification.
-
Method Details
-
caCertPath
Trusts the CA certificates in a PEM file instead of the system trust store.- Parameters:
path- PEM bundle- Returns:
- this builder
-
caCertPem
Trusts the CA certificates in inline PEM text.- Parameters:
pem- PEM bundle- Returns:
- this builder
-
clientCertPath
Sets the client certificate file (mutual TLS); requires a key.- Parameters:
path- PEM certificate chain- Returns:
- this builder
-
clientKeyPath
Sets the client key file (unencrypted PKCS#8 PEM).- Parameters:
path- PEM key- Returns:
- this builder
-
clientCertPem
Sets the client certificate as inline PEM.- Parameters:
pem- PEM certificate chain- Returns:
- this builder
-
clientKeyPem
Sets the client key as inline PEM.- Parameters:
pem- PEM key- Returns:
- this builder
-
insecureSkipVerify
Disables certificate and host name verification. For tests only; a warning is logged once.- Parameters:
insecure- true to disable verification- Returns:
- this builder
-
build
Builds the options.- Returns:
- the options
-