You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Abhishek Kumar (JIRA)" <ji...@apache.org> on 2017/04/27 12:15:04 UTC

[jira] [Created] (ZOOKEEPER-2767) Correct the exception messages in org.apache.zookeeper.common.X509Util if truststore location or password is not configured

Abhishek Kumar created ZOOKEEPER-2767:
-----------------------------------------

             Summary: Correct the exception messages in org.apache.zookeeper.common.X509Util if truststore location or password is not configured
                 Key: ZOOKEEPER-2767
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2767
             Project: ZooKeeper
          Issue Type: Improvement
          Components: java client, server
    Affects Versions: 3.5.4, 3.6.0
            Reporter: Abhishek Kumar
            Priority: Trivial



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:
{noformat}
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);
            }
        }
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)