Record Class CertGenerator.KeyMaterial
java.lang.Object
java.lang.Record
pt.unl.fct.di.novasys.babel2.ssl.CertGenerator.KeyMaterial
- Record Components:
ephemeralKey- the ephemeral private key used for TLS encryption/decryptioncertificate- the self-signed X.509 certificate carrying the identity extensionidentityPublicKey- the long-term identity public key, ornullif unknown
- Enclosing class:
CertGenerator
public static record CertGenerator.KeyMaterial(PrivateKey ephemeralKey, X509Certificate certificate, PublicKey identityPublicKey)
extends Record
Key material containing the ephemeral private key, the generated self-signed certificate,
and the long-term identity public key.
TODO upon creation, verify that everything is correct
-
Constructor Summary
ConstructorsConstructorDescriptionKeyMaterial(PrivateKey ephemeralKey, X509Certificate certificate, PublicKey identityPublicKey) Creates an instance of aKeyMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecertificaterecord component.Returns the value of theephemeralKeyrecord 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 theidentityPublicKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyMaterial
public KeyMaterial(PrivateKey ephemeralKey, X509Certificate certificate, PublicKey identityPublicKey) Creates an instance of aKeyMaterialrecord class.- Parameters:
ephemeralKey- the value for theephemeralKeyrecord componentcertificate- the value for thecertificaterecord componentidentityPublicKey- the value for theidentityPublicKeyrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
ephemeralKey
Returns the value of theephemeralKeyrecord component.- Returns:
- the value of the
ephemeralKeyrecord component
-
certificate
Returns the value of thecertificaterecord component.- Returns:
- the value of the
certificaterecord component
-
identityPublicKey
Returns the value of theidentityPublicKeyrecord component.- Returns:
- the value of the
identityPublicKeyrecord component
-