public class TimeStampResponseGenerator extends Object
Constructor and Description |
---|
TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator,
Set acceptedAlgorithms) |
TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator,
Set acceptedAlgorithms,
Set acceptedPolicy) |
TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator,
Set acceptedAlgorithms,
Set acceptedPolicies,
Set acceptedExtensions) |
Modifier and Type | Method and Description |
---|---|
TimeStampResponse |
generate(TimeStampRequest request,
BigInteger serialNumber,
Date genTime)
Return an appropriate TimeStampResponse.
|
TimeStampResponse |
generate(TimeStampRequest request,
BigInteger serialNumber,
Date genTime,
String provider)
Deprecated.
use method that does not require provider
|
TimeStampResponse |
generateFailResponse(int status,
int failInfoField,
String statusString)
Generate a TimeStampResponse with chosen status and FailInfoField.
|
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, Set acceptedAlgorithms)
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, Set acceptedAlgorithms, Set acceptedPolicy)
public TimeStampResponseGenerator(TimeStampTokenGenerator tokenGenerator, Set acceptedAlgorithms, Set acceptedPolicies, Set acceptedExtensions)
public TimeStampResponse generate(TimeStampRequest request, BigInteger serialNumber, Date genTime, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, TSPException
If genTime is null a timeNotAvailable error response will be returned.
request
- the request this response is for.serialNumber
- serial number for the response token.genTime
- generation time for the response token.provider
- provider to use for signature calculation.NoSuchAlgorithmException
NoSuchProviderException
TSPException
public TimeStampResponse generate(TimeStampRequest request, BigInteger serialNumber, Date genTime) throws TSPException
If genTime is null a timeNotAvailable error response will be returned.
request
- the request this response is for.serialNumber
- serial number for the response token.genTime
- generation time for the response token.NoSuchAlgorithmException
TSPException
public TimeStampResponse generateFailResponse(int status, int failInfoField, String statusString) throws TSPException
status
- the PKIStatus to set.failInfoField
- the FailInfoField to set.statusString
- an optional string describing the failure.TSPException
- in case the response could not be createdCopyright © 2015. All rights reserved.