Record Class ScepPkiMessage
java.lang.Object
java.lang.Record
zeroecho.pkix.scep.ScepPkiMessage
- Record Components:
messageType- SCEP message type integer (e.g., 19=PKCSReq, 20=GetCertInitial)transactionId- SCEP transaction identifier stringsenderNonce- senderNonce octet string (exactly 16 bytes)innerContent- decrypted inner content bytes (PKCS#10 CSR DER for PKCSReq, IssuerAndSubject DER for GetCertInitial)requesterCert- the signing certificate carried in the outer CMS SignedData (the requester's self-signed certificate)
public record ScepPkiMessage(int messageType, String transactionId, byte[] senderNonce, byte[] innerContent, X509Certificate requesterCert)
extends Record
Parsed representation of a SCEP PKIOperation message.
This immutable value contains PKCSReq or GetCertInitial plaintext extracted
by ScepCodec.decryptRequest(ScepCodec.VerifiedRequest, X509Certificate, PrivateKey). Constructing the value directly does not
establish authentication.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionScepPkiMessage(int messageType, String transactionId, byte[] senderNonce, byte[] innerContent, X509Certificate requesterCert) Validates and defensively copies bounded request content. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.byte[]Copies the plaintext request.intReturns the value of themessageTyperecord component.Returns the value of therequesterCertrecord component.byte[]Copies the sender nonce.toString()Returns a string representation of this record class.Returns the value of thetransactionIdrecord component.
-
Constructor Details
-
ScepPkiMessage
public ScepPkiMessage(int messageType, String transactionId, byte[] senderNonce, byte[] innerContent, X509Certificate requesterCert) Validates and defensively copies bounded request content.
-
-
Method Details
-
senderNonce
public byte[] senderNonce()Copies the sender nonce.- Returns:
- independently owned nonce
-
innerContent
public byte[] innerContent()Copies the plaintext request.- Returns:
- independently owned request
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
messageType
public int messageType()Returns the value of themessageTyperecord component.- Returns:
- the value of the
messageTyperecord component
-
transactionId
Returns the value of thetransactionIdrecord component.- Returns:
- the value of the
transactionIdrecord component
-
requesterCert
Returns the value of therequesterCertrecord component.- Returns:
- the value of the
requesterCertrecord component
-