zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #184: ZOOKEEPER-236: SSL Support for Atomic Broadcast...
Date Fri, 28 Sep 2018 00:03:04 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/184#discussion_r220732673
  
    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
    @@ -632,37 +639,49 @@ 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);
    +                 sock.connect(electionAddr, cnxTO);
    +
    --- End diff --
    
    nit: remove extra line here.


---

Mime
View raw message