-
Notifications
You must be signed in to change notification settings - Fork 66
Timestamping
Luís Gonçalves edited this page May 4, 2017
·
3 revisions
Whenever a time-stamp property is used, XAdES4j uses a TimeStampTokenProvider
to actually obtain the time-stamp token. The input calculation is handled by the library and the provider is invoked with the resulting octet-stream.
public interface TimeStampTokenProvider
{
public TimeStampTokenRes getTimeStampToken(byte[] tsDigestInput, String digestAlgUri);
}
As with other providers, a TimeStampTokenProvider
is configured in the signing profile.
XadesSigningProfile p = new XadesBesSigningProfile(...)
.withTimeStampTokenProvider(MyTimeStampTokenProvider.class);
The library includes a default implementation which obtains tokens from a TSA using HTTP and supports Basic authentication (HttpTimeStampTokenProvider
). You can change the TSA URL and (optionally) the username and password for Basic authentication by configuring a TSAHttpData
on the signing profile.
XadesSigningProfile p = new XadesBesSigningProfile(...)
.withBinding(TSAHttpData.class, new TSAHttpData("url", "user", "password"));