Can anyone please help me in understanding the process and Java APIs used while timestamping a signature.
I need to sign a file and timestamp it using TSA url "http://timestamp.globalsign.com/scripts/timstamp.dll" using Java APIs.
I am able to sign the file using java.security APIs but unable to timestamp it.
Your question is a bit broad... I will give you some info which I hope it will point you on the right direction.
The thing is that you want to use a timestamp service to perform a timestamp signature using the service there:
http://timestamp.globalsign.com/scripts/timstamp.dll
.First of all this service is an
Time-Stamp Protocol (TSP) RFC3161
compilant, take a look on the RFC definition here to get a clear idea about how this works.Anywise I think that you're looking for a java code example, so below I give you a sample code which performs a timestamp signature using a timestamp server of RFC3161.
Basically the steps in this sample are:
So here is the code:
All together:
Note that I use
bouncycastle API
in the sample.Hope this helps,