From commits-return-27118-archive-asf-public=cust-asf.ponee.io@geode.apache.org Tue May 22 17:49:00 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2063A180638 for ; Tue, 22 May 2018 17:48:59 +0200 (CEST) Received: (qmail 46152 invoked by uid 500); 22 May 2018 15:48:59 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 46143 invoked by uid 99); 22 May 2018 15:48:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2018 15:48:58 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3B2DA829AD; Tue, 22 May 2018 15:48:58 +0000 (UTC) Date: Tue, 22 May 2018 15:48:57 +0000 To: "commits@geode.apache.org" Subject: [geode] branch develop updated: GEODE-3563 SSL socket handling problems in TCPConduit run MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152700413748.13722.14909595473516245618@gitbox.apache.org> From: bschuchardt@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: geode X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Oldrev: 45af84a24e2ac7030ee3db3759ea96f202e50605 X-Git-Newrev: d998510ae479f3d8a0a1950c8a6b363a480459c8 X-Git-Rev: d998510ae479f3d8a0a1950c8a6b363a480459c8 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. bschuchardt pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new d998510 GEODE-3563 SSL socket handling problems in TCPConduit run d998510 is described below commit d998510ae479f3d8a0a1950c8a6b363a480459c8 Author: Bruce Schuchardt AuthorDate: Tue May 22 08:46:15 2018 -0700 GEODE-3563 SSL socket handling problems in TCPConduit run Gester suggested adding a unit test for non-ssl sockets to verify that the timeout setting on the socket is not tampered with. --- .../apache/geode/internal/net/SocketCreatorJUnitTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java index a0480b9..8376d59 100644 --- a/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/SocketCreatorJUnitTest.java @@ -15,9 +15,11 @@ package org.apache.geode.internal.net; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.net.Socket; import java.security.cert.Certificate; import java.security.cert.X509Certificate; @@ -65,8 +67,20 @@ public class SocketCreatorJUnitTest { verify(socket).setSoTimeout(timeout); } + @Test + public void testConfigureServerPlainSocketDoesntSetSoTimeout() throws Exception { + final SocketCreator socketCreator = new SocketCreator(mock(SSLConfig.class)); + final Socket socket = mock(Socket.class); + final int timeout = 1938236; + + socketCreator.handshakeIfSocketIsSSL(socket, timeout); + verify(socket, never()).setSoTimeout(timeout); + } + private String getSingleKeyKeystore() { return TestUtil.getResourcePath(getClass(), "/ssl/trusted.keystore"); } + + } -- To stop receiving notification emails like this one, please contact bschuchardt@apache.org.