Record Class SSLConfiguration
java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.network.ssl.SSLConfiguration
- Record Components:
enabled- if the ssl configuration is enabled.clientAuth- if client authorization should be required.trustCertificatePath- the trusted certificate for remote certificate validation.certificatePath- the path to an X509 certificate chain in the pem format.privateKeyPath- the path to a PKCS#8 private key in PEM format.privateKeyPassword- the password of the private key file, null if not password protected.
public record SSLConfiguration(boolean enabled, boolean clientAuth, @Nullable Path trustCertificatePath, @Nullable Path certificatePath, @Nullable Path privateKeyPath, @Nullable String privateKeyPassword)
extends Record
Represents the configuration option for ssl. A ssl configuration can be enabled without any certificates given,
meaning that the server/client should use self-signed certificates and an insecure trust store.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecertificatePathrecord component.private final booleanThe field for theclientAuthrecord component.private final booleanThe field for theenabledrecord component.The field for theprivateKeyPasswordrecord component.The field for theprivateKeyPathrecord component.The field for thetrustCertificatePathrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecertificatePathrecord component.booleanReturns the value of theclientAuthrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprivateKeyPasswordrecord component.Returns the value of theprivateKeyPathrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetrustCertificatePathrecord component.
-
Field Details
-
enabled
private final boolean enabledThe field for theenabledrecord component. -
clientAuth
private final boolean clientAuthThe field for theclientAuthrecord component. -
trustCertificatePath
The field for thetrustCertificatePathrecord component. -
certificatePath
The field for thecertificatePathrecord component. -
privateKeyPath
The field for theprivateKeyPathrecord component. -
privateKeyPassword
The field for theprivateKeyPasswordrecord component.
-
-
Constructor Details
-
SSLConfiguration
public SSLConfiguration(boolean enabled, boolean clientAuth, @Nullable @Nullable Path trustCertificatePath, @Nullable @Nullable Path certificatePath, @Nullable @Nullable Path privateKeyPath, @Nullable @Nullable String privateKeyPassword) Creates an instance of aSSLConfigurationrecord class.- Parameters:
enabled- the value for theenabledrecord componentclientAuth- the value for theclientAuthrecord componenttrustCertificatePath- the value for thetrustCertificatePathrecord componentcertificatePath- the value for thecertificatePathrecord componentprivateKeyPath- the value for theprivateKeyPathrecord componentprivateKeyPassword- the value for theprivateKeyPasswordrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enabled
-
clientAuth
public boolean clientAuth()Returns the value of theclientAuthrecord component.- Returns:
- the value of the
clientAuthrecord component
-
trustCertificatePath
Returns the value of thetrustCertificatePathrecord component.- Returns:
- the value of the
trustCertificatePathrecord component
-
certificatePath
Returns the value of thecertificatePathrecord component.- Returns:
- the value of the
certificatePathrecord component
-
privateKeyPath
Returns the value of theprivateKeyPathrecord component.- Returns:
- the value of the
privateKeyPathrecord component
-
privateKeyPassword
Returns the value of theprivateKeyPasswordrecord component.- Returns:
- the value of the
privateKeyPasswordrecord component
-