Interface CertificationRequest
public interface CertificationRequest
A parsed PKCS#10 certification request (RFC 2986).
The type exposes the request's subject, public key, and requested extensions in
ZeroEcho PKIX terms, and gives access to the exact signed bytes so that proof of
possession can be verified either with the request's own key
(verifySelfSignature()) or with an externally supplied
ContentVerifier over certificationRequestInfo() — the latter is
how a signing service re-verifies a request without holding the key locally.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the request attributes (excluding the extension-request attribute, which is surfaced viarequestedExtensions()).byte[]Returns the exact DER of thecertificationRequestInfo(the to-be-signed portion of the request).byte[]encoded()Returns the exact DER encoding of the whole request.Returns the subject public key carried by the request.Returns every PKCS#10 attribute, including the extension-request attribute, as raw(oid, DER values)pairs without interpreting any extension.Returns the requested v3 extensions, if any.Returns the requested subject alternative names, if any.byte[]Returns the request self-signature bytes.Returns the signature algorithm identifier of the request self-signature.subject()Returns the requested subject distinguished name.byte[]Returns the exact DER of theSubjectPublicKeyInfocarried by the request, byte-for-byte as encoded in the request.booleanVerifies proof of possession by checking the request self-signature against the request's own public key.
-
Method Details
-
subject
-
publicKey
PublicKey publicKey()Returns the subject public key carried by the request.- Returns:
- the subject public key
-
signatureAlgorithm
AlgorithmIdentifier signatureAlgorithm()Returns the signature algorithm identifier of the request self-signature.- Returns:
- the signature algorithm identifier
-
requestedSubjectAlternativeNames
List<GeneralName> requestedSubjectAlternativeNames()Returns the requested subject alternative names, if any.- Returns:
- the requested SANs (possibly empty)
-
requestedExtensions
List<CertificateExtension> requestedExtensions()Returns the requested v3 extensions, if any.- Returns:
- the requested extensions (possibly empty)
-
attributes
List<CsrAttribute> attributes()Returns the request attributes (excluding the extension-request attribute, which is surfaced viarequestedExtensions()).- Returns:
- the request attributes (possibly empty)
-
rawAttributes
List<CsrAttribute> rawAttributes()Returns every PKCS#10 attribute, including the extension-request attribute, as raw(oid, DER values)pairs without interpreting any extension.This gives callers that enforce a strict request grammar full control over attribute cardinality and shape without depending on the toolkit's own extension parsing.
- Returns:
- the raw attributes (possibly empty)
-
subjectPublicKeyInfo
byte[] subjectPublicKeyInfo()Returns the exact DER of theSubjectPublicKeyInfocarried by the request, byte-for-byte as encoded in the request.- Returns:
- the exact SPKI DER
-
certificationRequestInfo
byte[] certificationRequestInfo()Returns the exact DER of thecertificationRequestInfo(the to-be-signed portion of the request).- Returns:
- the to-be-signed DER
-
signature
byte[] signature()Returns the request self-signature bytes.- Returns:
- the signature bytes
-
encoded
byte[] encoded()Returns the exact DER encoding of the whole request.- Returns:
- the request DER
-
verifySelfSignature
boolean verifySelfSignature()Verifies proof of possession by checking the request self-signature against the request's own public key.- Returns:
trueif the self-signature is valid
-