# HG changeset patch # User mullan # Date 1605812962 0 # Node ID daac853357a501b21955518977d11b9121ff3197 # Parent 7611b664f5222874fbdc92f0a4322d01f1e083ad 8256682: JDK-8202343 is incomplete Reviewed-by: dfuchs diff -r 7611b664f522 -r daac853357a5 test/sun/security/util/HostnameMatcher/NullHostnameCheck.java --- a/test/sun/security/util/HostnameMatcher/NullHostnameCheck.java Mon May 06 08:54:19 2019 -0700 +++ b/test/sun/security/util/HostnameMatcher/NullHostnameCheck.java Thu Nov 19 19:09:22 2020 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -42,10 +42,11 @@ * @bug 8211339 8234728 * @summary Verify hostname returns an exception instead of null pointer when * creating a new engine - * @run main NullHostnameCheck TLSv1 - * @run main NullHostnameCheck TLSv1.1 - * @run main NullHostnameCheck TLSv1.2 - * @run main NullHostnameCheck TLSv1.3 + * @library /lib/security + * @run main/othervm NullHostnameCheck TLSv1 + * @run main/othervm NullHostnameCheck TLSv1.1 + * @run main/othervm NullHostnameCheck TLSv1.2 + * @run main/othervm NullHostnameCheck TLSv1.3 */ @@ -53,6 +54,12 @@ public static void main(String[] args) throws Exception { String protocol = args[0]; + + // Re-enable TLSv1 or TLSv1.1 when test depends on it. + if (protocol.equals("TLSv1") || protocol.equals("TLSv1.1")) { + SecurityUtils.removeFromDisabledTlsAlgs(protocol); + } + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load( new ByteArrayInputStream(Base64.getDecoder().