Record Class CaCreateCommand
java.lang.Object
java.lang.Record
zeroecho.pki.api.ca.CaCreateCommand
- Record Components:
formatId- target credential formatsubjectRef- normalized CA subject referenceprofileId- nonblank strict UTF-8 profile id, at most 256 byteskeyRef- existing managed key, nonblank strict UTF-8, at most 1,048,576 bytesaltKeyRef- optional alternative key reference for hybrid certificate issuance; when absent the profile's default alternative key reference is usedattributes- universal attributes (may be empty but not null)
public record CaCreateCommand(FormatId formatId, SubjectRef subjectRef, String profileId, KeyRef keyRef, Optional<KeyRef> altKeyRef, AttributeSet attributes)
extends Record
Command to create a new root CA entity and issue its initial CA credential.
The managed key is mandatory; construction neither generates keys nor proves possession or authorizes creation. Execution must authorize the operation separately and verify a fresh self-signature against the same frozen canonical SubjectPublicKeyInfo used for the new credential. No retained proof substitutes for this fresh root self-signature.
-
Constructor Summary
ConstructorsConstructorDescriptionCaCreateCommand(FormatId formatId, SubjectRef subjectRef, String profileId, KeyRef keyRef, Optional<KeyRef> altKeyRef, AttributeSet attributes) Creates a CA create command.CaCreateCommand(FormatId formatId, SubjectRef subjectRef, String profileId, KeyRef keyRef, AttributeSet attributes) Creates a CA create command without an explicit alternative key reference. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealtKeyRefrecord component.Returns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.formatId()Returns the value of theformatIdrecord component.final inthashCode()Returns a hash code value for this object.keyRef()Returns the value of thekeyRefrecord component.Returns the value of theprofileIdrecord component.Returns the value of thesubjectRefrecord component.toString()Returns a diagnostic representation without command coordinates or attributes.
-
Constructor Details
-
CaCreateCommand
public CaCreateCommand(FormatId formatId, SubjectRef subjectRef, String profileId, KeyRef keyRef, Optional<KeyRef> altKeyRef, AttributeSet attributes) Creates a CA create command.- Throws:
IllegalArgumentException- if any required component is null or bounded text is invalid
-
CaCreateCommand
public CaCreateCommand(FormatId formatId, SubjectRef subjectRef, String profileId, KeyRef keyRef, AttributeSet attributes) Creates a CA create command without an explicit alternative key reference. The profile's default alternative key reference will be used for hybrid issuance.- Parameters:
formatId- target credential formatsubjectRef- normalized CA subject referenceprofileId- nonblank strict UTF-8 profile id, at most 256 byteskeyRef- existing managed key, nonblank strict UTF-8, at most 1,048,576 bytesattributes- universal attributes (may be empty but not null)- Throws:
IllegalArgumentException- if any component is null or bounded text is invalid
-
-
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). -
formatId
-
subjectRef
Returns the value of thesubjectRefrecord component.- Returns:
- the value of the
subjectRefrecord component
-
profileId
-
keyRef
-
altKeyRef
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-