public final class CosignerRequirement
extends java.lang.Object
A requirement is a tree. The leaves name a cosigner, either by its
cosigner ID (cosigner(byte[])) or as the CA that issued the
certificate under validation (issuingCA(), whose cosigner ID is
the CA ID in the certificate's issuer). The interior nodes are quorums over
their members (atLeast(int, CosignerRequirement[]), with
anyOf(CosignerRequirement[]) and allOf(CosignerRequirement[]) as the
two common thresholds), so a policy such as "the CA and at least two
independent operators" is
CosignerRequirement.allOf(
CosignerRequirement.issuingCA(),
CosignerRequirement.atLeast(2,
CosignerRequirement.anyOf(operatorA1, operatorA2),
CosignerRequirement.anyOf(operatorB1),
CosignerRequirement.anyOf(operatorC1, operatorC2)))
Section 7.3 recommends that a relying party require the CA cosigner, for
authenticity, together with a quorum of additional cosigners, for
transparency. MerkleTreeCertificateValidator evaluates the
requirements in MerkleTreeCertificateValidator.ValidationParams
against the cosignatures that verified under the registered
MTCCosignerVerifierProvider; a cosigner that is not registered
never satisfies a leaf. A certificate whose subtree matches a trusted
subtree (Section 7.4) is accepted without reference to the requirements,
since a trusted subtree is one already known to satisfy them.
Instances are immutable.
| Modifier and Type | Method and Description |
|---|---|
static CosignerRequirement |
allOf(CosignerRequirement... members)
A requirement satisfied only when every member requirement is.
|
static CosignerRequirement |
anyOf(CosignerRequirement... members)
A requirement satisfied when any one of the member requirements is.
|
static CosignerRequirement |
atLeast(int threshold,
CosignerRequirement... members)
A requirement satisfied when at least
threshold of the member
requirements are satisfied. |
static CosignerRequirement |
cosigner(byte[] cosignerId)
A requirement satisfied by a valid cosignature from the cosigner with the
given binary cosigner ID (see
TrustAnchorIDs). |
byte[] |
getCosignerId()
The cosigner ID a
cosigner(byte[]) leaf names, or null for any other node. |
java.util.List<CosignerRequirement> |
getMembers()
The members of a quorum node, or an empty list for a leaf.
|
int |
getThreshold()
The number of members a quorum node needs satisfied, or 0 for a leaf.
|
boolean |
isIssuingCA()
True for the
issuingCA() leaf. |
boolean |
isSatisfiedBy(java.util.Collection<byte[]> verifiedCosignerIds,
byte[] caId)
Evaluates this requirement against the cosigners whose cosignatures
verified.
|
static CosignerRequirement |
issuingCA()
A requirement satisfied by a valid cosignature from the CA that issued
the certificate being validated: the cosigner whose ID equals the CA ID
carried in the certificate's issuer name.
|
java.lang.String |
toString()
A readable form, with cosigner IDs in dotted decimal:
CA,
32473.2.1, atLeast(2: 32473.2.1, 32473.2.2, 32473.2.3). |
public static CosignerRequirement cosigner(byte[] cosignerId)
TrustAnchorIDs).public static CosignerRequirement issuingCA()
public static CosignerRequirement atLeast(int threshold, CosignerRequirement... members)
threshold of the member
requirements are satisfied.threshold - the number of members that must be satisfied, from 1 to the number of membersmembers - the member requirements, at least onepublic static CosignerRequirement anyOf(CosignerRequirement... members)
public static CosignerRequirement allOf(CosignerRequirement... members)
public boolean isSatisfiedBy(java.util.Collection<byte[]> verifiedCosignerIds,
byte[] caId)
verifiedCosignerIds - the binary cosigner IDs whose cosignatures over the subtree verifiedcaId - the binary CA ID of the certificate's issuer, which issuingCA() leaves match, or null if unknownpublic byte[] getCosignerId()
cosigner(byte[]) leaf names, or null for any other node.public boolean isIssuingCA()
issuingCA() leaf.public int getThreshold()
public java.util.List<CosignerRequirement> getMembers()
public java.lang.String toString()
CA,
32473.2.1, atLeast(2: 32473.2.1, 32473.2.2, 32473.2.3).toString in class java.lang.Object