com.digt.trusted.tsp
Class TimeStampRequest
java.lang.Object
com.digt.trusted.tsp.TimeStampRequest
- All Implemented Interfaces:
- java.security.cert.X509Extension
public class TimeStampRequest
- extends java.lang.Object
- implements java.security.cert.X509Extension
Base class for an RFC 3161 Time Stamp Request.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeStampRequest
public TimeStampRequest(TimeStampReq req)
TimeStampRequest
public TimeStampRequest(byte[] req)
throws java.io.IOException
- Throws:
java.io.IOException
TimeStampRequest
public TimeStampRequest(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
getVersion
public int getVersion()
getMessageImprintAlgOID
public java.lang.String getMessageImprintAlgOID()
getMessageImprintDigest
public byte[] getMessageImprintDigest()
getReqPolicy
public java.lang.String getReqPolicy()
getNonce
public java.math.BigInteger getNonce()
getCertReq
public boolean getCertReq()
validate
public void validate(java.util.Set algorithms,
java.util.Set policies,
java.util.Set extensions,
java.lang.String provider)
throws TSPException,
java.security.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
java.security.NoSuchProviderException
getEncoded
public byte[] getEncoded()
throws java.io.IOException
- return the ASN.1 encoded representation of this object.
- Throws:
java.io.IOException
getExtensionValue
public byte[] getExtensionValue(java.lang.String oid)
- Specified by:
getExtensionValue
in interface java.security.cert.X509Extension
getNonCriticalExtensionOIDs
public java.util.Set getNonCriticalExtensionOIDs()
- Specified by:
getNonCriticalExtensionOIDs
in interface java.security.cert.X509Extension
getCriticalExtensionOIDs
public java.util.Set getCriticalExtensionOIDs()
- Specified by:
getCriticalExtensionOIDs
in interface java.security.cert.X509Extension
hasUnsupportedCriticalExtension
public boolean hasUnsupportedCriticalExtension()
- Specified by:
hasUnsupportedCriticalExtension
in interface java.security.cert.X509Extension