org.bouncycastle.tsp
Class TimeStampRequest
java.lang.Object
org.bouncycastle.tsp.TimeStampRequest
- X509Extension
public class TimeStampRequest
extends java.lang.Object
implements X509Extension
Base class for an RFC 3161 Time Stamp Request.
TimeStampRequest
public TimeStampRequest(InputStream in)
throws IOException
Create a TimeStampRequest from the past in input stream.
in
- input stream containing the request.
TimeStampRequest
public TimeStampRequest(TimeStampReq req)
TimeStampRequest
public TimeStampRequest(byte[] req)
throws IOException
Create a TimeStampRequest from the past in byte array.
req
- byte array containing the request.
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.
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.
TSPException
- if the request is invalid, or processing fails.