intoolswetrust / jsignpdf

PDF signing software written in Java. It supports visible signatures, timestamping, certificate verification and many other cool features
https://intoolswetrust.github.io/jsignpdf/
Other
315 stars 121 forks source link

Use TSA with user/password console mode #124

Open marek2github opened 2 years ago

marek2github commented 2 years ago

Hi, Thanks for very helpful program! I have an error when I use the console version of the program with a tsa server requiring a user and password In windows mode everythings work fine. What is bad in my command parametrs? When I use TSA serwer which not required user/password, console mode works fine.

Windows mode - works fine -> window_mode.png (output file is ok) image

Console mode - fail -> console_mode.png (output file is not ok, size 0KB) image

Thanks, Marek

kwart commented 2 years ago

Does it help if you use the JSignPdfC.exe instead? I.e.

C:\JsignPdf\JSignPdfC.exe -kst PKCS12 -ksf ...
kwart commented 2 years ago

If you want to use java -jar call directly, you should provide parameters manually. You can have a look into the linux script, which params are used there:

https://github.com/intoolswetrust/jsignpdf/blob/JSignPdf_2_2_0/distribution/bin/jsignpdf.sh#L14-L24

marek2github commented 2 years ago

C:\JsignPdf\JSignPdfC.exe -kst PKCS12 -ksf ...

Works fine, thanks :)

marek2github commented 1 year ago

on windows 10 pro work fine, when I run on windows 2022 server, file output has 0 KB error_window2022

new errors: FINE Default property file doesn't exists. FINE Default property file doesn't exists.

on server installed - Java 8 Update 341 (64 bit) 8.0.3410.10

C:\JSignPdf>java -version
java version "1.8.0_341" Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

What's wrong?

marek2github commented 1 year ago

The problem disappears after a single use of JSignPdf.exe (missing properties are saved in the user profile on which the program was running)