changeset 13320:478a4add975b jdk8u202-b02 jdk8u212-b00

Merge
author coffeys
date Tue, 30 Oct 2018 14:38:34 +0000
parents 9cd4a2714d8b (current diff) e3d899eb8099 (diff)
children 03719dd77061 fa06cdb4c6f7
files
diffstat 5 files changed, 37 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Oct 19 14:19:47 2018 +0100
+++ b/.hgtags	Tue Oct 30 14:38:34 2018 +0000
@@ -945,3 +945,4 @@
 2cd82eb879dd0f853dbfb7ffa2441e81e2413447 jdk8u192-b11
 f877dad22786f92aa495a595a1a4a16f0163c573 jdk8u192-b12
 996dd3ce1ec5437da8b5a742c60a5ff7b6028122 jdk8u192-b26
+9da3ff5cd435240bc4941bc1c2ca170c567e012f jdk8u202-b01
--- a/make/CopyFiles.gmk	Fri Oct 19 14:19:47 2018 +0100
+++ b/make/CopyFiles.gmk	Tue Oct 30 14:38:34 2018 +0000
@@ -269,6 +269,15 @@
       MACRO := copy-and-chmod))
 
   COPY_FILES += $(COPY_MSVCR) $(COPY_MSVCP)
+
+  ifneq ($(UCRT_DLL_DIR), )
+    $(eval $(call SetupCopyFiles,COPY_UCRT_DLLS, \
+        DEST := $(JDK_OUTPUTDIR)/bin, \
+        FILES := $(wildcard $(UCRT_DLL_DIR)/*.dll), \
+        MACRO := copy-and-chmod \
+    ))
+    COPY_FILES += $(COPY_UCRT_DLLS)
+  endif
 endif
 
 ##########################################################################################
--- a/src/solaris/native/java/net/net_util_md.c	Fri Oct 19 14:19:47 2018 +0100
+++ b/src/solaris/native/java/net/net_util_md.c	Tue Oct 30 14:38:34 2018 +0000
@@ -96,7 +96,9 @@
     }
     int defaultIndex;
     struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)him;
-    if (sin6->sin6_family == AF_INET6 && (sin6->sin6_scope_id == 0)) {
+    if (sin6->sin6_family == AF_INET6 && (sin6->sin6_scope_id == 0) &&
+            (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) ||
+             IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) {
         defaultIndex = (*env)->GetStaticIntField(env, ni_class,
                                                  ni_defaultIndexID);
         sin6->sin6_scope_id = defaultIndex;
--- a/test/sun/security/pkcs11/PKCS11Test.java	Fri Oct 19 14:19:47 2018 +0100
+++ b/test/sun/security/pkcs11/PKCS11Test.java	Tue Oct 30 14:38:34 2018 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -25,6 +25,7 @@
 // common infrastructure for SunPKCS11 tests
 
 import java.io.*;
+import java.nio.charset.StandardCharsets;
 import java.util.*;
 import java.lang.reflect.*;
 
@@ -269,8 +270,15 @@
         getNSSInfo(nss_library);
     }
 
+    // Try to parse the version for the specified library.
+    // Assuming the library contains either of the following patterns:
+    // $Header: NSS <version>
+    // Version: NSS <version>
+    // Here, <version> stands for NSS version.
     static double getNSSInfo(String library) {
-        String nssHeader = "$Header: NSS";
+        // look for two types of headers in NSS libraries
+        String nssHeader1 = "$Header: NSS";
+        String nssHeader2 = "Version: NSS";
         boolean found = false;
         String s = null;
         int i = 0;
@@ -297,8 +305,9 @@
                     read = 100 + is.read(data, 100, 900);
                 }
 
-                s = new String(data, 0, read);
-                if ((i = s.indexOf(nssHeader)) > 0) {
+                s = new String(data, 0, read, StandardCharsets.US_ASCII);
+                i = s.indexOf(nssHeader1);
+                if (i > 0 || (i = s.indexOf(nssHeader2)) > 0) {
                     found = true;
                     // If the nssHeader is before 920 we can break, otherwise
                     // we may not have the whole header so do another read.  If
@@ -324,7 +333,12 @@
 
         // the index after whitespace after nssHeader
         int afterheader = s.indexOf("NSS", i) + 4;
-        String version = s.substring(afterheader, s.indexOf(' ', afterheader));
+        String version = String.valueOf(s.charAt(afterheader));
+        for (char c = s.charAt(++afterheader);
+                c == '.' || (c >= '0' && c <= '9');
+                c = s.charAt(++afterheader)) {
+            version += c;
+        }
 
         // If a "dot dot" release, strip the extra dots for double parsing
         String[] dot = version.split("\\.");
@@ -339,6 +353,9 @@
         try {
             nss_version = Double.parseDouble(version);
         } catch (NumberFormatException e) {
+            System.out.println("===== Content start =====");
+            System.out.println(s);
+            System.out.println("===== Content end =====");
             System.out.println("Failed to parse lib" + library +
                     " version. Set to 0.0");
             e.printStackTrace();
--- a/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Fri Oct 19 14:19:47 2018 +0100
+++ b/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Tue Oct 30 14:38:34 2018 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -103,7 +103,7 @@
         data = new byte[2048];
         // keypair generation is very slow, test only a few short keys
         int[] keyLengths = {512, 512, 1024};
-        BigInteger[] pubExps = {null, BigInteger.valueOf(3), null};
+        BigInteger[] pubExps = {null, RSAKeyGenParameterSpec.F4, null};
         KeyPair[] keyPairs = new KeyPair[3];
         new Random().nextBytes(data);
         KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", provider);