< prev index next >
test/jdk/sun/security/ssl/SSLSocketImpl/InvalidateServerSessionRenegotiate.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -26,11 +26,11 @@
// system properties in samevm/agentvm mode.
//
/*
* @test
- * @bug 4403428
+ * @bug 4403428 8190492
* @summary Invalidating JSSE session on server causes SSLProtocolException
* @run main/othervm InvalidateServerSessionRenegotiate SSLv3
* @run main/othervm InvalidateServerSessionRenegotiate TLSv1
* @run main/othervm InvalidateServerSessionRenegotiate TLSv1.1
* @run main/othervm InvalidateServerSessionRenegotiate TLSv1.2
@@ -118,10 +118,16 @@
*/
serverReady = true;
SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
sslSocket.addHandshakeCompletedListener(this);
+
+ // Enable all supported protocols on server side to test SSLv3
+ if ("SSLv3".equals(tlsProtocol)) {
+ sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
+ }
+
InputStream sslIS = sslSocket.getInputStream();
OutputStream sslOS = sslSocket.getOutputStream();
for (int i = 0; i < 10; i++) {
sslIS.read();
< prev index next >