public final class TimeStampGenerator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DIGEST_ALGORITHM_SHA1 |
static String |
DIGEST_ALGORITHM_SHA256 |
static String |
DIGEST_ALGORITHM_SHA384 |
static String |
DIGEST_ALGORITHM_SHA512 |
| Modifier and Type | Method and Description |
|---|---|
static String |
getFailureInfoMessage(lv.eparaksts.org.bouncycastle.v170.asn1.cmp.PKIFailureInfo failureInfo) |
static Map<String,String> |
getForwardedClientCertRequestProperties(X509Certificate cert)
Encodes client certificate to be used for TimeStamp requests.
|
static String |
getStatusMessage(int status) |
static String |
getTimeStampResponderURL(X509Certificate cert)
Returns TimeStamp responder URL associated with the given certificate.
|
static TimeStamp |
requestTimeStamp(byte[] digest,
KeyAccessor keyAccessor)
Deprecated.
obsolete, use
requestTimeStamp(String, byte[], KeyAccessor) |
static TimeStamp |
requestTimeStamp(byte[] digest,
KeyStore.Builder keyStoreBuilder,
String alias)
Deprecated.
|
static TimeStamp |
requestTimeStamp(byte[] digest,
KeyStore.Builder keyStoreBuilder,
String alias,
String responderURL)
Deprecated.
|
static TimeStamp |
requestTimeStamp(byte[] digest,
String responderURL)
Deprecated.
|
static TimeStamp |
requestTimeStamp(byte[] digest,
String responderURL,
SSLSocketFactory sslSocketFactory)
Deprecated.
|
static TimeStamp |
requestTimeStamp(byte[] digest,
String responderURL,
SSLSocketFactory sslSocketFactory,
Map<String,String> requestProperties)
Deprecated.
|
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
KeyAccessor keyAccessor) |
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
KeyStore.Builder keyStoreBuilder,
String alias) |
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
KeyStore.Builder keyStoreBuilder,
String alias,
String responderURL)
Requests a new TimeStamp for the given message digest.
|
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
String responderURL,
int timeout,
SSLSocketFactory sslSocketFactory,
Map<String,String> requestProperties) |
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
String responderURL,
SSLSocketFactory sslSocketFactory)
Requests a new TimeStamp for the given message digest.
|
static TimeStamp |
requestTimeStamp(String digestAlgorithmOID,
byte[] digest,
String responderURL,
SSLSocketFactory sslSocketFactory,
Map<String,String> requestProperties)
Requests a new TimeStamp for the given message digest.
|
public static final String DIGEST_ALGORITHM_SHA1
public static final String DIGEST_ALGORITHM_SHA256
public static final String DIGEST_ALGORITHM_SHA384
public static final String DIGEST_ALGORITHM_SHA512
@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, KeyAccessor keyAccessor) throws TSPException
requestTimeStamp(String, byte[], KeyAccessor)The given message digest must be computed using a SHA-1 digest algorithm.
The location of the TSP responder is resolved using the client authentication certificate by the given alias.
The SubjectKeyIdentifier value of the certificate's root CA certificate is used to construct the 'tsp.responder.url' configuration property,
e.g. if the SubjectKeyIdentifier value is 'ccc3f566ff73ac385a961b2189b8814c1fcb5e25',
the configuration property used is 'tsp.responder.url.ccc3f566ff73ac385a961b2189b8814c1fcb5e25'.
digest - an array of bytes containing a SHA-1 message digest.keyAccessor - a KeyAccessor instance used to select a certificate required for TSA client authentication.TSPException - if the TimeStamp cannot be created.public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, KeyAccessor keyAccessor) throws TSPException
TSPException@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, KeyStore.Builder keyStoreBuilder, String alias) throws TSPException
requestTimeStamp(String, byte[], java.security.KeyStore.Builder, String)The given message digest must be computed using a SHA-1 digest algorithm.
The location of the TSP responder is resolved using the client authentication certificate by the given alias.
The SubjectKeyIdentifier value of the certificate's root CA certificate is used to construct the 'tsp.responder.url' configuration property,
e.g. if the SubjectKeyIdentifier value is 'ccc3f566ff73ac385a961b2189b8814c1fcb5e25',
the configuration property used is 'tsp.responder.url.ccc3f566ff73ac385a961b2189b8814c1fcb5e25'.
digest - an array of bytes containing a SHA-1 message digest.keyStoreBuilder - a KeyStore builder used to initialize KeyStore containing certificate entries.alias - name of a certificate required for TSA client authentication.TSPException - if the TimeStamp cannot be created.public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, KeyStore.Builder keyStoreBuilder, String alias) throws TSPException
TSPException@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, KeyStore.Builder keyStoreBuilder, String alias, String responderURL) throws TSPException
requestTimeStamp(String, byte[], java.security.KeyStore.Builder, String, String)The given message digest must be computed using a SHA-1 digest algorithm.
digest - an array of bytes containing a SHA-1 message digest.keyStoreBuilder - a KeyStore builder used to initialize KeyStore containing certificate entries.alias - name of a certificate required for TSA client authentication.responderURL - a URL that identifies the location of the TSP responder.TSPException - if the TimeStamp cannot be created.getTimeStampResponderURL(X509Certificate)public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, KeyStore.Builder keyStoreBuilder, String alias, String responderURL) throws TSPException
digestAlgorithmOID - digest algorithm OID.digest - an array of bytes containing a message digest.keyStoreBuilder - a KeyStore builder used to initialize KeyStore containing certificate entries.alias - name of a certificate required for TSA client authentication.responderURL - a URL that identifies the location of the TSP responder.TSPException - if the TimeStamp cannot be created.@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, String responderURL) throws TSPException
requestTimeStamp(String, byte[], String, SSLSocketFactory)The given message digest must be computed using a SHA-1 digest algorithm.
NOTE: This method is intended to request TimeStamp objects from authorities that do not require a client authentication.
When the client authentication is required, use the requestTimeStamp(byte[], String, SSLSocketFactory) method instead.
digest - an array of bytes containing a SHA-1 message digest.responderURL - a URL that identifies the location of the TSP responder.TSPException - if the TimeStamp cannot be created.getTimeStampResponderURL(X509Certificate)@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, String responderURL, SSLSocketFactory sslSocketFactory) throws TSPException
requestTimeStamp(String, byte[], String, SSLSocketFactory)The given message digest must be computed using a SHA-1 digest algorithm.
The given SSLSocketFactory must provide an optional set of key and trust managers when using a secure connection.
digest - an array of bytes containing a SHA-1 message digest.responderURL - a URL that identifies the location of the TSP responder.sslSocketFactory - SSLSocketFactory to use for HTTPS connections.TSPException - if the TimeStamp cannot be created.getTimeStampResponderURL(X509Certificate)public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, String responderURL, SSLSocketFactory sslSocketFactory) throws TSPException
The given SSLSocketFactory must provide an optional set of key and trust managers when using a secure connection.
digestAlgorithmOID - digest algorithm OID.digest - an array of bytes containing a message digest.responderURL - a URL that identifies the location of the TSP responder.sslSocketFactory - SSLSocketFactory to use for HTTPS connections.TSPException - if the TimeStamp cannot be created.@Deprecated public static TimeStamp requestTimeStamp(byte[] digest, String responderURL, SSLSocketFactory sslSocketFactory, Map<String,String> requestProperties) throws TSPException
requestTimeStamp(String, byte[], String, SSLSocketFactory, Map)The given message digest must be computed using a SHA-1 digest algorithm.
The given SSLSocketFactory must provide an optional set of key and trust managers when using a secure connection.
digest - an array of bytes containing a SHA-1 message digest.responderURL - a URL that identifies the location of the TSP responder.sslSocketFactory - SSLSocketFactory to use for HTTPS connections.requestProperties - properties to add for the TimeStamp HTTP request.TSPException - if the TimeStamp cannot be created.public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, String responderURL, SSLSocketFactory sslSocketFactory, Map<String,String> requestProperties) throws TSPException
The given SSLSocketFactory must provide an optional set of key and trust managers when using a secure connection.
digestAlgorithmOID - digest algorithm OID.digest - an array of bytes containing a message digest.responderURL - a URL that identifies the location of the TSP responder.sslSocketFactory - SSLSocketFactory to use for HTTPS connections.requestProperties - properties to add for the TimeStamp HTTP request.TSPException - if the TimeStamp cannot be created.public static TimeStamp requestTimeStamp(String digestAlgorithmOID, byte[] digest, String responderURL, int timeout, SSLSocketFactory sslSocketFactory, Map<String,String> requestProperties) throws TSPException
TSPExceptionpublic static String getTimeStampResponderURL(X509Certificate cert) throws Exception
The URL is resolved using the EDOC configuration, where it is assumed that each certification path defines exactly one time stamping authority. In order to configure a time stamping authority responder, a property named 'tsp.responder.url.SKI' must be defined where 'SKI' is the subject key identifier from the corresponding certification path ROOT certificate.
cert - the certificate.Exception - if the given certificate is unknown.public static Map<String,String> getForwardedClientCertRequestProperties(X509Certificate cert) throws CertificateEncodingException
cert - the certificate used as 'X-Forwarded-Client-Cert' request property.CertificateEncodingException - if an encoding error occurs.public static String getStatusMessage(int status)
public static String getFailureInfoMessage(lv.eparaksts.org.bouncycastle.v170.asn1.cmp.PKIFailureInfo failureInfo)