changeset 13370:3e9d9329d614

Merge
author aefimov
date Fri, 05 Oct 2018 16:53:40 +0100
parents dad8da6f3cdf b59df3ee7ad5
children 716ebc3075cc
files .hgtags
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sun Sep 30 20:03:24 2018 +0100
+++ b/.hgtags	Fri Oct 05 16:53:40 2018 +0100
@@ -945,3 +945,4 @@
 ecfdede1e6ddf37dcca415861ab031c18ec4b349 jdk8u181-b34
 ac943243eaf1cb3971b953d56527287ae3f8d223 jdk8u181-b35
 674963395b9f747e746af782f2f3ea7995385420 jdk8u181-b36
+92587df933606ff8f03c6073be6c4089211de2b3 jdk8u181-b37
--- a/src/share/classes/com/sun/jndi/ldap/Connection.java	Sun Sep 30 20:03:24 2018 +0100
+++ b/src/share/classes/com/sun/jndi/ldap/Connection.java	Fri Oct 05 16:53:40 2018 +0100
@@ -382,17 +382,17 @@
         // then reset the timeout.
         if (socket instanceof SSLSocket) {
             SSLSocket sslSocket = (SSLSocket) socket;
-            int socketTimeout = sslSocket.getSoTimeout();
             if (!IS_HOSTNAME_VERIFICATION_DISABLED) {
                 SSLParameters param = sslSocket.getSSLParameters();
                 param.setEndpointIdentificationAlgorithm("LDAPS");
                 sslSocket.setSSLParameters(param);
             }
             if (connectTimeout > 0) {
+                int socketTimeout = sslSocket.getSoTimeout();
                 sslSocket.setSoTimeout(connectTimeout); // reuse full timeout value
+                sslSocket.startHandshake();
+                sslSocket.setSoTimeout(socketTimeout);
             }
-            sslSocket.startHandshake();
-            sslSocket.setSoTimeout(socketTimeout);
         }
         return socket;
     }