public class TSPTimeStampService extends Object implements TimeStampService
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_USER_AGENT |
| Constructor and Description |
|---|
TSPTimeStampService(String tspServiceUrl,
TimeStampServiceValidator validator) |
TSPTimeStampService(String tspServiceUrl,
TimeStampServiceValidator validator,
String requestPolicy,
String userAgent)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
resetAuthenticationCredentials()
Resets the authentication credentials.
|
void |
resetProxy()
Resets the HTTP proxy settings.
|
void |
setAuthenticationCredentials(String username,
String password)
Sets the credentials used in case the TSP service requires
authentication.
|
void |
setDigestAlgo(String digestAlgo)
Sets the digest algorithm used for time-stamping data.
|
void |
setProxy(String proxyHost,
int proxyPort)
Configures the HTTP proxy settings to be used to connect to the TSP
service.
|
void |
setRequestPolicy(String policyOid)
Sets the request policy OID.
|
byte[] |
timeStamp(byte[] data,
RevocationData revocationData)
Gives back the encoded time-stamp token for the given array of data
bytes.
|
public static final String DEFAULT_USER_AGENT
public TSPTimeStampService(String tspServiceUrl, TimeStampServiceValidator validator)
public TSPTimeStampService(String tspServiceUrl, TimeStampServiceValidator validator, String requestPolicy, String userAgent)
tspServiceUrl - the URL of the TSP service.validator - the trust validator used to validate incoming TSP response
signatures.requestPolicy - the optional TSP request policy.userAgent - the optional User-Agent TSP request header value.public void setRequestPolicy(String policyOid)
policyOid - public void setAuthenticationCredentials(String username, String password)
username - password - public void resetAuthenticationCredentials()
public void setDigestAlgo(String digestAlgo)
digestAlgo - public void setProxy(String proxyHost, int proxyPort)
proxyHost - proxyPort - public void resetProxy()
public byte[] timeStamp(byte[] data,
RevocationData revocationData)
throws Exception
TimeStampServicetimeStamp in interface TimeStampServicedata - the data to be time-stamped.revocationData - the optional container that needs to be filled up with the
revocation data used to validate the TSA certificate chain.Exception - in case something went wrong.Copyright © 2008-2018 FedICT. All Rights Reserved.