diff --git a/.hgtags b/.hgtags index 5e2e4b7ad20d5e051a68057936a8c0b5cfa6149f..4b67e788e54e3d6f78da162118f9f37faf9858ba 100644 --- a/.hgtags +++ b/.hgtags @@ -945,3 +945,4 @@ f47b81dbed2dd730d34a8dc3e3d14e2aa9f9c493 jdk8u192-b09 2cd82eb879dd0f853dbfb7ffa2441e81e2413447 jdk8u192-b11 f877dad22786f92aa495a595a1a4a16f0163c573 jdk8u192-b12 996dd3ce1ec5437da8b5a742c60a5ff7b6028122 jdk8u192-b26 +9da3ff5cd435240bc4941bc1c2ca170c567e012f jdk8u202-b01 diff --git a/make/CopyFiles.gmk b/make/CopyFiles.gmk index c447ae13a5b706486f2a7363ff5013423b762f98..98f037803fb29bfa669688aa8c5c777cad1bfde2 100644 --- a/make/CopyFiles.gmk +++ b/make/CopyFiles.gmk @@ -269,6 +269,15 @@ ifeq ($(OPENJDK_TARGET_OS), windows) 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 ########################################################################################## diff --git a/src/solaris/native/java/net/net_util_md.c b/src/solaris/native/java/net/net_util_md.c index 7436d5214b93f94551f3f7238d12d5d3378d820f..b8405844ee67d3c43ecef745f04eded9ce9d76be 100644 --- a/src/solaris/native/java/net/net_util_md.c +++ b/src/solaris/native/java/net/net_util_md.c @@ -96,7 +96,9 @@ void setDefaultScopeID(JNIEnv *env, struct sockaddr *him) } 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; diff --git a/test/sun/security/pkcs11/PKCS11Test.java b/test/sun/security/pkcs11/PKCS11Test.java index 4366fe377b76cadd6f1445ccf8a8bcc7ebccef02..feec2115c929ec995fcffe795e8331b4f8d5e5e5 100644 --- a/test/sun/security/pkcs11/PKCS11Test.java +++ b/test/sun/security/pkcs11/PKCS11Test.java @@ -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 @@ public abstract class PKCS11Test { getNSSInfo(nss_library); } + // Try to parse the version for the specified library. + // Assuming the library contains either of the following patterns: + // $Header: NSS + // Version: NSS + // Here, 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 @@ public abstract class PKCS11Test { 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 @@ public abstract class PKCS11Test { // 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 @@ public abstract class PKCS11Test { 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(); diff --git a/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java index 92eb0f91b93005fdc208f87d71eb226828fa8bef..cdf1672ad45037e47a52be622b9b4b4f19f7e96a 100644 --- a/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java +++ b/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java @@ -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 @@ public class TestKeyPairGenerator extends PKCS11Test { 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);