-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.2
-
generic
-
generic
Name: aiR10266 Date: 06/28/2004
The setSessionTimeout(int seconds) method of default SSLSessionContext
interface implementation sets negative timeout if parameter is a huge
value such as Integer.MAX_VALUE.
Example:
------------------TimeoutTest.java----------------
import javax.net.ssl.*;
public class TimeoutTest {
public static void main(String argv[]) throws Exception {
SSLContext sslc = SSLContext.getInstance("SSLv3", "SunJSSE");
SSLSessionContext cnt = sslc.getServerSessionContext();
cnt.setSessionTimeout(Integer.MAX_VALUE);
System.out.println("Expected seconds: " + Integer.MAX_VALUE +
", got seconds: " + cnt.getSessionTimeout());
}
}
-------------------OUTPUT--------------------
Expected seconds: 2147483647, got seconds: -1
% java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
======================================================================
- duplicates
-
JDK-4965541 SSLSessionContext.setSessionTimeout(Integer.MAX_VALUE) fails
- Closed