Hi Jakob,
I'm not able to help with specific SW drivers, Sorry.
You could try using
https://github.com/CardContact/sc-hsm-embedded
instead of the OpenSC. Maybe there is a difference.
Regards,
-- Josef
po 9. 9. 2024 v 14:16 odesílatel Jakob Flügel <
jakoeb...@gmail.com> napsal:
>
> Hey,
> I am trying to add my DGN card to JSign so I can add QES signatures to my files.
>
> I set my configuration path to pkcs11config.path=conf/pkcs11.cfg and this is how my configuration looks like:
>
> name=DGN
>
> library="C:/Program Files/OpenSC Project/OpenSC/pkcs11/opensc-pkcs11.dll"
> slot=0
>
> When I run JSign I get this error:
> FINE Relaxing SSL security.
> FINE Registering SunPKCS11 provider from configuration in conf/pkcs11.cfg
> SEVERE Unable to register SunPKCS11 security provider.
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.base/java.lang.reflect.Method.invoke(Unknown Source)
> at net.sf.jsignpdf.utils.PKCS11Utils.initPkcs11Provider(PKCS11Utils.java:114)
> at net.sf.jsignpdf.utils.PKCS11Utils.registerProviders(PKCS11Utils.java:66)
> at net.sf.jsignpdf.Signer.main(Signer.java:104)
> Caused by: java.security.ProviderException: Initialization failed
> at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.<init>(Unknown Source)
> at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11$1.run(Unknown Source)
> at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11$1.run(Unknown Source)
> at java.base/java.security.AccessController.doPrivileged(Native Method)
> at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.configure(Unknown Source)
> ... 7 more
> Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TOKEN_NOT_RECOGNIZED
> at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_GetTokenInfo(Native Method)
> at jdk.crypto.cryptoki/sun.security.pkcs11.Token.<init>(Unknown Source)
> at jdk.crypto.cryptoki/sun.security.pkcs11.SunPKCS11.initToken(Unknown Source)
> ... 12 more
>
> SEVERE Unable to register SunPKCS11 security provider.
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
> at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
> at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
> at net.sf.jsignpdf.utils.PKCS11Utils.initPkcs11Provider(PKCS11Utils.java:110)
> at net.sf.jsignpdf.utils.PKCS11Utils.registerProviders(PKCS11Utils.java:67)
> at net.sf.jsignpdf.Signer.main(Signer.java:104)
> Caused by: java.security.ProviderException: Initialization failed
> at com.github.kwart.jsign.pkcs11.JSignPKCS11.<init>(JSignPKCS11.java:380)
> at com.github.kwart.jsign.pkcs11.JSignPKCS11.<init>(JSignPKCS11.java:104)
> ... 7 more
> Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TOKEN_NOT_RECOGNIZED
> at jdk.crypto.cryptoki/sun.security.pkcs11.wrapper.PKCS11.C_GetTokenInfo(Native Method)
> at com.github.kwart.jsign.pkcs11.Token.<init>(Token.java:135)
> at com.github.kwart.jsign.pkcs11.JSignPKCS11.initToken(JSignPKCS11.java:916)
> at com.github.kwart.jsign.pkcs11.JSignPKCS11.<init>(JSignPKCS11.java:371)
> ... 8 more
>
> PCKS11 Admin also tell me CKR_TOKEN_NOT_RECOGNIZED when I try to acces the card. What can I do?
>
> --
> 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 on the web visit
https://groups.google.com/d/msgid/jsignpdf/853c4aa0-a4ea-43a5-8b7b-bdfe1fe04859n%40googlegroups.com.