changeset 14947:daac853357a5 jdk8u292-b03

8256682: JDK-8202343 is incomplete Reviewed-by: dfuchs
author mullan
date Thu, 19 Nov 2020 19:09:22 +0000
parents 7611b664f522
children 93c3c4ddd1f0 aec205dc9672
files test/sun/security/util/HostnameMatcher/NullHostnameCheck.java
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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().