net.ripe.rpki.commons.crypto.cms.manifest
Class ManifestCms

java.lang.Object
  extended by net.ripe.rpki.commons.crypto.cms.RpkiSignedObject
      extended by net.ripe.rpki.commons.crypto.cms.manifest.ManifestCms
All Implemented Interfaces:
Serializable, CertificateRepositoryObject

public class ManifestCms
extends RpkiSignedObject

A manifest of files published by a CA certificate.

Use the ManifestCmsBuilder or ManifestCmsParser to construct this object.

See Also:
Serialized Form

Nested Class Summary
static class ManifestCms.FileContentSpecification
           
 
Field Summary
static String CONTENT_TYPE_OID
           
static int DEFAULT_VERSION
           
static String FILE_HASH_ALGORITHM
           
 
Fields inherited from class net.ripe.rpki.commons.crypto.cms.RpkiSignedObject
DIGEST_ALGORITHM_OID, ENCRYPTION_ALGORITHM_OID
 
Method Summary
 boolean containsFile(String fileName)
           
 URI getCrlUri()
           
 ManifestCms.FileContentSpecification getFileContentSpecification(String fileName)
           
 String getFileHashAlgorithm()
           
 Set<String> getFileNames()
           
 Map<String,byte[]> getFiles()
           
 byte[] getHash(String fileName)
          Deprecated. use verifyFileContents(String, byte[]) or getFileContentSpecification(String).
 org.joda.time.DateTime getNextUpdateTime()
           
 BigInteger getNumber()
           
 URI getParentCertificateUri()
           
 org.joda.time.DateTime getThisUpdateTime()
           
 int getVersion()
           
static byte[] hashContents(byte[] contents)
           
 boolean matchesFiles(Map<String,byte[]> filesToMatch)
           
 int size()
           
 void validate(String location, CertificateRepositoryObjectValidationContext context, CrlLocator crlLocator, ValidationOptions options, ValidationResult result)
           
 boolean verifyFileContents(String fileName, byte[] contents)
           
 
Methods inherited from class net.ripe.rpki.commons.crypto.cms.RpkiSignedObject
equals, getCertificate, getCertificateIssuer, getCertificateSubject, getContentType, getEncoded, getNotValidAfter, getNotValidBefore, getSigningTime, getValidityPeriod, hashCode, signedBy
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_VERSION

public static final int DEFAULT_VERSION
See Also:
Constant Field Values

CONTENT_TYPE_OID

public static final String CONTENT_TYPE_OID
See Also:
Constant Field Values

FILE_HASH_ALGORITHM

public static final String FILE_HASH_ALGORITHM
Method Detail

getVersion

public int getVersion()

getNumber

public BigInteger getNumber()

getFileHashAlgorithm

public String getFileHashAlgorithm()

getThisUpdateTime

public org.joda.time.DateTime getThisUpdateTime()

getNextUpdateTime

public org.joda.time.DateTime getNextUpdateTime()

size

public int size()

containsFile

public boolean containsFile(String fileName)

getFiles

public Map<String,byte[]> getFiles()

matchesFiles

public boolean matchesFiles(Map<String,byte[]> filesToMatch)

getFileNames

public Set<String> getFileNames()

getCrlUri

public URI getCrlUri()
Specified by:
getCrlUri in interface CertificateRepositoryObject
Overrides:
getCrlUri in class RpkiSignedObject

getParentCertificateUri

public URI getParentCertificateUri()

validate

public void validate(String location,
                     CertificateRepositoryObjectValidationContext context,
                     CrlLocator crlLocator,
                     ValidationOptions options,
                     ValidationResult result)
Specified by:
validate in interface CertificateRepositoryObject
Overrides:
validate in class RpkiSignedObject

getHash

@Deprecated
public byte[] getHash(String fileName)
Deprecated. use verifyFileContents(String, byte[]) or getFileContentSpecification(String).


verifyFileContents

public boolean verifyFileContents(String fileName,
                                  byte[] contents)

getFileContentSpecification

public ManifestCms.FileContentSpecification getFileContentSpecification(String fileName)

hashContents

public static byte[] hashContents(byte[] contents)


Copyright © 2008-2013 RIPE NCC, the Netherlands. All Rights Reserved.