Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-3440

Support running clientToolBox EjbcWsRaCli with IBM java

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.1.0
    • Component/s: None
    • Labels:
      None

      Description

      NewSun509 KeyManagerFactory is not available in IBM Java.

      IBM java 6 or 7 can be downloaded from:
      https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swg-sdk6&S_PKG=amd64_6sr15fp1&S_TACT=105AGX05&S_CMP=JDK&lang=en_US&cp=UTF-8&dlmethod=http

      ant clientToolBox works fine, but when running command:
      ./ejbcaClientToolBox.sh EjbcaWsRaCli finduser USERNAME EQUALS superadmin

      You get an error:
      Caused by: java.security.NoSuchAlgorithmException: SSLContext Default implementation not found:
      at java.security.Provider$Service.newInstance(Provider.java:968)
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:279)
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:217)
      at javax.net.ssl.SSLContext.getInstance(SSLContext.java:6)
      at javax.net.ssl.SSLContext.getDefault(SSLContext.java:33)
      at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:17)
      at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:18)
      at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:46)
      at com.ibm.net.ssl.www2.protocol.https.b.<init>(b.java:68)
      at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:1)
      at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:4)
      at java.net.URL.openConnection(URL.java:957)
      ... 21 more
      Caused by: java.security.NoSuchAlgorithmException: NewSunX509 KeyManagerFactory not available
      at sun.security.jca.GetInstance.getInstance(GetInstance.java:210)
      at javax.net.ssl.KeyManagerFactory.getInstance(KeyManagerFactory.java:2)
      at com.ibm.jsse2.rc.a(rc.java:79)
      at com.ibm.jsse2.tc.g(tc.java:22)
      at com.ibm.jsse2.tc.<init>(tc.java:7)
      at java.lang.J9VMInternals.newInstanceImpl(Native Method)
      at java.lang.Class.newInstance(Class.java:1549)
      at java.security.Provider$Service.newInstance(Provider.java:954)
      ... 32 more

      This is easily fixed by checking in EJBCAWSRABaseCommand if NewSunX509 is available before setting this property.

        Attachments

          Activity

            People

            • Assignee:
              tomas Tomas Gustavsson
              Reporter:
              tomas Tomas Gustavsson
              Verified by:
              Tomas Gustavsson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: