Top Description Fields Constructors Methods
org.bouncycastle.tsp

public Class TimeStampRequest

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, java.math.BigInteger, java.util.Arrays, .Collections, .Enumeration, .HashSet, .Iterator, .List, .Set, org.bouncycastle.asn1.ASN1InputStream, .ASN1ObjectIdentifier, org.bouncycastle.asn1.cmp.PKIFailureInfo, org.bouncycastle.asn1.tsp.TimeStampReq, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .Extension, .Extensions

Base class for an RFC 3161 Time Stamp Request.

Field Summary

Modifier and TypeField and Description
private static Set<E>
private Extensions
private TimeStampReq

Constructor Summary

AccessConstructor and Description
public
public
TimeStampRequest(byte[]
byte array containing the request.
req
)

Create a TimeStampRequest from the past in byte array.

public
TimeStampRequest(InputStream
input stream containing the request.
in
)

Create a TimeStampRequest from the past in input stream.

Method Summary

Modifier and TypeMethod and Description
private Set<E>
convert(Set<E> orig)

public boolean
public Set<E>

Returns:

a set of ASN1ObjectIdentifiers.
getCriticalExtensionOIDs
()

Returns a set of ASN1ObjectIdentifiers giving the critical extensions.

public byte[]

Returns:

the default ASN,1 byte encoding for the object.
getEncoded
()

return the ASN.1 encoded representation of this object.

public Extension
public List<E>
pack-priv Extensions
public AlgorithmIdentifier
public ASN1ObjectIdentifier
public byte[]
public BigInteger
public Set<E>

Returns:

a set of ASN1ObjectIdentifiers.
getNonCriticalExtensionOIDs
()

Returns a set of ASN1ObjectIdentifiers giving the non-critical extensions.

public ASN1ObjectIdentifier
public int
public boolean
private static TimeStampReq
public void
validate(Set<E>
a set of OIDs giving accepted algorithms.
algorithms
,
Set<E>
if non-null a set of policies OIDs we are willing to sign under.
policies
,
Set<E>
if non-null a set of extensions OIDs we are willing to accept.
extensions
)

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_SETback to summary
private static Set<E> EMPTY_SET
extensionsback to summary
private Extensions extensions
reqback to summary
private TimeStampReq req

Constructor Detail

TimeStampRequestback to summary
public TimeStampRequest(TimeStampReq req)
TimeStampRequestback to summary
public TimeStampRequest(byte[] req) throws IOException

Create a TimeStampRequest from the past in byte array.

Parameters
req:byte[]

byte array containing the request.

Exceptions
IOException:
if the request is malformed.
TimeStampRequestback to summary
public TimeStampRequest(InputStream in) throws IOException

Create a TimeStampRequest from the past in input stream.

Parameters
in:InputStream

input stream containing the request.

Exceptions
IOException:
if the request is malformed.

Method Detail

convertback to summary
private Set<E> convert(Set<E> orig)
getCertReqback to summary
public boolean getCertReq()
getCriticalExtensionOIDsback to summary
public Set<E> getCriticalExtensionOIDs()

Returns a set of ASN1ObjectIdentifiers giving the critical extensions.

Returns:Set<E>

a set of ASN1ObjectIdentifiers.

getEncodedback to summary
public byte[] getEncoded() throws IOException

return the ASN.1 encoded representation of this object.

Returns:byte[]

the default ASN,1 byte encoding for the object.

getExtensionback to summary
public Extension getExtension(ASN1ObjectIdentifier oid)
getExtensionOIDsback to summary
public List<E> getExtensionOIDs()
getExtensionsback to summary
pack-priv Extensions getExtensions()
getMessageImprintAlgIDback to summary
public AlgorithmIdentifier getMessageImprintAlgID()
getMessageImprintAlgOIDback to summary
public ASN1ObjectIdentifier getMessageImprintAlgOID()
getMessageImprintDigestback to summary
public byte[] getMessageImprintDigest()
getNonceback to summary
public BigInteger getNonce()
getNonCriticalExtensionOIDsback to summary
public Set<E> getNonCriticalExtensionOIDs()

Returns a set of ASN1ObjectIdentifiers giving the non-critical extensions.

Returns:Set<E>

a set of ASN1ObjectIdentifiers.

getReqPolicyback to summary
public ASN1ObjectIdentifier getReqPolicy()
getVersionback to summary
public int getVersion()
hasExtensionsback to summary
public boolean hasExtensions()
loadRequestback to summary
private static TimeStampReq loadRequest(InputStream in) throws IOException
validateback to summary
public void validate(Set<E> algorithms, Set<E> policies, Set<E> extensions) throws TSPException

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:Set<E>

a set of OIDs giving accepted algorithms.

policies:Set<E>

if non-null a set of policies OIDs we are willing to sign under.

extensions:Set<E>

if non-null a set of extensions OIDs we are willing to accept.

Exceptions
TSPException:
if the request is invalid, or processing fails.