Does not show PKCS11 in windows 10

361 views
Skip to first unread message

Gabriel Carissimo

unread,
Jul 25, 2023, 2:10:14 PM7/25/23
to JSignPdf
Dear
I am trying to use the OpenSC driver or the Bit4ID driver (eTPKCS11.dll), in both cases it does not show me the PKCS11

Below are the tests I did.

java -Duser.language=en -Djava.security.debug=pkcs11keystore -Djava.security.debug=sunpkcs11 -jar JSignPdf.jar -lkt

FINE Relaxing SSL security.
FINE Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
SunPKCS11 loading C:\u01\jsignpdf-2.2.0\conf\pkcs11.cfg
sunpkcs11: Initializing PKCS#11 library C:/u01/jsignpdf-2.2.0/lib/eTPKCS11.dll
Information for provider SunPKCS11-JSignPdf
Library info:
  cryptokiVersion: 2.20
  manufacturerID: SafeNet, Inc.
  flags: 0
  libraryDescription: SafeNet eToken PKCS#11
  libraryVersion: 10.08
All slots: 0, 1, 2, 3, 4, 5, 6, 7
Slots with tokens: (none)
FINE PKCS11 provider registered with name SunPKCS11-JSignPdf
JSignPKCS11 loading C:\u01\jsignpdf-2.2.0\conf\pkcs11.cfg
sunpkcs11: Initializing PKCS#11 library C:/u01/jsignpdf-2.2.0/lib/eTPKCS11.dll
Information for provider JSignPKCS11-JSignPdf
Library info:
  cryptokiVersion: 2.20
  manufacturerID: SafeNet, Inc.
  flags: 0
  libraryDescription: SafeNet eToken PKCS#11
  libraryVersion: 10.08
All slots: 0, 1, 2, 3, 4, 5, 6, 7
Slots with tokens: (none)
FINE PKCS11 provider registered with name JSignPKCS11-JSignPdf
INFO Available key store types:
BCFKS
BCFKS-DEF
BCPKCS12
BKS
BOUNCYCASTLE
CASEEXACTJKS
CloudFoxy
DKS
FIPS
FIPS-DEF
IBCFKS
IBCFKS-DEF
IFIPS
IFIPS-DEF
JCEKS
JKS
PKCS12
PKCS12-3DES-3DES
PKCS12-3DES-40RC2
PKCS12-DEF
PKCS12-DEF-3DES-3DES
PKCS12-DEF-3DES-40RC2
WINDOWS-MY
WINDOWS-ROOT

java -Duser.language=en -jar JSignPdf.jar -kst PKCS11 -ksp "MYPIN"  pdf_original.pdf

FINE Relaxing SSL security.
FINE Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
FINE PKCS11 provider registered with name SunPKCS11-JSignPdf
FINE PKCS11 provider registered with name JSignPKCS11-JSignPdf
INFO Checking input and output PDF paths.
java.security.KeyStoreException: PKCS11 not found
        at java.security.KeyStore.getInstance(Unknown Source)
        at net.sf.jsignpdf.utils.KeyStoreUtils.loadKeyStore(KeyStoreUtils.java:355)
        at net.sf.jsignpdf.utils.KeyStoreUtils.getPkInfo(KeyStoreUtils.java:411)
        at net.sf.jsignpdf.SignerLogic.signFile(SignerLogic.java:154)
        at net.sf.jsignpdf.Signer.signFiles(Signer.java:246)
        at net.sf.jsignpdf.Signer.main(Signer.java:139)
Caused by: java.security.NoSuchAlgorithmException: PKCS11 KeyStore not available
        at sun.security.jca.GetInstance.getInstance(Unknown Source)
        at java.security.Security.getImpl(Unknown Source)
        ... 6 more
WARNING Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.
SEVERE Problem occured
java.lang.NullPointerException: Keystore was not loaded succesfully. Check if the keystore type, path and password are valid.
        at net.sf.jsignpdf.utils.KeyStoreUtils.getKeyAliasInternal(KeyStoreUtils.java:224)
        at net.sf.jsignpdf.utils.KeyStoreUtils.getPkInfo(KeyStoreUtils.java:413)
        at net.sf.jsignpdf.SignerLogic.signFile(SignerLogic.java:154)
        at net.sf.jsignpdf.Signer.signFiles(Signer.java:246)
        at net.sf.jsignpdf.Signer.main(Signer.java:139)

INFO Finished: Creating of signature failed.
FINE Removing security provider with name SunPKCS11-JSignPdf
FINE Removing security provider with name JSignPKCS11-JSignPdf



Θεόφιλος Ιντζόγλου

unread,
Jul 25, 2023, 5:58:33 PM7/25/23
to jsig...@googlegroups.com
Στις Τρίτη, 25 Ιουλίου 2023 9:10:00 Μ.Μ. EEST Gabriel Carissimo έγραψε:
> Slots with tokens: (none)

Are you sure that the token is recognized successfully by the driver? Check if
the driver package is accompanied by a tool that shows the connected tokens to
the system. Does it show the certificate(s) that exist in the token?

--
() ascii ribbon campaign - against html mail
/\ - against microsoft attachments



Reply all
Reply to author
Forward
0 new messages