Class BcX509CertificationRequestParser

java.lang.Object
zeroecho.pki.impl.framework.x509.bc.BcX509CertificationRequestParser
All Implemented Interfaces:
CertificationRequestParser

public final class BcX509CertificationRequestParser extends Object implements CertificationRequestParser
Parser for X.509 PKCS#10 certification requests, routed through the ZeroEcho PKIX library.

This parser converts an incoming CertificationRequest in the X.509 framework format into a normalized ParsedCertificationRequest used by the PKI core. It supports CSR input encoded either directly as DER or as PEM carrying a PKCS#10 object that can be converted to DER.

This class does not verify proof of possession and does not evaluate issuance policy. Those responsibilities are delegated to other framework components.

Thread-safety

This class is stateless and thread-safe.

  • Constructor Details

    • BcX509CertificationRequestParser

      public BcX509CertificationRequestParser()
      Creates a stateless PKCS#10 request parser.
  • Method Details

    • parseX509

      Parses an explicitly typed original X.509 enrollment request. CRMF requires signing-key PoP over its complete subject/key CertRequest; parsing retains the proof but does not verify it.
      Specified by:
      parseX509 in interface CertificationRequestParser
      Parameters:
      request - bounded immutable original payload
      Returns:
      normalized request with one syntax-specific transport attribute
      Throws:
      PkiException - if the request or supported subject/SAN grammar is invalid
    • parse

      Parses a PKCS#10 certification request into the normalized PKI request representation.
      Specified by:
      parse in interface CertificationRequestParser
      Parameters:
      request - certification request to parse; must not be null
      Returns:
      normalized parsed certification request
      Throws:
      IllegalArgumentException - if request is null, if its format identifier does not match, or if its encoding is unsupported
      PkiException - if the PKCS#10 request is structurally invalid or its public key cannot be extracted
    • reconstructForRenewal

      public static ParsedCertificationRequest reconstructForRenewal(X509Certificate certificate, FormatId formatId)
      Reconstructs a certification request from an already-issued certificate for renewal or reissue, where no fresh PKCS#10 request exists.
      Parameters:
      certificate - already-issued certificate to reconstruct from
      formatId - active framework format identifier
      Returns:
      reconstructed request with no CSR transport attribute