Class TSAClient
- java.lang.Object
-
- org.apache.pdfbox.examples.signature.TSAClient
-
public class TSAClient extends java.lang.ObjectTime Stamping Authority (TSA) Client [RFC 3161].
-
-
Field Summary
Fields Modifier and Type Field Description private static org.bouncycastle.operator.DigestAlgorithmIdentifierFinderALGORITHM_OID_FINDERprivate java.security.MessageDigestdigestprivate static org.apache.commons.logging.LogLOGprivate java.lang.Stringpasswordprivate static java.util.RandomRANDOMprivate java.net.URLurlprivate java.lang.Stringusername
-
Constructor Summary
Constructors Constructor Description TSAClient(java.net.URL url, java.lang.String username, java.lang.String password, java.security.MessageDigest digest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.tsp.TimeStampTokengetTimeStampToken(java.io.InputStream content)private byte[]getTSAResponse(byte[] request)
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
ALGORITHM_OID_FINDER
private static final org.bouncycastle.operator.DigestAlgorithmIdentifierFinder ALGORITHM_OID_FINDER
-
url
private final java.net.URL url
-
username
private final java.lang.String username
-
password
private final java.lang.String password
-
digest
private final java.security.MessageDigest digest
-
RANDOM
private static final java.util.Random RANDOM
-
-
Method Detail
-
getTimeStampToken
public org.bouncycastle.tsp.TimeStampToken getTimeStampToken(java.io.InputStream content) throws java.io.IOException- Parameters:
content-- Returns:
- the time stamp token
- Throws:
java.io.IOException- if there was an error with the connection or data from the TSA server, or if the time stamp response could not be validated
-
getTSAResponse
private byte[] getTSAResponse(byte[] request) throws java.io.IOException- Throws:
java.io.IOException
-
-