public class TimeStampRequest extends Object implements X509Extension
| Constructor and Description |
|---|
TimeStampRequest(byte[] req)
Create a TimeStampRequest from the past in byte array.
|
TimeStampRequest(InputStream in)
Create a TimeStampRequest from the past in input stream.
|
TimeStampRequest(TimeStampReq req) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCertReq() |
Set |
getCriticalExtensionOIDs() |
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object.
|
X509Extension |
getExtension(ASN1ObjectIdentifier oid) |
List |
getExtensionOIDs() |
byte[] |
getExtensionValue(String oid) |
String |
getMessageImprintAlgOID() |
byte[] |
getMessageImprintDigest() |
BigInteger |
getNonce() |
Set |
getNonCriticalExtensionOIDs() |
String |
getReqPolicy() |
int |
getVersion() |
boolean |
hasExtensions() |
boolean |
hasUnsupportedCriticalExtension() |
void |
validate(Set algorithms,
Set policies,
Set extensions) |
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.
|
public TimeStampRequest(TimeStampReq req)
public TimeStampRequest(byte[] req)
throws IOException
req - byte array containing the request.IOException - if the request is malformed.public TimeStampRequest(InputStream in) throws IOException
in - input stream containing the request.IOException - if the request is malformed.public int getVersion()
public String getMessageImprintAlgOID()
public byte[] getMessageImprintDigest()
public String getReqPolicy()
public BigInteger getNonce()
public boolean getCertReq()
public void validate(Set algorithms, Set policies, Set extensions, String provider) throws TSPException, NoSuchProviderException
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.NoSuchProviderExceptionpublic void validate(Set algorithms, Set policies, Set extensions) throws TSPException
TSPExceptionpublic byte[] getEncoded()
throws IOException
IOExceptionpublic boolean hasExtensions()
public X509Extension getExtension(ASN1ObjectIdentifier oid)
public List getExtensionOIDs()
public byte[] getExtensionValue(String oid)
getExtensionValue in interface X509Extensionpublic Set getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs in interface X509Extensionpublic Set getCriticalExtensionOIDs()
getCriticalExtensionOIDs in interface X509Extensionpublic boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension in interface X509ExtensionCopyright © 2015. All rights reserved.