Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2767

Correct the exception messages in X509Util if truststore location or password is not configured

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.5.4, 3.6.0
    • 3.5.4, 3.6.0
    • java client, server
    • None

    Description

      In org.apache.zookeeper.common.X509Util.org.apache.zookeeper.common.X509Util.createSSLContext exception messages contains keystore related messages instead of truststore messages for truststore location/password checks:

      if (trustStoreLocationProp == null && trustStorePasswordProp == null) {
                  LOG.warn("keystore not specified for client connection");
              } else {
                  if (trustStoreLocationProp == null) {
                      throw new SSLContextException("keystore location not specified for client connection");
                  }
                  if (trustStorePasswordProp == null) {
                      throw new SSLContextException("keystore password not specified for client connection");
                  }
                  try {
                      trustManagers = new TrustManager[]{
                              createTrustManager(trustStoreLocationProp, trustStorePasswordProp)};
                  } catch (TrustManagerException e) {
                      throw new SSLContextException("Failed to create KeyManager", e);
                  }
              }
      

      Attachments

        Activity

          People

            a72877 Abhishek Kumar
            a72877 Abhishek Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: