public class TSAClientBouncyCastle extends Object implements TSAClient
Created by Aiken Sam, 2006-11-15, refactored by Martin Brunecky, 07/15/2007 for ease of subclassing.
| Modifier and Type | Field and Description |
|---|---|
protected int |
tokSzEstimate
Estimate of the received time stamp token
|
protected String |
tsaPassword
TSA password
|
protected String |
tsaURL
URL of the Time Stamp Authority
|
protected String |
tsaUsername
TSA Username
|
| Constructor and Description |
|---|
TSAClientBouncyCastle(String url)
Creates an instance of a TSAClient that will use BouncyCastle.
|
TSAClientBouncyCastle(String url,
String username,
String password)
Creates an instance of a TSAClient that will use BouncyCastle.
|
TSAClientBouncyCastle(String url,
String username,
String password,
int tokSzEstimate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getTimeStampToken(byte[] imprint)
Get timestamp token - Bouncy Castle request encoding / decoding layer
|
byte[] |
getTimeStampToken(PdfPKCS7 caller,
byte[] imprint)
Get RFC 3161 timeStampToken.
|
int |
getTokenSizeEstimate()
Get the token size estimate.
|
protected byte[] |
getTSAResponse(byte[] requestBytes)
Get timestamp token - communications layer
|
protected String tsaURL
protected String tsaUsername
protected String tsaPassword
protected int tokSzEstimate
public TSAClientBouncyCastle(String url)
url - String - Time Stamp Authority URL (i.e.
"http://tsatest1.digistamp.com/TSA")public TSAClientBouncyCastle(String url, String username, String password)
url - String - Time Stamp Authority URL (i.e.
"http://tsatest1.digistamp.com/TSA")username - String - user(account) namepassword - String - passwordpublic TSAClientBouncyCastle(String url, String username, String password, int tokSzEstimate)
url - String - Time Stamp Authority URL (i.e.
"http://tsatest1.digistamp.com/TSA")username - String - user(account) namepassword - String - passwordtokSzEstimate - int - estimated size of received time stamp token (DER encoded)public int getTokenSizeEstimate()
getTokenSizeEstimate in interface TSAClientpublic byte[] getTimeStampToken(PdfPKCS7 caller, byte[] imprint) throws Exception
getTimeStampToken in interface TSAClientcaller - PdfPKCS7 - calling PdfPKCS7 instance (in case caller needs it)imprint - byte[] - data imprint to be time-stampedException - - TSA request failedTSAClient.getTimeStampToken(com.lowagie.text.pdf.PdfPKCS7,
byte[])protected byte[] getTimeStampToken(byte[] imprint)
throws Exception
ExceptionCopyright © 2019. All rights reserved.