Class CrmfRequest
java.lang.Object
zeroecho.pkix.cmp.CrmfRequest
Immutable structural projection of one canonical CRMF
CertReqMsg.
The supported grammar requires a nonnegative request ID of at most 64 bits,
a subject and public key in the signed CertRequest, and signing-key
proof without poposkInput. Optional version 2 and requested extensions
are retained, as is a single standard oldCertID control when present;
other controls, registration information and other template fields are
rejected. Parsing does not verify the proof or grant issuance authority.
Callers must verify signature() over signedRequest() using
the exact subjectPublicKeyInfo() and their algorithm policy.
Input is limited to one MiB and 64 nesting levels. Parsing and owned storage are O(N) in encoded length, with a bounded structural stack.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordImmutable structural predecessor reference; possession and authority are not asserted. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum complete CertReqMsg size in bytes. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encoded()Returns the exact request bytes.Returns the signed standard predecessor reference, if supplied.static CrmfRequestparse(byte[] der) Parses one bounded canonical DER CertReqMsg with the supported signing proof.Returns requested extensions without policy approval.Returns the retained CRMF request identity.byte[]Returns the signing-key proof bytes.Returns the proof algorithm.byte[]Returns the exact signed CertRequest.subject()Returns the requested subject.byte[]Returns the proof's public key.toString()Returns a diagnostic representation without request data.
-
Field Details
-
MAXIMUM_ENCODED_BYTES
public static final int MAXIMUM_ENCODED_BYTESMaximum complete CertReqMsg size in bytes.- See Also:
-
-
Method Details
-
parse
Parses one bounded canonical DER CertReqMsg with the supported signing proof.- Parameters:
der- caller-owned exact CertReqMsg, copied before parsing- Returns:
- immutable structural projection without a proof-validity assertion
- Throws:
IllegalArgumentException- if size, DER, or the supported grammar is invalid
-
encoded
public byte[] encoded()Returns the exact request bytes.- Returns:
- defensive DER snapshot
-
requestId
Returns the retained CRMF request identity.- Returns:
- immutable nonnegative request ID
-
subject
-
subjectPublicKeyInfo
public byte[] subjectPublicKeyInfo()Returns the proof's public key.- Returns:
- defensive SubjectPublicKeyInfo DER
-
signatureAlgorithm
Returns the proof algorithm.- Returns:
- immutable signature algorithm identifier
-
signedRequest
public byte[] signedRequest()Returns the exact signed CertRequest.- Returns:
- defensive canonical DER snapshot
-
signature
public byte[] signature()Returns the signing-key proof bytes.- Returns:
- defensive signature snapshot
-
requestedExtensions
Returns requested extensions without policy approval.- Returns:
- immutable extension list
-
oldCertificate
Returns the signed standard predecessor reference, if supplied.- Returns:
- immutable structural reference without ownership or validity assertion
-
toString
-