Package org.bouncycastle.cert.plants
Class LandmarkCertificateManager.TrustedSubtreeManager
- java.lang.Object
-
- org.bouncycastle.cert.plants.LandmarkCertificateManager.TrustedSubtreeManager
-
- Enclosing class:
- LandmarkCertificateManager
public static class LandmarkCertificateManager.TrustedSubtreeManager extends java.lang.ObjectMaintains a relying-party-side list of trusted subtrees by accepting new landmarks that come with a cosigned reference checkpoint and a subtree consistency proof.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLandmarkCertificateManager.TrustedSubtreeManager.CheckpointA snapshot of the log: tree size and root hash.
-
Constructor Summary
Constructors Constructor Description TrustedSubtreeManager(byte[] logId, MerkleTreeHash hashFunc, MTCCosignerVerifierProvider cosignerVerifierProvider, int minCosignaturesForCheckpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddLandmarkSubtree(long subtreeStart, long subtreeEnd, byte[] subtreeHash, LandmarkCertificateManager.TrustedSubtreeManager.Checkpoint referenceCheckpoint, java.util.List<byte[]> consistencyProof, java.util.List<MTCSignature> checkpointSignatures)Attempts to add a new landmark subtree.java.util.List<LandmarkCertificateManager.TrustedSubtreeEntry>getTrustedSubtrees()
-
-
-
Constructor Detail
-
TrustedSubtreeManager
public TrustedSubtreeManager(byte[] logId, MerkleTreeHash hashFunc, MTCCosignerVerifierProvider cosignerVerifierProvider, int minCosignaturesForCheckpoint)- Parameters:
logId- binary trust anchor ID of the loghashFunc- hash function used by the logcosignerVerifierProvider- provider that hands back a verifier per known cosigner IDminCosignaturesForCheckpoint- minimum valid cosignatures required to trust a checkpoint
-
-
Method Detail
-
getTrustedSubtrees
public java.util.List<LandmarkCertificateManager.TrustedSubtreeEntry> getTrustedSubtrees()
-
addLandmarkSubtree
public boolean addLandmarkSubtree(long subtreeStart, long subtreeEnd, byte[] subtreeHash, LandmarkCertificateManager.TrustedSubtreeManager.Checkpoint referenceCheckpoint, java.util.List<byte[]> consistencyProof, java.util.List<MTCSignature> checkpointSignatures) throws java.io.IOExceptionAttempts to add a new landmark subtree. The subtree is accepted if:- The reference checkpoint carries enough valid cosignatures, and
- The supplied subtree consistency proof relates the subtree to that checkpoint.
- Returns:
trueif the landmark was added- Throws:
java.io.IOException
-
-