This patch introduces a time limit for establishing a secure connection to a RMI server.
The existing implementation uses the configured `sun.rmi.transport.tcp.handshakeTimeout` during RMI handshake only; there's no time limit for SSL handshake. With this patch, the configuration option `sun.rmi.transport.tcp.handshakeTimeout` is also used as a socket read timeout during the SSL handshake. I modified the existing `HandshakeTimeout` test to verify both non-SSL and SSL connections; the test passes with my changes, fails without them. Existing tier1-3 tests continue to pass. While working on the patch I noticed that `conn.isReusable()` always returns true. I can remove all references to `isReusable` here or in another PR; it would simplify the code a bit. ------------- Commit messages: - Copyright - RMI SSL timeout Changes: https://git.openjdk.org/jdk/pull/11829/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11829&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8189338 Stats: 41 lines in 2 files changed: 23 ins; 13 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/11829.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11829/head:pull/11829 PR: https://git.openjdk.org/jdk/pull/11829