Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6348425

Keytool failed-to list NSS KeyStore Contents with modified config file on Linux-i586 & WinXp

XMLWordPrintable

      =====================LISTING ALL THE ENTRIES OF NSS KEYSTORE=======================
      executing KeyTool command as under :
      /disk07/jdsntest/pit/mustang/secnet/testb57/b57/binaries/linux-i586/bin/keytool -keystore NONE -storetype PKCS11 -storepass password -providerName SunPKCS11-NSS -providerClass sun.security.pkcs11.SunPKCS11 -providerArg /home/ss144884/srikar/TestDev/NSS/KeyTool/fix/config/NSSTest.P11.Linux-i586.txt -list -v

      keytool error: java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:498)
              at sun.security.tools.KeyTool.doCommands(KeyTool.java:480)
              at sun.security.tools.KeyTool.run(KeyTool.java:171)
              at sun.security.tools.KeyTool.main(KeyTool.java:165)
      Caused by: java.security.ProviderException: Could not initialize NSS
              at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:176)
              at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:86)
              ... 7 more
      Caused by: java.io.IOException: The specified version of NSS is incompatible, 3.7 or later required
              at sun.security.pkcs11.Secmod.initialize(Secmod.java:180)
              at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:172)
              ... 8 more


      WHERE THE CONTENTS OF FILE "/home/ss144884/srikar/TestDev/NSS/KeyTool/fix/config/NSSTest.P11.Linux-i586.txt" are as under:
      showInfo = false
      name = NSS
      nssSecmodDirectory = /home/ss144884/srikar/TestDev/NSS/KeyTool/fix/db
      nssLibraryDirectory = /home/ss144884/srikar/TestDev/NSS/KeyTool/fix/lib/linux-i586/

      HOWEVER, SAME CODE SAME "RESPECTIVE PATHS" & IDENTICAL CONFIGURTAION FILE FOR SOLARIS-SPARC (executed on jdeploy01.india.sun.com) RUNS SUCCESSFULLY i.e. listing, storing certs & keys, csr, exporting certs etc., but an exception occured while generating key pair whose details are as under :

      Generating KeyPair with Alias Name: BRUCE_LEE which does not exist in the NSS KeyStore
      executing KeyTool command as under :
      /net/sqindia/export/disk07/jdsntest/pit/mustang/secnet/testb57/b57/binaries/solaris-sparc/bin/keytool -keystore NONE -storetype PKCS11 -storepass password -providerName SunPKCS11-NSS -providerClass sun.security.pkcs11.SunPKCS11 -providerArg /home/ss144884/srikar/TestDev/NSS/KeyTool/fix/config/NSSTest.P11.Solaris-Sparc5.10.txt -genkeypair -v -alias BRUCE_LEE -keyalg RSA -keysize 1024 -dname cn=sqe, ou=j2se-sqe, o=sun, c=us
      Generating 1,024 bit RSA key pair and self-signed certificate (MD5withRSA) with a validity of 90 days
              for: CN=sqe, OU=j2se-sqe, O=sun, C=us
      keytool error: java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_HOST_MEMORY
      java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_HOST_MEMORY
              at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1113)
              at sun.security.pkcs11.P11KeyStore.engineSetKeyEntry(P11KeyStore.java:451)
              at java.security.KeyStore.setKeyEntry(KeyStore.java:869)
              at sun.security.tools.KeyTool.doGenKeyPair(KeyTool.java:1102)
              at sun.security.tools.KeyTool.doCommands(KeyTool.java:740)
              at sun.security.tools.KeyTool.run(KeyTool.java:171)
              at sun.security.tools.KeyTool.main(KeyTool.java:165)
      Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_HOST_MEMORY
              at sun.security.pkcs11.wrapper.PKCS11.C_CopyObject(Native Method)
              at sun.security.pkcs11.P11KeyStore.updateP11Pkey(P11KeyStore.java:1564)
              at sun.security.pkcs11.P11KeyStore.storePkey(P11KeyStore.java:1724)
              at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1109)
              ... 6 more

            claisunw Charlie Lai (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: