Skip to Main Content

java.security.ProviderException: Could not create trust object

User_D55BSNov 22 2022

Hello,
I have Java application running on two different servers. On the 1st server while the application is trying to insert a X.509 certificate to NSS keystore it is getting the following error:

java.security.ProviderException: Could not create trust object
        at sun.security.pkcs11.Secmod$TrustAttributes.<init>(Secmod.java:658)
        at sun.security.pkcs11.Secmod$Module.setTrust(Secmod.java:529)
        at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1045)
        at sun.security.pkcs11.P11KeyStore.engineSetCertificateEntry(P11KeyStore.java:516)
        at java.security.KeyStore.setCertificateEntry(Unknown Source)

Using certutil to list the NSS DB entry I can see the certificate entry, but the trust flag says "CTu,Cu,Cu".
On the 2nd server, inserting a X.509 certificate to NSS keystore doesn't throw the same exception. It is working fine and using certutil I can see the certificate entry, and the trust flag says: "CT,C,C".
My questions:
Why on the 1st server inserting a X.509 certificate threw an exception?
What cause the trust flag to be different between the two certificate? The X.509 certificate is imported thru the same API.
Both servers are running Java 8u121. Thank you.

Comments
Post Details
Added on Nov 22 2022
0 comments
37 views