|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdemo.cms.tsp.TSPDemoUtils
public class TSPDemoUtils
Some utils for creating and sending time stamp requests, validating responses and adding time stamp token attributes. Used by the TSP demo.
TimeStampDemo
,
TimeStampListener
Constructor Summary | |
---|---|
TSPDemoUtils()
|
Method Summary | |
---|---|
static iaik.tsp.TimeStampReq |
createRequest(iaik.cms.SignerInfo signerInfo,
iaik.asn1.ObjectID reqPolicy)
Creates a TimeStampRequest for the given SignerInfo. |
static iaik.tsp.TimeStampResp |
sendRequest(iaik.tsp.TimeStampReq request,
java.lang.String tsaUrl)
Sends the given time stamp request to the given TSA. |
static void |
timeStamp(iaik.tsp.TimeStampToken tspToken,
iaik.cms.SignerInfo signerInfo)
Adds a SignatureTimeStampToken attribute to the given SignerInfo. |
static void |
validateResponse(iaik.tsp.TimeStampResp response,
iaik.tsp.TimeStampReq request)
Validates the response received from the TSA. |
static void |
validateSignatureTimeStampToken(iaik.cms.SignerInfo signerInfo)
Validates an unsigned SignatureTimeStampToken contained in the given SignerInfo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TSPDemoUtils()
Method Detail |
---|
public static iaik.tsp.TimeStampReq createRequest(iaik.cms.SignerInfo signerInfo, iaik.asn1.ObjectID reqPolicy) throws iaik.tsp.TspException
signerInfo
- the SignerInfo to be time stampedreqPolicy
- the policy of the TSA from which to get a response,
maybe null
if we accept any TSA
iaik.tsp.TspException
- if some error occurs during time stamp creationpublic static iaik.tsp.TimeStampResp sendRequest(iaik.tsp.TimeStampReq request, java.lang.String tsaUrl) throws iaik.tsp.TspException
request
- the time stamp request to be sent to the TSAtsaUrl
- the URL of the time stamp authority from which to
get the time stamp
iaik.tsp.TspException
- if an error occurs during sending the request to the TSA (e.g.
connecting to the TSA fails, ...)
java.lang.NullPointerException
- if request
or tsaUrl
are null
public static void timeStamp(iaik.tsp.TimeStampToken tspToken, iaik.cms.SignerInfo signerInfo) throws iaik.tsp.TspException
tspToken
- the time stamp token to be added as attributesignerInfo
- the SignerInfo to be time stamped
iaik.tsp.TspException
- if some error occurs when adding the attributepublic static void validateResponse(iaik.tsp.TimeStampResp response, iaik.tsp.TimeStampReq request) throws iaik.tsp.TspException
response
- the time stamp response to be validatedrequest
- the time stamp request that has been sent
iaik.tsp.TspException
- if the response is invalid (wrong MessageImprint, missing certificate,...)public static void validateSignatureTimeStampToken(iaik.cms.SignerInfo signerInfo) throws iaik.tsp.TspException
signerInfo
- the SignerInfo containing the SignatureTimeStampToken attribute
iaik.tsp.TspException
- if the time stamp token validation fails
java.lang.NullPointerException
- if the SignerInfo does not contain a
SignatureTimeStampToken as expected
|
IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
![]() |