Package codes.grow.packages.vault
Record Class IssuedCertificate
java.lang.Object
java.lang.Record
codes.grow.packages.vault.IssuedCertificate
- Record Components:
certificate- PEM certificateissuingCa- PEM of the issuing CAcaChain- PEM chainserialNumber- serial, colon hexexpiration- expiryprivateKey- PEM private key (redacted)privateKeyType- key type, e.g.ec,rsa
public record IssuedCertificate(String certificate, String issuingCa, List<String> caChain, String serialNumber, Optional<Instant> expiration, Secret privateKey, String privateKeyType)
extends Record
A certificate and private key issued by the PKI engine (
Pki.issueCertificate(java.lang.String, java.lang.String)).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaChain()Returns the value of thecaChainrecord component.Returns the value of thecertificaterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theissuingCarecord component.Returns the value of theprivateKeyrecord component.Returns the value of theprivateKeyTyperecord component.Returns the value of theserialNumberrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IssuedCertificate
public IssuedCertificate(String certificate, String issuingCa, List<String> caChain, String serialNumber, Optional<Instant> expiration, Secret privateKey, String privateKeyType) Creates the record; the chain is copied.- Parameters:
certificate- certificateissuingCa- issuing CAcaChain- chainserialNumber- serialexpiration- expiryprivateKey- private keyprivateKeyType- key type
-
-
Method Details
-
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). -
certificate
Returns the value of thecertificaterecord component.- Returns:
- the value of the
certificaterecord component
-
issuingCa
Returns the value of theissuingCarecord component.- Returns:
- the value of the
issuingCarecord component
-
caChain
Returns the value of thecaChainrecord component.- Returns:
- the value of the
caChainrecord component
-
serialNumber
Returns the value of theserialNumberrecord component.- Returns:
- the value of the
serialNumberrecord component
-
expiration
Returns the value of theexpirationrecord component.- Returns:
- the value of the
expirationrecord component
-
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-
privateKeyType
Returns the value of theprivateKeyTyperecord component.- Returns:
- the value of the
privateKeyTyperecord component
-