Class MerkleTreeCertificateValidator.ValidationParams
- Enclosing class:
MerkleTreeCertificateValidator
authorityInfo is optional. When non-null it pins the validator
to the CA's published MTCCertificationAuthority extension and
enforces:
- The cert's serial number lies within the CA's authorized range
[authorityInfo.getMinSerial(), authorityInfo.getMaxSerial()](Section 5.5 / 7.2).
The log hash function is not part of the structure: a relying party
configured from a CA certificate takes it from the extension type
(MTCCertificationAuthorityCertificate.logHashAlgorithm(X509CertificateHolder), Section 7.1)
and is responsible for supplying a matching hashFunction here.
authorityInfo.getSigAlg() is the CA cosigner's published signature
algorithm. MTCSignatureVerifier.getAlgorithm() surfaces the MTC
algorithm string a registered verifier is bound to, but the draft fixes
no mapping from signature algorithm identifiers to cosigner algorithms,
so the validator does not map sigAlg to that string itself. Callers
building the provider for the CA cosigner remain responsible for
checking the verifier they register against
authorityInfo.getSigAlg().
The cosigner policy (Section 7.3) has two parts. minCosignatures
is a floor on the number of registered cosigners whose cosignatures
verify. requireCosigners(CosignerRequirement) adds a
CosignerRequirement, a quorum over named cosigners and the
issuing CA, each of which must also be satisfied; a relying party
following the Section 7.3 guidance requires
CosignerRequirement.issuingCA() and a quorum of independent
witnesses. Both parts are waived for a certificate in a trusted subtree.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, List<MerkleTreeCertificateValidator.TrustedSubtree> trustedSubtrees, List<MerkleTreeCertificateValidator.RevokedRange> revokedRanges, int minCosignatures, MerkleTreeHash hashFunction, org.bouncycastle.asn1.x509.MTCCertificationAuthority authorityInfo) ValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, MerkleTreeHash hashFunction, int minCosignatures, org.bouncycastle.asn1.x509.MTCCertificationAuthority authorityInfo) Convenience constructor for the common case where the relying party has no pre-distributed trusted subtrees and no revocations to apply.ValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, MerkleTreeHash hashFunction, List<MerkleTreeCertificateValidator.TrustedSubtree> trustedSubtrees, List<MerkleTreeCertificateValidator.RevokedRange> revokedRanges, int minCosignatures) -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.x509.MTCCertificationAuthorityThe cosigner requirements added withrequireCosigners(CosignerRequirement), all of which must be satisfied; empty if none.intrequireCosigners(CosignerRequirement requirement) Returns a copy of these parameters that additionally requiresrequirementto be satisfied by the cosigners whose cosignatures verify.
-
Constructor Details
-
ValidationParams
public ValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, MerkleTreeHash hashFunction, List<MerkleTreeCertificateValidator.TrustedSubtree> trustedSubtrees, List<MerkleTreeCertificateValidator.RevokedRange> revokedRanges, int minCosignatures) -
ValidationParams
public ValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, MerkleTreeHash hashFunction, int minCosignatures, org.bouncycastle.asn1.x509.MTCCertificationAuthority authorityInfo) Convenience constructor for the common case where the relying party has no pre-distributed trusted subtrees and no revocations to apply. DefaultstrustedSubtreesandrevokedRangesto empty lists. -
ValidationParams
public ValidationParams(MTCCosignerVerifierProvider cosignerVerifierProvider, List<MerkleTreeCertificateValidator.TrustedSubtree> trustedSubtrees, List<MerkleTreeCertificateValidator.RevokedRange> revokedRanges, int minCosignatures, MerkleTreeHash hashFunction, org.bouncycastle.asn1.x509.MTCCertificationAuthority authorityInfo)
-
-
Method Details
-
requireCosigners
public MerkleTreeCertificateValidator.ValidationParams requireCosigners(CosignerRequirement requirement) Returns a copy of these parameters that additionally requiresrequirementto be satisfied by the cosigners whose cosignatures verify. Each call adds a requirement; all of them must hold. The cosigners a requirement names must be registered with theMTCCosignerVerifierProvider, since only a verified cosignature satisfies a requirement. -
getCosignerVerifierProvider
-
getTrustedSubtrees
-
getRevokedRanges
-
getMinCosignatures
public int getMinCosignatures() -
getHashFunction
-
getAuthorityInfo
public org.bouncycastle.asn1.x509.MTCCertificationAuthority getAuthorityInfo() -
getCosignerRequirements
The cosigner requirements added withrequireCosigners(CosignerRequirement), all of which must be satisfied; empty if none.
-