< prev index next >
test/jdk/javax/net/ssl/ServerName/SSLSocketExplorer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2012, 2014, 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) 2012, 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,36 ****
// system properties in samevm/agentvm mode.
//
/**
* @test
! * @bug 7068321
* @summary Support TLS Server Name Indication (SNI) Extension in JSSE Server
* @library ../templates
* @build SSLCapabilities SSLExplorer
* @run main/othervm SSLSocketExplorer SSLv2Hello,SSLv3
* @run main/othervm SSLSocketExplorer SSLv3
--- 26,36 ----
// system properties in samevm/agentvm mode.
//
/**
* @test
! * @bug 7068321 8190492
* @summary Support TLS Server Name Indication (SNI) Extension in JSSE Server
* @library ../templates
* @build SSLCapabilities SSLExplorer
* @run main/othervm SSLSocketExplorer SSLv2Hello,SSLv3
* @run main/othervm SSLSocketExplorer SSLv3
*** 146,155 ****
--- 146,158 ----
(SSLSocketFactory) SSLSocketFactory.getDefault();
ByteArrayInputStream bais =
new ByteArrayInputStream(buffer, 0, position);
SSLSocket sslSocket = (SSLSocket)sslsf.createSocket(socket, bais, true);
+ // Enable all supported protocols on server side to test SSLv3
+ sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
+
InputStream sslIS = sslSocket.getInputStream();
OutputStream sslOS = sslSocket.getOutputStream();
sslIS.read();
sslOS.write(85);
< prev index next >