Package io.kroxylicious.proxy.config.tls
Record Class KeyPair
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.tls.KeyPair
- Record Components:
privateKeyFile- location of a file containing the private key.certificateFile- location of a file containing the certificate and intermediates.keyPasswordProvider- provider for the privateKeyFile password or null if key does not require a password
- All Implemented Interfaces:
KeyProvider
public record KeyPair(String privateKeyFile, String certificateFile, PasswordProvider keyPasswordProvider)
extends Record
implements KeyProvider
A
Note that support for PKCS-8 private keys is derived from the JDK. PKCS-1 private keys are only supported if Bouncy Castle is available on the classpath.
KeyProvider backed by a private-key/certificate pair expressed in PEM format.
Note that support for PKCS-8 private keys is derived from the JDK. PKCS-1 private keys are only supported if Bouncy Castle is available on the classpath.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyPair(String privateKeyFile, String certificateFile, PasswordProvider keyPasswordProvider) Creates an instance of aKeyPairrecord class. -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(KeyProviderVisitor<T> visitor) Visits the trust providerKeyProviderVisitor.Returns the value of thecertificateFilerecord 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 thekeyPasswordProviderrecord component.Returns the value of theprivateKeyFilerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyPair
public KeyPair(String privateKeyFile, String certificateFile, @Nullable PasswordProvider keyPasswordProvider) Creates an instance of aKeyPairrecord class.- Parameters:
privateKeyFile- the value for theprivateKeyFilerecord componentcertificateFile- the value for thecertificateFilerecord componentkeyPasswordProvider- the value for thekeyPasswordProviderrecord component
-
-
Method Details
-
accept
Description copied from interface:KeyProviderVisits the trust providerKeyProviderVisitor. Implementor should call one `visit` method on visitor.- Specified by:
acceptin interfaceKeyProvider- Parameters:
visitor- visitor.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
privateKeyFile
Returns the value of theprivateKeyFilerecord component.- Returns:
- the value of the
privateKeyFilerecord component
-
certificateFile
Returns the value of thecertificateFilerecord component.- Returns:
- the value of the
certificateFilerecord component
-
keyPasswordProvider
Returns the value of thekeyPasswordProviderrecord component.- Returns:
- the value of the
keyPasswordProviderrecord component
-