!46 add 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch

From: @xiezhaokun
Reviewed-by: @jvmboy
Signed-off-by: @jvmboy
This commit is contained in:
openeuler-ci-bot 2020-11-06 13:44:42 +08:00 committed by Gitee
commit 5168d641fc
2 changed files with 36 additions and 1 deletions

View File

@ -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: <java.naming>: 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

View File

@ -915,7 +915,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver} Version: %{javaver}.%{updatever}.%{buildver}
Release: 1 Release: 2
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # 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 # 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 # 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 Patch126: zlib-optimization.patch
Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch
# 8u272
Patch128: 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch
############################################# #############################################
# #
# Upstreamable patches # Upstreamable patches
@ -1459,6 +1462,7 @@ pushd %{top_level_dir_name}
%patch125 -p1 %patch125 -p1
%patch126 -p1 %patch126 -p1
%patch127 -p1 %patch127 -p1
%patch128 -p1
popd popd
@ -2075,6 +2079,9 @@ require "copy_jdk_configs.lua"
%endif %endif
%changelog %changelog
* Fri Nov 06 2020 xiezhaokun <xiezhaokun@huawei.com> - 1:1.8.0.272-b10.2
- add 8214440-ldap-over-a-TLS-connection-negotiate-fail.patch
* Sat Oct 24 2020 noah <hedongbo@huawei.com> - 1:1.8.0.272-b10.1 * Sat Oct 24 2020 noah <hedongbo@huawei.com> - 1:1.8.0.272-b10.1
- rename Boole to Bisheng - rename Boole to Bisheng