From 9e5371ba69c5e3506251d879fc690c1295eeb78e Mon Sep 17 00:00:00 2001 From: dongbohe Date: Fri, 6 Nov 2020 11:05:31 +0800 Subject: [PATCH] add 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch --- ...over-a-TLS-connection-negotiate-fail.patch | 28 +++++++++++++++++++ java-1.8.0-openjdk.spec | 9 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch diff --git a/8214440-ldap-over-a-TLS-connection-negotiate-fail.patch b/8214440-ldap-over-a-TLS-connection-negotiate-fail.patch new file mode 100755 index 0000000..53968fc --- /dev/null +++ b/8214440-ldap-over-a-TLS-connection-negotiate-fail.patch @@ -0,0 +1,28 @@ +From cad64c28ba497ba1165a5ce4530ce53c4ac6263c Mon Sep 17 00:00:00 2001 +Date: Sat, 31 Oct 2020 22:05:05 +0800 +Subject: [PATCH] 8214440:ldap over a TLS connection negotiate fail + +Summary: : ldap over a TLS connection negotiate failed with "javax.net.ssl.SSLPeerUnverifiedException: hostname of the server '' does not match the hostname in the server's certificate" +LLT: NA +Bug url: https://bugs.openjdk.java.net/browse/JDK-8214440 +--- + .../classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java b/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java +index d9c22b075..2e090fecb 100644 +--- a/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java ++++ b/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java +@@ -288,7 +288,8 @@ final public class StartTlsResponseImpl extends StartTlsResponse { + */ + public void setConnection(Connection ldapConnection, String hostname) { + this.ldapConnection = ldapConnection; +- this.hostname = (hostname != null) ? hostname : ldapConnection.host; ++ this.hostname = (hostname == null || hostname.isEmpty()) ++ ? ldapConnection.host : hostname; + originalInputStream = ldapConnection.inStream; + originalOutputStream = ldapConnection.outStream; + } +-- +2.19.0 + diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index f2b5c4b..d5c8b1f 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -915,7 +915,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 1 +Release: 2 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1052,6 +1052,9 @@ Patch125: Extend-CDS-to-support-app-class-metadata-sharing.patch Patch126: zlib-optimization.patch Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch +# 8u272 +Patch128: 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch + ############################################# # # Upstreamable patches @@ -1459,6 +1462,7 @@ pushd %{top_level_dir_name} %patch125 -p1 %patch126 -p1 %patch127 -p1 +%patch128 -p1 popd @@ -2075,6 +2079,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Fri Nov 06 2020 xiezhaokun - 1:1.8.0.272-b10.2 +- add 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch + * Sat Oct 24 2020 noah - 1:1.8.0.272-b10.1 - rename Boole to Bisheng -- Gitee