Adobe AATL证书显示在我和另一位同事的计算机上,但未在其他计算机上显示

时间:2018-09-21 04:07:50

标签: java pdf sign hsm

我目前正在使用Adobe AATL对PDF文件进行数字签名,看来我的代码无法正常工作。 AATL提供程序为我提供了证书链和证书。当我尝试(使用Java代码)对PDF进行数字签名时。看来我和其他同事的机器的证书链变得可见了。但是对于其他机器,它似乎不起作用。 不胜感激。

我对如何解决此问题一无所知,到目前为止,我所获得的代码显示在下面:

    PrivateKey privKey = null;
    byte[] encoded = Util.exportKey(handle);
    byte[] keyAttribute = Util.getKeyAttributes(handle);
    CaviumKeyAttributes cka = new CaviumKeyAttributes(keyAttribute);

    if (cka.getKeyType() == CaviumKeyAttributes.KEY_TYPE_RSA && cka.getKeyClass() == CaviumKeyAttributes.CLASS_PRIVATE_KEY) {
        KeyFactory factory = KeyFactory.getInstance("RSA");
        PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encoded);
        privKey = factory.generatePrivate(spec);
    }

    if (certi == null) {
        throw new IOException("Could not find certificate");
    }

    Certificate[] certifcates = new Certificate[1];
    certifcates[0] = certi;

    setCertificateChain(certifcates);
    setPrivateKey(privKey);

我能说的是,当我尝试查看PDF的证书详细信息时,可以在计算机上看到AATL提供程序的证书。但是,我在其他人的笔记本电脑上看不到类似的东西。我始终确保更新其PDF查看器识别的AATL列表。我目前正在考虑此问题,原因是不包含证书链。

希望获得一些帮助^ _ ^

0 个答案:

没有答案
相关问题