9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 4495742 27 * @summary Add non-blocking SSL/TLS functionality, usable with any 28 * I/O abstraction 29 * 30 * This is a bit hacky, meant to test various conditions. The main 31 * thing I wanted to do with this was to do buffer reads/writes 32 * when buffers were not empty. (buffer.position() = 10) 33 * The code could certainly be tightened up a lot. 34 * 35 * @author Brad Wetmore 36 * 37 * @run main/othervm ConnectionTest 38 */ 39 40 import javax.net.ssl.*; 41 import javax.net.ssl.SSLEngineResult.*; 42 import java.io.*; 43 import java.security.*; 44 import java.nio.*; 45 46 public class ConnectionTest { 47 48 private SSLContext sslc; 49 private SSLEngine ssle1; 50 private SSLEngine ssle2; 51 52 private static String pathToStores = "../etc"; 53 private static String keyStoreFile = "keystore"; 54 private static String trustStoreFile = "truststore"; 55 private static String passwd = "passphrase"; 56 57 private static String keyFilename = 58 System.getProperty("test.src", "./") + "/" + pathToStores + 59 "/" + keyStoreFile; | 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 4495742 27 * @summary Add non-blocking SSL/TLS functionality, usable with any 28 * I/O abstraction 29 * @ignore the dependent implementation details are changed 30 * @author Brad Wetmore 31 * 32 * @run main/othervm ConnectionTest 33 */ 34 35 /* 36 * This is a bit hacky, meant to test various conditions. The main 37 * thing I wanted to do with this was to do buffer reads/writes 38 * when buffers were not empty. (buffer.position() = 10) 39 * The code could certainly be tightened up a lot. 40 */ 41 import javax.net.ssl.*; 42 import javax.net.ssl.SSLEngineResult.*; 43 import java.io.*; 44 import java.security.*; 45 import java.nio.*; 46 47 public class ConnectionTest { 48 49 private SSLContext sslc; 50 private SSLEngine ssle1; 51 private SSLEngine ssle2; 52 53 private static String pathToStores = "../etc"; 54 private static String keyStoreFile = "keystore"; 55 private static String trustStoreFile = "truststore"; 56 private static String passwd = "passphrase"; 57 58 private static String keyFilename = 59 System.getProperty("test.src", "./") + "/" + pathToStores + 60 "/" + keyStoreFile; |