Class DeltaCertAttributeUtils

java.lang.Object
org.bouncycastle.pkcs.DeltaCertAttributeUtils

public class DeltaCertAttributeUtils extends Object
Helpers for working with the delta certificate request attribute carried by a paired ("chameleon") PKCS#10 request โ€” see draft-bonnell-lamps-chameleon-certs.
  • Constructor Details

    • DeltaCertAttributeUtils

      public DeltaCertAttributeUtils()
  • Method Details

    • isDeltaRequestSignatureValid

      public static boolean isDeltaRequestSignatureValid(PKCS10CertificationRequest baseRequest, ContentVerifierProvider contentVerifierProvider) throws PKCSException
      Verify the delta signature attached to a base PKCS#10 request. Reconstructs the delta CertificationRequest from the base โ€” stripping the delta-signature attribute โ€” and validates the delta signature with the supplied verifier provider.
      Parameters:
      baseRequest - the base PKCS#10 request carrying the delta attributes.
      contentVerifierProvider - provider able to verify the delta signature algorithm.
      Returns:
      true if the delta signature is valid, false otherwise.
      Throws:
      PKCSException - if the signature cannot be processed.
    • trimDeltaCertificateRequest

      public static DeltaCertificateRequestAttributeValue trimDeltaCertificateRequest(DeltaCertificateRequestAttributeValue delta, PKCS10CertificationRequest baseRequest)
      Return a copy of delta with subject, signatureAlgorithm and extensions fields stripped when they match the corresponding fields of baseRequest.

      Mirrors the cert-side rule in DeltaCertificateTool.trimDeltaCertificateDescriptor(DeltaCertificateDescriptor, TBSCertificate, Extensions): draft-bonnell-lamps-chameleon-certs ยง4.1 says the extensions field MUST NOT contain any extension which has the same criticality and DER-encoded value as the base, whose type does not appear in the base, or which is the DCD extension type itself.