Class DeltaCertAttributeUtils
java.lang.Object
org.bouncycastle.pkcs.DeltaCertAttributeUtils
Helpers for working with the delta certificate request attribute carried by a paired
("chameleon") PKCS#10 request โ see
draft-bonnell-lamps-chameleon-certs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDeltaRequestSignatureValid(PKCS10CertificationRequest baseRequest, ContentVerifierProvider contentVerifierProvider) Verify the delta signature attached to a base PKCS#10 request.trimDeltaCertificateRequest(DeltaCertificateRequestAttributeValue delta, PKCS10CertificationRequest baseRequest) Return a copy ofdeltawith subject, signatureAlgorithm and extensions fields stripped when they match the corresponding fields ofbaseRequest.
-
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:
trueif the delta signature is valid,falseotherwise.- Throws:
PKCSException- if the signature cannot be processed.
-
trimDeltaCertificateRequest
public static DeltaCertificateRequestAttributeValue trimDeltaCertificateRequest(DeltaCertificateRequestAttributeValue delta, PKCS10CertificationRequest baseRequest) Return a copy ofdeltawith subject, signatureAlgorithm and extensions fields stripped when they match the corresponding fields ofbaseRequest.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.
-