< prev index next >

test/sun/security/ssl/SSLContextImpl/SSLContextVersion.java

Print this page
rev 14346 : 8202343: Disable TLS 1.0 and 1.1
Reviewed-by: xuelei, dfuchs, coffeys, sgehwolf

*** 1,7 **** /* ! * Copyright (c) 2011, 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) 2011, 2020, 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.
*** 27,36 **** --- 27,37 ---- /* * @test * @bug 6976117 * @summary SSLContext.getInstance("TLSv1.1") returns SSLEngines/SSLSockets * without TLSv1.1 enabled + * @library /lib/security * @run main/othervm SSLContextVersion */ import javax.net.ssl.*;
*** 55,64 **** --- 56,68 ---- this.supportedProtocolVersion = supportedProtocolVersion; } } public static void main(String[] args) throws Exception { + // Re-enable TLSv1 and TLSv1.1 since test depends on them. + SecurityUtils.removeFromDisabledTlsAlgs("TLSv1", "TLSv1.1"); + for (ContextVersion cv : ContextVersion.values()) { System.out.println("Checking SSLContext of " + cv.contextVersion); SSLContext context = SSLContext.getInstance(cv.contextVersion); // Default SSLContext is initialized automatically.
< prev index next >