Failed for Watchdata check in Linux – java.security.KeyStoreException: PKCS11 not found

huangapple go评论73阅读模式
英文:

Failed for Watchdata check in Linux - java.security.KeyStoreException: PKCS11 not found

问题

我正在尝试在Linux机器上安装并使用GST门户上的EMSigner应用程序。

参考链接:

  1. https://www.gst.gov.in/help/docsigner
  2. https://www.gst.gov.in/system/#/sysreq-install-steps

在签名时,网站要求输入令牌密钥密码,输入密码后出现错误消息:“无法加载令牌”。

查看emsigner的控制台日志时,我看到以下错误消息:

library =/usr/lib/WatchData/eMudhra_3.4.3/lib/libwdpkcs_eMudhra_343.so                                                                                                   
Failed for Watchdata check in Linux - java.security.KeyStoreException: PKCS11 not found                                                                                  
error msg==>>PKCS11 not found                                                                                                                                            
check==>>PKCS11 not found                                      

我不确定S/W需要什么来找到PKCS11。

我的配置是:

java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 20
Release:        20
Codename:       ulyana

我的硬件令牌是proxkey。

英文:

I am trying to install and use the EMSigner app from the GST Portal on a linux machine.

Ref:

  1. https://www.gst.gov.in/help/docsigner
  2. https://www.gst.gov.in/system/#/sysreq-install-steps

While signing the website asks for the token key password, and after entering the password it fails with a message, "unable to load token"

Looking into the console log for emsigner I see the following error message

                                                                                                             
library =/usr/lib/WatchData/eMudhra_3.4.3/lib/libwdpkcs_eMudhra_343.so                                                                                                   
Failed for Watchdata check in Linux - java.security.KeyStoreException: PKCS11 not found                                                                                  
error msg==>>PKCS11 not found                                                                                                                                            
check==>>PKCS11 not found                                      

I am not sure what needs to be done for the S/W to find PKCS11.

My configuration is:

java -version
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 20
Release:        20
Codename:       ulyana

My Hardware token is proxkey

答案1

得分: 1

我有一个类似的情况。巴西政府使用的Watchdata令牌与您的略有不同,但我已经使其正常工作:

Watchdata令牌所需

  • 安装这些软件包
apt install dkms libnss3-tools

Web浏览器配置

  • Chrome浏览器(替换为您的库路径)
modutil -dbdir sql:.pki/nssdb/ -add "token-watchdata" -libfile /usr/lib/watchdata/ICP/lib/libwdpkcs_icp.so
  • 基于Mozilla的Web浏览器,如Firefox和Palemoon(使用库的路径)

Failed for Watchdata check in Linux – java.security.KeyStoreException: PKCS11 not found

可选的Java支持

  • 如果您还需要Java支持,它只能在Palemoon(或非常旧的Firefox版本)上工作。
  • 在互联网上搜索一个名为libnpjp2.so的文件,并将其放置在/usr/lib/mozilla/plugins/目录下。
~:$ ls /usr/lib/mozilla/plugins/

libnpjp2.so

您还需要Java软件包

apt install default-jdk openjdk-11-jdk
~:$ java -version

openjdk version "11.0.8" 2020-07-14

就是这样。在Palemoon上运行Java +令牌模块。Chrome不支持Java,但会加载PKCS#11模块。

英文:

i have a similar case.
the watchdata token used by the brazillian government is slightly different from yours, but i got it working with:

required for watchdata token

  • these packages
apt install dkms libnss3-tools

web browser config

  • chrome web browser (replace with the path to your library)
modutil -dbdir sql:.pki/nssdb/ -add "token-watchdata" -libfile /usr/lib/watchdata/ICP/lib/libwdpkcs_icp.so
  • mozilla based web browser like firefox and palemoon (use the path to your library)

Failed for Watchdata check in Linux – java.security.KeyStoreException: PKCS11 not found

optional java support

  • if you also need java support, it will only work on palemoon (or very old firefox releases).
  • search on the internet for a file called libnpjp2.so and place it on /usr/lib/mozilla/plugins/
~:$ ls /usr/lib/mozilla/plugins/

libnpjp2.so

you also will need java packages

apt install default-jdk openjdk-11-jdk
~:$ java -version

openjdk version "11.0.8" 2020-07-14

and thats it. java + token module working on palemoon.
chrome doesnt support java, but will load the pkcs11 module.

huangapple
  • 本文由 发表于 2020年8月6日 23:29:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/63286919.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定