小编can*_*ion的帖子

有谁知道免费(试用)时间戳服务器服务?

想知道是否有人知道任何免费(试用)时间戳服务器服务.我想在itext中测试时间戳功能.就像我使用Start Com class 1作为免费CA进行测试一样.希望我说清楚.希望有人知道一个地方谢谢

digital-signature trusted-timestamp

35
推荐指数
1
解决办法
3万
查看次数

PKCS#11实例化问题

我正在尝试使用智能卡和PKCS#11签署pdf文件.我链接正确的.dll,我正在动态制作配置文件,但我遇到了配置问题.

String config = "name=zz\n" +
                "library=" + DLL + "\n" +
                "slotListIndex = " + getSlotsWithTokens(DLL)[0];
ByteArrayInputStream pot = new ByteArrayInputStream(config.getBytes());
Provider providerPKCS11 = new SunPKCS11(pot);
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Exception in thread "main" java.security.ProviderException: Initialization failed
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:376)
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:107)
    at smartCardPKCS11.scPKCS11.main(scPKCS11.java:56)
Caused by: java.security.ProviderException: slotListIndex is 52481 but token only has 10 slots
    at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:357)
    ... 2 more
Run Code Online (Sandbox Code Playgroud)

在整个插槽事情上有点困惑.有人可以帮我吗?

我的getSlotsWithTokens看起来如何:

public static long[] getSlotsWithTokens(String libraryPath) throws IOException{
        CK_C_INITIALIZE_ARGS initArgs = new CK_C_INITIALIZE_ARGS();
        String functionList = "C_GetFunctionList";

        initArgs.flags = 0;
        PKCS11 …
Run Code Online (Sandbox Code Playgroud)

java cryptography digital-signature pkcs#11

6
推荐指数
1
解决办法
2万
查看次数