-
Notifications
You must be signed in to change notification settings - Fork 21
Henceforth OnlineTSPSource (RFC 3161) uses exclusively DataLoader to communicate with TSA...
Up to the version 4.3.0, to communicate with the TSA the SD-DSS framework either used URLConnection
or DataLoader
based on HttpClient
(org.apache.http.client). This presented problems of consistency regarding the management of authentication and proxy. Henceforth each instance of the OnlineTSPSource
uses a DataLoader
. However it is not always necessary to create a dedicated instance of DataLoader
, indeed an instance is automatically created if it has not been explicitly set. When a dedicated instance of DataLoader
is used then the Content-Type should be specified:
CommonsDataLoader dataloader = new CommonsDataLoader (OnlineTSPSource.CONTENT_TYPE)
where the CONTENT_TYPE
is equal to "application/timestamp-query".
To attach the authentication information (simple credentials implementation based on a user name/password pair) to the DataLoader
the following method must be used:
dataloader.addAuthentication(host, -1, protocol, userName, password);
...and finally the code that creates the OnlineTSPSource
object and associates to it the dataLoader
:
OnlineTSPSource tspSource = new OnlineTSPSource("http://myopentsa.org:8080/tsa");
tspSource.setDataLoader(dataLoader);
- Time Stamping Authority (TSA)