使用删除sun.security.pkcs11.SunPKCS11奇怪的问题:该指定的过程找不到? [英] Weird problem using sun.security.pkcs11.SunPKCS11: The specified procedure could not be found?

查看:1259
本文介绍了使用删除sun.security.pkcs11.SunPKCS11奇怪的问题:该指定的过程找不到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发这个应用程序speceifically与Firefox使用(这是供内部使用)。基本上,我们使用sun.security东西读Firefox的密钥库和签署与我们得到的证书数据。

I'm developing this application to be used speceifically with Firefox (it's for internal use). Basically, we're using the sun.security stuff to read Firefox's KeyStore and sign data with the certs we get.

我在几台机器测试了这一点,结果不同,我似乎无法查明原因。

I've tested this on several machines and the results are varying, I can't seem to pinpoint the reason.

我已经测试了最新的Ubuntu版本,火狐3.6.13,使用Java版本1.6.0_22,它的工作原理那里。我也有一个Windows XP的笔记本电脑使用的Java版本1.6.0_17,它的工作原理以及同火狐版本。

I've tested it on the latest ubuntu release, Firefox 3.6.13, using Java version 1.6.0_22, it works there. I also have a Windows XP laptop with the same Firefox version using Java version 1.6.0_17, where it works as well.

有其他2的Windows XP的笔记本电脑,它不会下工夫,让同样的错误。他们正在运行Firefox相同版本,并使用Java版本1.6.0_17。

There are 2 other Windows XP laptops that it will not work on, giving the same error. They're running the same version of Firefox and using java version 1.6.0_17.

该错误是:

java.security.ProviderException: Could not initialize NSS
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:183)
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:86)
    at SignedMessage.SigningApplet.initializeCrypto(SigningApplet.java:327)
    at SignedMessage.SigningApplet.init(SigningApplet.java:84)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: The specified procedure could not be found.
    at sun.security.pkcs11.Secmod.nssLoadLibrary(Native Method)
    at sun.security.pkcs11.Secmod.initialize(Secmod.java:186)
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:179)
    ... 5 more
Exception: java.security.ProviderException: Could not initialize NSS

从我可以告诉它找不到本地nssLoadLibrary程序?该配置文件将其指向Firefox的安装目录(它可以抓取nss3.dll或libnss3.so文件)。为此,它会在所有电脑和配置中所有的路径似乎是有效的。

From what I can tell it can't find the native nssLoadLibrary routine? The configuration file is pointing it to the Firefox install directory (where it can grab the nss3.dll or libnss3.so file). It does this across all pc's and all the paths in the configuration seem to be valid.

一个示例配置文件,它的价值:

A sample config file, for what it's worth:

name=NSS
nssDbMode=readOnly
nssModule=keystore
nssSecmodDirectory="C:\\Documents and Settings\\user\\Application     Data\\Mozilla\\firefox\\Profiles/8bzd2qqm.default"
nssLibraryDirectory=C:\Program Files\Mozilla Firefox

我希望有人将有一个线索,或者与调试进一步得到一些提​​示。我在这里的损失。

I was hoping someone would have a clue, or maybe some tips on getting further with debugging. I'm at a loss here.

推荐答案

尝试使用充气城堡,也许你会得到有效的结果。

Try to use Bouncy Castle , maybe you'll get valid results.

这篇关于使用删除sun.security.pkcs11.SunPKCS11奇怪的问题:该指定的过程找不到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆