< prev index next >
test/jdk/sun/security/ssl/SSLSocketImpl/NoImpactServerRenego.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2013, 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.
--- 1,7 ----
/*
! * Copyright (c) 2013, 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.
*** 24,34 ****
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
/*
* @test
! * @bug 7188658
* @summary Add possibility to disable client initiated renegotiation
* @run main/othervm -Djdk.tls.rejectClientInitiatedRenegotiation=true
* NoImpactServerRenego SSLv3
* @run main/othervm -Djdk.tls.rejectClientInitiatedRenegotiation=true
* NoImpactServerRenego TLSv1
--- 24,34 ----
// SunJSSE does not support dynamic system properties, no way to re-use
// system properties in samevm/agentvm mode.
/*
* @test
! * @bug 7188658 8190492
* @summary Add possibility to disable client initiated renegotiation
* @run main/othervm -Djdk.tls.rejectClientInitiatedRenegotiation=true
* NoImpactServerRenego SSLv3
* @run main/othervm -Djdk.tls.rejectClientInitiatedRenegotiation=true
* NoImpactServerRenego TLSv1
*** 119,128 ****
--- 119,134 ----
*/
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 >