PKCS11 configuration for the Czech provider I.CA

24 views
Skip to first unread message

Zdenek Muzik

unread,
Aug 12, 2026, 9:49:45 AMAug 12
to JSignPdf
I am unable to get JSignPDF to recognise the HW token provided by the dig. authority I. CA in Linux Mint.
Installed version 3.1.0 via Flatpak.  I have the necessary library from I. CA (libICASecoreStorePkcs11.so) and entered the path to it into the config file. However, the app does not see any pkcs11 providers. 

Anyone using I. CA who has already figured out how to do it, eg. what exactly needs to be in the config?
Thanks.

Zdenek Muzik

unread,
Oct 12, 2026, 1:02:39 PMOct 12
to JSignPdf
I made some progress:
1) Realised that the Flatpak version probably cannot see the library.
2) Reinstalled as .deb package version 3.2.1. on Linux Mint 22.3, openjdk version "21.0.12.1" 2026-08-18
3) The Keystore drop-down now offers JSIGNPKCS11 and I see my certificates
4) The signing fails with this console output:
Opened document: /home/zdenek/Downloads/Selfhosting_pros and cons.pdf
Checking input and output PDF paths.
Getting key alias
Certificate Certifikát #6 expired already.
Certificate Certifikát #5 expired already.
Used key alias: Certifikát #1
Loading private key
Getting certificate chain
Opening input PDF file: /home/zdenek/Downloads/Selfhosting_pros and cons.pdf
Creating output PDF file: /home/zdenek/Downloads/Self-hosting_co to je a jak začít_signed.pdf
Creating signature
Setting certification level
Configuring visible signature
Use only layers recommend by Acrobat 6: true
Setting background image scale
Setting Layer 2 text (description)
Setting Layer 4 text (status)
Setting Render mode
Creating visible signature
Processing (it may take a while) ...
Finished: Creating of signature failed.
SEVERE Signing service error
java.lang.IllegalAccessError: class com.github.kwart.jsign.pkcs11.P11Signature (in unnamed module @0x887af79) cannot access class sun.security.x509.AlgorithmId (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @0x887af79
at com.github.kwart.jsign.pkcs11.P11Signature.<init>(P11Signature.java:226)
at com.github.kwart.jsign.pkcs11.JSignPKCS11$P11Service.newInstance0(JSignPKCS11.java:1064)
at com.github.kwart.jsign.pkcs11.JSignPKCS11$P11Service.newInstance(JSignPKCS11.java:1040)
at java.base/sun.security.jca.GetInstance.getInstance(Unknown Source)
at java.base/sun.security.jca.GetInstance.getInstance(Unknown Source)
at java.base/java.security.Signature.getInstance(Unknown Source)
at org.openpdf.text.pdf.PdfPKCS7.<init>(PdfPKCS7.java:565)
at net.sf.jsignpdf.engine.openpdf.OpenPdfSigningEngine.sign(OpenPdfSigningEngine.java:410)
at net.sf.jsignpdf.SignerLogic.signFile(SignerLogic.java:125)
at net.sf.jsignpdf.SignerLogic.execute(SignerLogic.java:65)
at net.sf.jsignpdf.fx.service.SigningService$1.call(SigningService.java:47)
at net.sf.jsignpdf.fx.service.SigningService$1.call(SigningService.java:43)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at javafx.graphics/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at javafx.graphics/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Any advice? Thanks.

Josef Cacek

unread,
Nov 12, 2026, 4:52:37 AMNov 12
to jsig...@googlegroups.com
Hi Zdenek,
Thanks for the detailed log. It pinpointed the problem.
This is a JSignPdf bug, not a mistake in your configuration. The
JSIGNPKCS11 provider can’t sign on Java 21 when the token computes
only raw RSA signatures, which is common with smart cards, including
I.CA ones. Extra JVM options won’t fix it either. The provider library
needs an update, and I’m working on that.

Workaround: pick PKCS11 instead of JSIGNPKCS11 in the Keystore
drop-down, using the same PIN. It uses the standard Java PKCS#11
provider, which isn’t affected.
If signing with PKCS11 fails too (for example, a login or PIN error at
the moment of signing), please post that log. Some qualified-signature
keys need an extra PIN check that only JSIGNPKCS11 supports.

The Flatpak version couldn’t see your library because host PKCS#11
drivers are outside the Flatpak sandbox by default, so the .deb is the
right choice for tokens.

Best regards,
Josef
> --
> You received this message because you are subscribed to the Google Groups "JSignPdf" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jsignpdf+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/jsignpdf/5d52cf47-e598-4abd-98e8-7dee5dd8899an%40googlegroups.com.

Zdenek Muzik

unread,
Nov 14, 2026, 2:03:16 PMNov 14
to JSignPdf
Hi Josef,
thanks for your note. I tested the PKCS11 provider and that worked. The whole setup is just a bit finicky: sometimes I have to unplug and replug the token, reload the keys etc. But these are minor grievances.
Best regards
Zdeněk
Reply all
Reply to author
Forward
0 new messages