org.bouncycastle.tsp

Class TimeStampRequest

Implemented Interfaces:
X509Extension

public class TimeStampRequest
extends java.lang.Object
implements X509Extension

Base class for an RFC 3161 Time Stamp Request.

Constructor Summary

TimeStampRequest(InputStream in)
TimeStampRequest(TimeStampReq req)
TimeStampRequest(byte[] req)

Method Summary

boolean
getCertReq()
Set
getCriticalExtensionOIDs()
byte[]
getEncoded()
return the ASN.1 encoded representation of this object.
byte[]
getExtensionValue(String oid)
String
getMessageImprintAlgOID()
byte[]
getMessageImprintDigest()
Set
getNonCriticalExtensionOIDs()
BigInteger
getNonce()
String
getReqPolicy()
int
getVersion()
boolean
hasUnsupportedCriticalExtension()
void
validate(Set algorithms, Set policies, Set extensions, String provider)
Validate the timestamp request, checking the digest to see if it is of an accepted type and whether it is of the correct length for the algorithm specified.

Constructor Details

TimeStampRequest

public TimeStampRequest(InputStream in)
            throws IOException

TimeStampRequest

public TimeStampRequest(TimeStampReq req)

TimeStampRequest

public TimeStampRequest(byte[] req)
            throws IOException

Method Details

getCertReq

public boolean getCertReq()

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()

getEncoded

public byte[] getEncoded()
            throws IOException
return the ASN.1 encoded representation of this object.

getExtensionValue

public byte[] getExtensionValue(String oid)

getMessageImprintAlgOID

public String getMessageImprintAlgOID()

getMessageImprintDigest

public byte[] getMessageImprintDigest()

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()

getNonce

public BigInteger getNonce()

getReqPolicy

public String getReqPolicy()

getVersion

public int getVersion()

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()

validate

public void validate(Set algorithms,
                     Set policies,
                     Set extensions,
                     String provider)
            throws TSPException,
                   NoSuchProviderException
Validate the timestamp request, checking the digest to see if it is of an accepted type and whether it is of the correct length for the algorithm specified.
Parameters:
algorithms - a set of String OIDS giving accepted algorithms.
policies - if non-null a set of policies we are willing to sign under.
extensions - if non-null a set of extensions we are willing to accept.
provider - the provider to confirm the digest size against.
Throws:
TSPException -