You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/08/06 08:56:32 UTC

[tomcat] branch main updated: Fix logic error for certificateKeystoreFile="NONE"

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 4737645  Fix logic error for certificateKeystoreFile="NONE"
4737645 is described below

commit 4737645491f3e79fec2f083019dd082d102159b6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Aug 6 10:55:57 2021 +0200

    Fix logic error for certificateKeystoreFile="NONE"
---
 java/org/apache/tomcat/util/net/SSLUtilBase.java |  4 ++--
 webapps/docs/changelog.xml                       | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLUtilBase.java b/java/org/apache/tomcat/util/net/SSLUtilBase.java
index b201201..0cac954 100644
--- a/java/org/apache/tomcat/util/net/SSLUtilBase.java
+++ b/java/org/apache/tomcat/util/net/SSLUtilBase.java
@@ -192,8 +192,8 @@ public abstract class SSLUtilBase implements SSLUtil {
                 // Some key store types (e.g. hardware) expect the InputStream
                 // to be null
                 if(!("PKCS11".equalsIgnoreCase(type) ||
-                        path.isEmpty()) ||
-                        "NONE".equalsIgnoreCase(path)) {
+                        path.isEmpty() ||
+                        "NONE".equalsIgnoreCase(path))) {
                     istream = ConfigFileLoader.getSource().getResource(path).getInputStream();
                 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 991b883..bab396b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,16 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 10.1.0-M5 (markt)" rtext="in development">
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        Correct a logic error that meant setting
+        <code>certificateKeystoreFile</code> to <code>NONE</code> did not have
+        the expected effect. <code>NONE</code> was incorrectly treated as a file
+        path. Patch provided by Mikael Sterner. (markt)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 10.1.0-M4 (markt)" rtext="release in progress">
   <subsection name="WebSocket">

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org