I have troubles signing and timestamping a jar file with jarsigner. If I do it without a timestamp everything goes well. Now we have a qualified timestamp server, which works with Adobe and Signtool amongst others. The timestamp server is RFC3161 as required by jarsigner. But when I try to include the timestamp I get an:
jarsigner: unable to sign jar: sun.security.pkcs.ParsingException: Unable to parse the encoded bytes
So I used wireshark to see what happens and I found out what is the reason. It is an http url but wireshark tells me that a query with the PKIXTSP protocol is send. If we select a timestamp server that replies with an PKIXTSP reply (for instance geotrust) the timestamp works.
But we have a timestamp server that replies with an HTTP reply that the request is correct (HTTP/1.1 200 Ok) and the timestamp is imbedded in that reply. For some reason jarsigner is unable to parse that reply.
Is this know? Is there a workaround/fix to get it resolved so jarsigner is able to parse the response?