zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #184: ZOOKEEPER-236: SSL Support for Atomic Broadcast...
Date Mon, 11 Jun 2018 11:32:23 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/184#discussion_r194371329
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
    @@ -632,37 +639,46 @@ synchronized private boolean connectOne(long sid, InetSocketAddress
electionAddr
     
             Socket sock = null;
             try {
    -            LOG.debug("Opening channel to server " + sid);
    -            sock = new Socket();
    -            setSockOpts(sock);
    -            sock.connect(electionAddr, cnxTO);
    -            LOG.debug("Connected to server " + sid);
    +             LOG.debug("Opening channel to server " + sid);
    +             if (self.isSslQuorum()) {
    +                 SSLSocket sslSock = x509Util.createSSLSocket();
    +                 setSockOpts(sslSock);
    +                 sslSock.connect(electionAddr, cnxTO);
    +                 sslSock.startHandshake();
    +                 sock = sslSock;
    +             } else {sock = new Socket();
    +             setSockOpts(sock);
    --- End diff --
    
    Done.


---

Mime
View raw message