(tomcat) branch 9.0.x updated: BZ 69370: DefaultServlet's HTML listing uses incorrect labels

2024-10-10 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 78e4bd0994 BZ 69370: DefaultServlet's HTML listing uses incorrect 
labels
78e4bd0994 is described below

commit 78e4bd099417481b07caf0e0da808fc5ae786272
Author: Michael Osipov 
AuthorDate: Sat Oct 5 14:01:18 2024 +0200

BZ 69370: DefaultServlet's HTML listing uses incorrect labels
---
 .../org/apache/catalina/servlets/DefaultServlet.java | 20 ++--
 .../apache/catalina/servlets/LocalStrings.properties | 11 +--
 .../catalina/servlets/LocalStrings_de.properties |  2 --
 .../catalina/servlets/LocalStrings_es.properties | 11 +--
 .../catalina/servlets/LocalStrings_fr.properties | 11 +--
 .../catalina/servlets/LocalStrings_ja.properties | 11 +--
 .../catalina/servlets/LocalStrings_ko.properties | 11 +--
 .../catalina/servlets/LocalStrings_zh_CN.properties  | 10 +-
 webapps/docs/changelog.xml   |  4 
 9 files changed, 44 insertions(+), 47 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3b33c0fc29..d5500e1a01 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1752,7 +1752,7 @@ public class DefaultServlet extends HttpServlet {
  */
 sb.append("\r\n");
 sb.append("");
-sb.append(sm.getString("directory.title", directoryWebappPath));
+sb.append(sm.getString("defaultServlet.directory.title", 
directoryWebappPath));
 sb.append("\r\n");
 sb.append("

(tomcat) branch 10.1.x updated: BZ 69370: DefaultServlet's HTML listing uses incorrect labels

2024-10-10 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 098834facf BZ 69370: DefaultServlet's HTML listing uses incorrect 
labels
098834facf is described below

commit 098834facf88904ee4c727f9f25b809d3cfd4ddd
Author: Michael Osipov 
AuthorDate: Sat Oct 5 14:01:18 2024 +0200

BZ 69370: DefaultServlet's HTML listing uses incorrect labels
---
 .../org/apache/catalina/servlets/DefaultServlet.java | 20 ++--
 .../apache/catalina/servlets/LocalStrings.properties | 11 +--
 .../catalina/servlets/LocalStrings_de.properties |  2 --
 .../catalina/servlets/LocalStrings_es.properties | 11 +--
 .../catalina/servlets/LocalStrings_fr.properties | 11 +--
 .../catalina/servlets/LocalStrings_ja.properties | 11 +--
 .../catalina/servlets/LocalStrings_ko.properties | 11 +--
 .../catalina/servlets/LocalStrings_zh_CN.properties  | 10 +-
 webapps/docs/changelog.xml   |  4 
 9 files changed, 44 insertions(+), 47 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 385ba14af9..08151a2bf0 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1692,7 +1692,7 @@ public class DefaultServlet extends HttpServlet {
  */
 sb.append("\r\n");
 sb.append("");
-sb.append(sm.getString("directory.title", directoryWebappPath));
+sb.append(sm.getString("defaultServlet.directory.title", 
directoryWebappPath));
 sb.append("\r\n");
 sb.append("

(tomcat) branch 11.0.x updated: BZ 69370: DefaultServlet's HTML listing uses incorrect labels

2024-10-10 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 507a76013d BZ 69370: DefaultServlet's HTML listing uses incorrect 
labels
507a76013d is described below

commit 507a76013de70bcc238b59eec3509082ea254dcc
Author: Michael Osipov 
AuthorDate: Sat Oct 5 14:01:18 2024 +0200

BZ 69370: DefaultServlet's HTML listing uses incorrect labels
---
 .../org/apache/catalina/servlets/DefaultServlet.java | 20 ++--
 .../apache/catalina/servlets/LocalStrings.properties | 11 +--
 .../catalina/servlets/LocalStrings_de.properties |  2 --
 .../catalina/servlets/LocalStrings_es.properties | 11 +--
 .../catalina/servlets/LocalStrings_fr.properties | 11 +--
 .../catalina/servlets/LocalStrings_ja.properties | 11 +--
 .../catalina/servlets/LocalStrings_ko.properties | 11 +--
 .../catalina/servlets/LocalStrings_zh_CN.properties  | 10 +-
 webapps/docs/changelog.xml   |  4 
 9 files changed, 44 insertions(+), 47 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 1dce680db8..387049f749 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1666,7 +1666,7 @@ public class DefaultServlet extends HttpServlet {
  */
 sb.append("\r\n");
 sb.append("");
-sb.append(sm.getString("directory.title", directoryWebappPath));
+sb.append(sm.getString("defaultServlet.directory.title", 
directoryWebappPath));
 sb.append("\r\n");
 sb.append("

(tomcat) branch main updated (8e90a82759 -> ebc6cfb227)

2024-10-10 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


from 8e90a82759 Update
 add ebc6cfb227 BZ 69370: DefaultServlet's HTML listing uses incorrect 
labels

No new revisions were added by this update.

Summary of changes:
 .../org/apache/catalina/servlets/DefaultServlet.java | 20 ++--
 .../apache/catalina/servlets/LocalStrings.properties | 11 +--
 .../catalina/servlets/LocalStrings_de.properties |  2 --
 .../catalina/servlets/LocalStrings_es.properties | 11 +--
 .../catalina/servlets/LocalStrings_fr.properties | 11 +--
 .../catalina/servlets/LocalStrings_ja.properties | 11 +--
 .../catalina/servlets/LocalStrings_ko.properties | 11 +--
 .../catalina/servlets/LocalStrings_zh_CN.properties  | 10 +-
 webapps/docs/changelog.xml   |  4 
 9 files changed, 44 insertions(+), 47 deletions(-)


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



(tomcat) branch 9.0.x updated: Improve HTML output of DefaultServlet

2024-10-05 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 0746ea9be8 Improve HTML output of DefaultServlet
0746ea9be8 is described below

commit 0746ea9be8dea5d43b82c5c0168b6525da22068f
Author: Michael Osipov 
AuthorDate: Sat Oct 5 19:18:17 2024 +0200

Improve HTML output of DefaultServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 +
 webapps/docs/changelog.xml|  3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 4ec1a3bdd0..3b33c0fc29 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1744,7 +1744,8 @@ public class DefaultServlet extends HttpServlet {
 String rewrittenContextPath = rewriteUrl(contextPath);
 
 // Render the page header
-sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 /*
  * TODO Activate this as soon as we use smClient with the request 
locales
  * sb.append("\r\n");
@@ -1755,9 +1756,9 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 sb.append("");
 sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
-sb.append(" ");
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
 sb.append("");
 sb.append(sm.getString("directory.title", directoryWebappPath));
 
@@ -1785,8 +1786,8 @@ public class DefaultServlet extends HttpServlet {
 sb.append("");
 }
 
-sb.append("");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
 
 sb.append("\r\n");
 
@@ -1891,16 +1892,16 @@ public class DefaultServlet extends HttpServlet {
 // Render the page footer
 sb.append("\r\n");
 
-sb.append("");
+sb.append("\r\n");
 
 String readme = getReadme(resource, encoding);
 if (readme != null) {
 sb.append(readme);
-sb.append("");
+sb.append("\r\n");
 }
 
 if (showServerInfo) {
-
sb.append("").append(ServerInfo.getServerInfo()).append("");
+
sb.append("").append(ServerInfo.getServerInfo()).append("\r\n");
 }
 sb.append("\r\n");
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 54f8f7b756..98424af9e3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,9 @@
 69373: Make DefaultServlet's HTML listing
 file last modified rendering better (flexible). (michaelo)
   
+  
+Improve HTML output of DefaultServlet. (michaelo)
+  
 
   
 


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



(tomcat) branch 10.1.x updated: Improve HTML output of DefaultServlet

2024-10-05 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 4c5a2697fa Improve HTML output of DefaultServlet
4c5a2697fa is described below

commit 4c5a2697facb00b3f9606f827d7daf443da8e2a6
Author: Michael Osipov 
AuthorDate: Sat Oct 5 19:18:17 2024 +0200

Improve HTML output of DefaultServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 +
 webapps/docs/changelog.xml|  3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 862c4c5fa0..385ba14af9 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1684,7 +1684,8 @@ public class DefaultServlet extends HttpServlet {
 String rewrittenContextPath = rewriteUrl(contextPath);
 
 // Render the page header
-sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 /*
  * TODO Activate this as soon as we use smClient with the request 
locales
  * sb.append("\r\n");
@@ -1695,9 +1696,9 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 sb.append("");
 sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
-sb.append(" ");
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
 sb.append("");
 sb.append(sm.getString("directory.title", directoryWebappPath));
 
@@ -1725,8 +1726,8 @@ public class DefaultServlet extends HttpServlet {
 sb.append("");
 }
 
-sb.append("");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
 
 sb.append("\r\n");
 
@@ -1831,16 +1832,16 @@ public class DefaultServlet extends HttpServlet {
 // Render the page footer
 sb.append("\r\n");
 
-sb.append("");
+sb.append("\r\n");
 
 String readme = getReadme(resource, encoding);
 if (readme != null) {
 sb.append(readme);
-sb.append("");
+sb.append("\r\n");
 }
 
 if (showServerInfo) {
-
sb.append("").append(ServerInfo.getServerInfo()).append("");
+
sb.append("").append(ServerInfo.getServerInfo()).append("\r\n");
 }
 sb.append("\r\n");
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c9a27fbdeb..d46dfce754 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,9 @@
 69373: Make DefaultServlet's HTML listing
 file last modified rendering better (flexible). (michaelo)
   
+  
+Improve HTML output of DefaultServlet. (michaelo)
+  
 
   
 


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



(tomcat) branch 11.0.x updated: Improve HTML output of DefaultServlet

2024-10-05 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 4108bf15b5 Improve HTML output of DefaultServlet
4108bf15b5 is described below

commit 4108bf15b54cc82b56736edf07cff4561e8d457c
Author: Michael Osipov 
AuthorDate: Sat Oct 5 19:18:17 2024 +0200

Improve HTML output of DefaultServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 +
 webapps/docs/changelog.xml|  3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index abbef0dc09..1dce680db8 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1658,7 +1658,8 @@ public class DefaultServlet extends HttpServlet {
 String rewrittenContextPath = rewriteUrl(contextPath);
 
 // Render the page header
-sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 /*
  * TODO Activate this as soon as we use smClient with the request 
locales
  * sb.append("\r\n");
@@ -1669,9 +1670,9 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 sb.append("");
 sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
-sb.append(" ");
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
 sb.append("");
 sb.append(sm.getString("directory.title", directoryWebappPath));
 
@@ -1699,8 +1700,8 @@ public class DefaultServlet extends HttpServlet {
 sb.append("");
 }
 
-sb.append("");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
 
 sb.append("\r\n");
 
@@ -1805,16 +1806,16 @@ public class DefaultServlet extends HttpServlet {
 // Render the page footer
 sb.append("\r\n");
 
-sb.append("");
+sb.append("\r\n");
 
 String readme = getReadme(resource, encoding);
 if (readme != null) {
 sb.append(readme);
-sb.append("");
+sb.append("\r\n");
 }
 
 if (showServerInfo) {
-
sb.append("").append(ServerInfo.getServerInfo()).append("");
+
sb.append("").append(ServerInfo.getServerInfo()).append("\r\n");
 }
 sb.append("\r\n");
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d2d8a98ada..f70a705d19 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,9 @@
 69373: Make DefaultServlet's HTML listing
 file last modified rendering better (flexible). (michaelo)
   
+  
+Improve HTML output of DefaultServlet. (michaelo)
+  
 
   
 


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



(tomcat) branch main updated (7a00ebdf59 -> b1fd1c457a)

2024-10-05 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


from 7a00ebdf59 BZ 69373: Make DefaultServlet's HTML listing file last 
modified rendering better (flexible)
 add b1fd1c457a Improve HTML output of DefaultServlet

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 +
 webapps/docs/changelog.xml|  3 +++
 2 files changed, 12 insertions(+), 8 deletions(-)


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



(tomcat) branch 9.0.x updated: BZ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible)

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new fa112fbee0 BZ 69373: Make DefaultServlet's HTML listing file last 
modified rendering better (flexible)
fa112fbee0 is described below

commit fa112fbee0d0882fc425e5f32a179f4e0218a029
Author: Michael Osipov 
AuthorDate: Fri Oct 4 22:14:16 2024 +0200

BZ 69373: Make DefaultServlet's HTML listing file last modified rendering 
better (flexible)
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 -
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 0541b51e13..4ec1a3bdd0 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -78,6 +78,7 @@ import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.catalina.webresources.CachedResource;
 import org.apache.tomcat.util.buf.B2CConverter;
+import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.parser.ContentRange;
 import org.apache.tomcat.util.http.parser.EntityTag;
@@ -1880,7 +1881,7 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 
 sb.append("");
-sb.append(childResource.getLastModifiedHttp());
+sb.append(renderTimestamp(childResource.getLastModified()));
 sb.append("\r\n");
 
 sb.append("\r\n");
@@ -1932,6 +1933,20 @@ public class DefaultServlet extends HttpServlet {
 }
 
 
+/**
+ * Render the specified file timestamp.
+ *
+ * @param timestamp File timestamp
+ *
+ * @return the formatted timestamp
+ */
+protected String renderTimestamp(long timestamp) {
+
+return FastHttpDateFormat.formatDate(timestamp);
+
+}
+
+
 /**
  * Get the readme file as a string.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ea17282c82..54f8f7b756 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 69374: Properly separate between table header and body
 in DefaultServlet's listing. (michaelo)
   
+  
+69373: Make DefaultServlet's HTML listing
+    file last modified rendering better (flexible). (michaelo)
+  
 
   
 


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



(tomcat) branch 10.1.x updated: BZ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible)

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 2f0854d8f0 BZ 69373: Make DefaultServlet's HTML listing file last 
modified rendering better (flexible)
2f0854d8f0 is described below

commit 2f0854d8f00f3611a1b38baaf3085f46526179c2
Author: Michael Osipov 
AuthorDate: Fri Oct 4 22:14:16 2024 +0200

BZ 69373: Make DefaultServlet's HTML listing file last modified rendering 
better (flexible)
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 -
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 8b3d3f6046..862c4c5fa0 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -78,6 +78,7 @@ import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.catalina.webresources.CachedResource;
 import org.apache.tomcat.util.buf.B2CConverter;
+import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.parser.ContentRange;
 import org.apache.tomcat.util.http.parser.EntityTag;
@@ -1820,7 +1821,7 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 
 sb.append("");
-sb.append(childResource.getLastModifiedHttp());
+sb.append(renderTimestamp(childResource.getLastModified()));
 sb.append("\r\n");
 
 sb.append("\r\n");
@@ -1872,6 +1873,20 @@ public class DefaultServlet extends HttpServlet {
 }
 
 
+/**
+ * Render the specified file timestamp.
+ *
+ * @param timestamp File timestamp
+ *
+ * @return the formatted timestamp
+ */
+protected String renderTimestamp(long timestamp) {
+
+return FastHttpDateFormat.formatDate(timestamp);
+
+}
+
+
 /**
  * Get the readme file as a string.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8491e6ce29..c9a27fbdeb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 69374: Properly separate between table header and body
 in DefaultServlet's listing. (michaelo)
   
+  
+69373: Make DefaultServlet's HTML listing
+    file last modified rendering better (flexible). (michaelo)
+  
 
   
 


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



(tomcat) branch 11.0.x updated: BZ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible)

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 884fe5a0b9 BZ 69373: Make DefaultServlet's HTML listing file last 
modified rendering better (flexible)
884fe5a0b9 is described below

commit 884fe5a0b9d975f7993e6e23d732c63e708c12c7
Author: Michael Osipov 
AuthorDate: Fri Oct 4 22:14:16 2024 +0200

BZ 69373: Make DefaultServlet's HTML listing file last modified rendering 
better (flexible)
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 -
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 46d14d1e6f..abbef0dc09 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -73,6 +73,7 @@ import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.catalina.webresources.CachedResource;
 import org.apache.tomcat.util.buf.B2CConverter;
+import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.parser.ContentRange;
 import org.apache.tomcat.util.http.parser.EntityTag;
@@ -1794,7 +1795,7 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 
 sb.append("");
-sb.append(childResource.getLastModifiedHttp());
+sb.append(renderTimestamp(childResource.getLastModified()));
 sb.append("\r\n");
 
 sb.append("\r\n");
@@ -1846,6 +1847,20 @@ public class DefaultServlet extends HttpServlet {
 }
 
 
+/**
+ * Render the specified file timestamp.
+ *
+ * @param timestamp File timestamp
+ *
+ * @return the formatted timestamp
+ */
+protected String renderTimestamp(long timestamp) {
+
+return FastHttpDateFormat.formatDate(timestamp);
+
+}
+
+
 /**
  * Get the readme file as a string.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a991dd9ea7..d2d8a98ada 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 69374: Properly separate between table header and body
 in DefaultServlet's listing. (michaelo)
   
+  
+69373: Make DefaultServlet's HTML listing
+    file last modified rendering better (flexible). (michaelo)
+  
 
   
 


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



(tomcat) branch main updated: BZ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible)

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 7a00ebdf59 BZ 69373: Make DefaultServlet's HTML listing file last 
modified rendering better (flexible)
7a00ebdf59 is described below

commit 7a00ebdf59826d6ecf563ab423834fdea1fa6968
Author: Michael Osipov 
AuthorDate: Fri Oct 4 22:14:16 2024 +0200

BZ 69373: Make DefaultServlet's HTML listing file last modified rendering 
better (flexible)
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 17 -
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 46d14d1e6f..abbef0dc09 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -73,6 +73,7 @@ import org.apache.catalina.util.ServerInfo;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.catalina.webresources.CachedResource;
 import org.apache.tomcat.util.buf.B2CConverter;
+import org.apache.tomcat.util.http.FastHttpDateFormat;
 import org.apache.tomcat.util.http.ResponseUtil;
 import org.apache.tomcat.util.http.parser.ContentRange;
 import org.apache.tomcat.util.http.parser.EntityTag;
@@ -1794,7 +1795,7 @@ public class DefaultServlet extends HttpServlet {
 sb.append("\r\n");
 
 sb.append("");
-sb.append(childResource.getLastModifiedHttp());
+sb.append(renderTimestamp(childResource.getLastModified()));
 sb.append("\r\n");
 
 sb.append("\r\n");
@@ -1846,6 +1847,20 @@ public class DefaultServlet extends HttpServlet {
 }
 
 
+/**
+ * Render the specified file timestamp.
+ *
+ * @param timestamp File timestamp
+ *
+ * @return the formatted timestamp
+ */
+protected String renderTimestamp(long timestamp) {
+
+return FastHttpDateFormat.formatDate(timestamp);
+
+}
+
+
 /**
  * Get the readme file as a string.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 180bb7d504..eb580baa9c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,10 @@
 69374: Properly separate between table header and body
 in DefaultServlet's listing. (michaelo)
   
+  
+69373: Make DefaultServlet's HTML listing
+    file last modified rendering better (flexible). (michaelo)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: BZ 69374: Properly separate between table header and body in DefaultServlet's listing

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 4458247ca5 BZ 69374: Properly separate between table header and body 
in DefaultServlet's listing
4458247ca5 is described below

commit 4458247ca545644af2940d905952beabe0a90d6e
Author: Michael Osipov 
AuthorDate: Fri Oct 4 21:16:02 2024 +0200

BZ 69374: Properly separate between table header and body in 
DefaultServlet's listing
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 18 +++---
 webapps/docs/changelog.xml|  8 
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 18842f5156..0541b51e13 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1796,8 +1796,9 @@ public class DefaultServlet extends HttpServlet {
 order = null;
 }
 // Render the column headings
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 
 if (null != sortManager && null != request) {
 sortManager.sort(entries, request.getQueryString());
 }
 
 boolean shade = false;
+sb.append("\r\n");
 for (WebResource childResource : entries) {
 String filename = childResource.getName();
 if (filename.equalsIgnoreCase("WEB-INF") || 
filename.equalsIgnoreCase("META-INF")) {
@@ -1882,6 +1885,7 @@ public class DefaultServlet extends HttpServlet {
 
 sb.append("\r\n");
 }
+sb.append("\r\n");
 
 // Render the page footer
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 80b74c2072..ea17282c82 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+69374: Properly separate between table header and body
+in DefaultServlet's listing. (michaelo)
+  
+
+  
 
 
   


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



(tomcat) branch 10.1.x updated: BZ 69374: Properly separate between table header and body in DefaultServlet's listing

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 7bf7a7c6ed BZ 69374: Properly separate between table header and body 
in DefaultServlet's listing
7bf7a7c6ed is described below

commit 7bf7a7c6ed0e4327a395028fa3d8840fe0c7f2f6
Author: Michael Osipov 
AuthorDate: Fri Oct 4 21:16:02 2024 +0200

BZ 69374: Properly separate between table header and body in 
DefaultServlet's listing
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 18 +++---
 webapps/docs/changelog.xml|  8 
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 374d859752..8b3d3f6046 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1736,8 +1736,9 @@ public class DefaultServlet extends HttpServlet {
 order = null;
 }
 // Render the column headings
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 
 if (null != sortManager && null != request) {
 sortManager.sort(entries, request.getQueryString());
 }
 
 boolean shade = false;
+sb.append("\r\n");
 for (WebResource childResource : entries) {
 String filename = childResource.getName();
 if (filename.equalsIgnoreCase("WEB-INF") || 
filename.equalsIgnoreCase("META-INF")) {
@@ -1822,6 +1825,7 @@ public class DefaultServlet extends HttpServlet {
 
 sb.append("\r\n");
 }
+sb.append("\r\n");
 
 // Render the page footer
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 23e3431126..8491e6ce29 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+69374: Properly separate between table header and body
+in DefaultServlet's listing. (michaelo)
+  
+
+  
 
 
   


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



(tomcat) branch 11.0.x updated: BZ 69374: Properly separate between table header and body in DefaultServlet's listing

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 7abf1c6d5b BZ 69374: Properly separate between table header and body 
in DefaultServlet's listing
7abf1c6d5b is described below

commit 7abf1c6d5b6c4dc3d1062cf932b9e1f69d1034d0
Author: Michael Osipov 
AuthorDate: Fri Oct 4 21:16:02 2024 +0200

BZ 69374: Properly separate between table header and body in 
DefaultServlet's listing
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 18 +++---
 webapps/docs/changelog.xml|  8 
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index f95b821f62..46d14d1e6f 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1710,8 +1710,9 @@ public class DefaultServlet extends HttpServlet {
 order = null;
 }
 // Render the column headings
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 
 if (null != sortManager && null != request) {
 sortManager.sort(entries, request.getQueryString());
 }
 
 boolean shade = false;
+sb.append("\r\n");
 for (WebResource childResource : entries) {
 String filename = childResource.getName();
 if (filename.equalsIgnoreCase("WEB-INF") || 
filename.equalsIgnoreCase("META-INF")) {
@@ -1796,6 +1799,7 @@ public class DefaultServlet extends HttpServlet {
 
 sb.append("\r\n");
 }
+sb.append("\r\n");
 
 // Render the page footer
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 318715eca1..a991dd9ea7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+69374: Properly separate between table header and body
+in DefaultServlet's listing. (michaelo)
+  
+
+  
 
 
   


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



(tomcat) branch main updated: BZ 69374: Properly separate between table header and body in DefaultServlet's listing

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 d50c021797 BZ 69374: Properly separate between table header and body 
in DefaultServlet's listing
d50c021797 is described below

commit d50c02179742f82666af9c37c2d2669561310a4e
Author: Michael Osipov 
AuthorDate: Fri Oct 4 21:16:02 2024 +0200

BZ 69374: Properly separate between table header and body in 
DefaultServlet's listing
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 18 +++---
 webapps/docs/changelog.xml|  4 
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index f95b821f62..46d14d1e6f 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1710,8 +1710,9 @@ public class DefaultServlet extends HttpServlet {
 order = null;
 }
 // Render the column headings
+sb.append("\r\n");
 sb.append("\r\n");
-sb.append("");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("");
 if (sortListings && null != request) {
 sb.append("\r\n");
-sb.append("");
+sb.append("\r\n");
+sb.append("\r\n");
+sb.append("\r\n");
 
 if (null != sortManager && null != request) {
 sortManager.sort(entries, request.getQueryString());
 }
 
 boolean shade = false;
+sb.append("\r\n");
 for (WebResource childResource : entries) {
 String filename = childResource.getName();
 if (filename.equalsIgnoreCase("WEB-INF") || 
filename.equalsIgnoreCase("META-INF")) {
@@ -1796,6 +1799,7 @@ public class DefaultServlet extends HttpServlet {
 
 sb.append("\r\n");
 }
+sb.append("\r\n");
 
 // Render the page footer
 sb.append("\r\n");
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b30a554613..180bb7d504 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,10 @@
 Remove default value (was catalina) for the
 secret init parameter of the WebDAV Servlet. (remm)
   
+  
+69374: Properly separate between table header and body
+in DefaultServlet's listing. (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: Fix another typo

2024-10-04 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 5264042b31 Fix another typo
5264042b31 is described below

commit 5264042b31ad6287527567b863d55ac2c3cc090f
Author: Michael Osipov 
AuthorDate: Fri Oct 4 20:41:43 2024 +0200

Fix another typo
---
 java/jakarta/el/LocalStrings.properties | 2 +-
 java/jakarta/servlet/LocalStrings.properties| 2 +-
 java/jakarta/servlet/http/LocalStrings.properties   | 2 +-
 java/jakarta/servlet/jsp/LocalStrings.properties| 2 +-
 java/org/apache/catalina/authenticator/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/authenticator/jaspic/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/connector/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/core/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/deploy/LocalStrings.properties | 2 +-
 java/org/apache/catalina/filters/LocalStrings.properties| 2 +-
 java/org/apache/catalina/ha/authenticator/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/ha/backend/LocalStrings.properties | 2 +-
 java/org/apache/catalina/ha/context/LocalStrings.properties | 2 +-
 java/org/apache/catalina/ha/deploy/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/ha/session/LocalStrings.properties | 2 +-
 java/org/apache/catalina/ha/tcp/LocalStrings.properties | 2 +-
 java/org/apache/catalina/loader/LocalStrings.properties | 2 +-
 java/org/apache/catalina/manager/LocalStrings.properties| 2 +-
 java/org/apache/catalina/manager/host/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/mapper/LocalStrings.properties | 2 +-
 java/org/apache/catalina/mbeans/LocalStrings.properties | 2 +-
 java/org/apache/catalina/realm/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/security/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/servlets/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/session/LocalStrings.properties| 2 +-
 java/org/apache/catalina/ssi/LocalStrings.properties| 2 +-
 java/org/apache/catalina/startup/LocalStrings.properties| 2 +-
 java/org/apache/catalina/storeconfig/LocalStrings.properties| 2 +-
 java/org/apache/catalina/tribes/group/LocalStrings.properties   | 2 +-
 .../apache/catalina/tribes/group/interceptors/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/tribes/io/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/tribes/jmx/LocalStrings.properties | 2 +-
 java/org/apache/catalina/tribes/membership/LocalStrings.properties  | 2 +-
 .../org/apache/catalina/tribes/membership/cloud/LocalStrings.properties | 2 +-
 java/org/apache/catalina/tribes/tipis/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/tribes/transport/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/tribes/transport/nio/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/tribes/util/LocalStrings.properties| 2 +-
 java/org/apache/catalina/users/LocalStrings.properties  | 2 +-
 java/org/apache/catalina/util/LocalStrings.properties   | 2 +-
 java/org/apache/catalina/valves/LocalStrings.properties | 2 +-
 java/org/apache/catalina/valves/rewrite/LocalStrings.properties | 2 +-
 java/org/apache/catalina/webresources/LocalStrings.properties   | 2 +-
 java/org/apache/coyote/LocalStrings.properties  | 2 +-
 java/org/apache/coyote/ajp/LocalStrings.properties  | 2 +-
 java/org/apache/coyote/http11/LocalStrings.properties   | 2 +-
 java/org/apache/coyote/http11/filters/LocalStrings.properties   | 2 +-
 java/org/apache/coyote/http11/upgrade/LocalStrings.properties   | 2 +-
 java/org/apache/coyote/http2/LocalStrings.properties| 2 +-
 java/org/apache/el/LocalStrings.properties  | 2 +-
 java/org/apache/jasper/resources/LocalStrings.properties| 2 +-
 java/org/apache/naming/LocalStrings.properties  | 2 +-
 java/org/apache/naming/factory/LocalStrings.properties  | 2 +-
 java/org/apache/naming/factory/webservices/LocalStrings.properties  | 2 +-
 java/org/apache/naming/factory/webservices/LocalStrings_de.properties   | 2 +-
 java/org/apache/naming/factory/webservices/LocalStrings_fr.properties   | 2 +-
 java/org/apache/naming/factory/webservices

(tomcat) branch 9.0.x updated: Make WebdavServlet properly return the Allow header on NOT_ALLOWED status

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 76fb7ec803 Make WebdavServlet properly return the Allow header on 
NOT_ALLOWED status
76fb7ec803 is described below

commit 76fb7ec8036f96e7b4c14720809d96d63a361036
Author: Michael Osipov 
AuthorDate: Wed Oct 2 13:48:45 2024 +0200

Make WebdavServlet properly return the Allow header on NOT_ALLOWED status
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 webapps/docs/changelog.xml   | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index e8cb718295..daee33e435 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1692,7 +1692,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
+sendNotAllowed(req, resp);
 return false;
 }
 } else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 997c6d04e0..2693dddee0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -147,6 +147,10 @@
 WebdavServlet and DefaultServlet.
 (michaelo)
   
+  
+Make WebdavServlet properly return the Allow
+header when deletion of a resource is not allowed. (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: Make WebdavServlet properly return the Allow header on NOT_ALLOWED status

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 0207a660c7 Make WebdavServlet properly return the Allow header on 
NOT_ALLOWED status
0207a660c7 is described below

commit 0207a660c76753f3fb2532da4b1c3c6ca940fb35
Author: Michael Osipov 
AuthorDate: Wed Oct 2 13:48:45 2024 +0200

Make WebdavServlet properly return the Allow header on NOT_ALLOWED status
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 webapps/docs/changelog.xml   | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 0ea34b4f34..2858219324 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1693,7 +1693,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
+sendNotAllowed(req, resp);
 return false;
 }
 } else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0478f1068b..6de47811ab 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -152,6 +152,10 @@
 WebdavServlet and DefaultServlet.
 (michaelo)
   
+  
+Make WebdavServlet properly return the Allow
+header when deletion of a resource is not allowed. (michaelo)
+  
 
   
   


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



(tomcat) branch 11.0.x updated: Make WebdavServlet properly return the Allow header on NOT_ALLOWED status

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 33d26b4036 Make WebdavServlet properly return the Allow header on 
NOT_ALLOWED status
33d26b4036 is described below

commit 33d26b403669541c9ef4ca3e568387f33412bae4
Author: Michael Osipov 
AuthorDate: Wed Oct 2 13:48:45 2024 +0200

Make WebdavServlet properly return the Allow header on NOT_ALLOWED status
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 webapps/docs/changelog.xml   | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 0ea34b4f34..2858219324 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1693,7 +1693,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
+sendNotAllowed(req, resp);
 return false;
 }
 } else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 51d0bf6233..7b00539192 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -152,6 +152,10 @@
 WebdavServlet and DefaultServlet.
 (michaelo)
   
+  
+Make WebdavServlet properly return the Allow
+header when deletion of a resource is not allowed. (michaelo)
+  
 
   
   


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



(tomcat) branch main updated: Make WebdavServlet properly return the Allow header on NOT_ALLOWED status

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 b03fde0383 Make WebdavServlet properly return the Allow header on 
NOT_ALLOWED status
b03fde0383 is described below

commit b03fde03837da631c69226d19d67b751f5b05919
Author: Michael Osipov 
AuthorDate: Wed Oct 2 13:48:45 2024 +0200

Make WebdavServlet properly return the Allow header on NOT_ALLOWED status
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 webapps/docs/changelog.xml   | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index a392d729d5..455727ef63 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1695,7 +1695,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
+sendNotAllowed(req, resp);
 return false;
 }
 } else {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f4eb84d1b4..0ce26bd380 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,10 @@
 WebdavServlet and DefaultServlet.
 (michaelo)
   
+  
+Make WebdavServlet properly return the Allow
+header when deletion of a resource is not allowed. (michaelo)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: Improve debug log in DefaultServlet/WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new ab0cd03763 Improve debug log in DefaultServlet/WebdavServlet
ab0cd03763 is described below

commit ab0cd03763be2b74cd6c6d8a083c8b02325cce2f
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:41:58 2024 +0200

Improve debug log in DefaultServlet/WebdavServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 java/org/apache/catalina/servlets/WebdavServlet.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 007c1ad45d..18842f5156 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -2550,7 +2550,7 @@ public class DefaultServlet extends HttpServlet {
 protected IOException copyRange(InputStream istream, ServletOutputStream 
ostream, long start, long end) {
 
 if (debug > 10) {
-log("Serving bytes:" + start + "-" + end);
+log("Serving bytes: " + start + "-" + end);
 }
 
 long skipped = 0;
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index aa35636bff..4e4e7b60fa 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1465,7 +1465,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 destinationPath = destinationPath.substring(reqContextPath.length() + 
req.getServletPath().length());
 
 if (debug > 0) {
-log("Dest path :" + destinationPath);
+log("Dest path: " + destinationPath);
 }
 
 // Check destination path to protect special subdirectories
@@ -1727,7 +1727,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 private void deleteCollection(HttpServletRequest req, String path, 
Map errorList) {
 
 if (debug > 1) {
-log("Delete:" + path);
+log("Delete collection: " + path);
 }
 
 // Prevent deletion of special subdirectories


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



(tomcat) branch 10.1.x updated: Improve debug log in DefaultServlet/WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 02dd078f1c Improve debug log in DefaultServlet/WebdavServlet
02dd078f1c is described below

commit 02dd078f1cd464d8ee09d9c4080011993f035a87
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:41:58 2024 +0200

Improve debug log in DefaultServlet/WebdavServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 java/org/apache/catalina/servlets/WebdavServlet.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index f79af4d192..374d859752 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -2494,7 +2494,7 @@ public class DefaultServlet extends HttpServlet {
 protected IOException copyRange(InputStream istream, ServletOutputStream 
ostream, long start, long end) {
 
 if (debug > 10) {
-log("Serving bytes:" + start + "-" + end);
+log("Serving bytes: " + start + "-" + end);
 }
 
 long skipped = 0;
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7c871b2317..f94edebaa0 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1466,7 +1466,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 destinationPath = destinationPath.substring(reqContextPath.length() + 
req.getServletPath().length());
 
 if (debug > 0) {
-log("Dest path :" + destinationPath);
+log("Dest path: " + destinationPath);
 }
 
 // Check destination path to protect special subdirectories
@@ -1728,7 +1728,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 private void deleteCollection(HttpServletRequest req, String path, 
Map errorList) {
 
 if (debug > 1) {
-log("Delete:" + path);
+log("Delete collection: " + path);
 }
 
 // Prevent deletion of special subdirectories


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



(tomcat) branch 11.0.x updated: Improve debug log in DefaultServlet/WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 1ecf6870a5 Improve debug log in DefaultServlet/WebdavServlet
1ecf6870a5 is described below

commit 1ecf6870a5ba5c8007c389197026453470e7fb27
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:41:58 2024 +0200

Improve debug log in DefaultServlet/WebdavServlet
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 java/org/apache/catalina/servlets/WebdavServlet.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3eea121c96..f95b821f62 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -2435,7 +2435,7 @@ public class DefaultServlet extends HttpServlet {
 protected IOException copyRange(InputStream istream, ServletOutputStream 
ostream, long start, long end) {
 
 if (debug > 10) {
-log("Serving bytes:" + start + "-" + end);
+log("Serving bytes: " + start + "-" + end);
 }
 
 long skipped = 0;
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7c871b2317..f94edebaa0 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1466,7 +1466,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 destinationPath = destinationPath.substring(reqContextPath.length() + 
req.getServletPath().length());
 
 if (debug > 0) {
-log("Dest path :" + destinationPath);
+log("Dest path: " + destinationPath);
 }
 
 // Check destination path to protect special subdirectories
@@ -1728,7 +1728,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 private void deleteCollection(HttpServletRequest req, String path, 
Map errorList) {
 
 if (debug > 1) {
-log("Delete:" + path);
+log("Delete collection: " + path);
 }
 
 // Prevent deletion of special subdirectories


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



(tomcat) branch main updated (142c45a427 -> 6dfefeefbe)

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


from 142c45a427 BZ 69360: Inconsistent DELETE behavior between 
DefaultServlet and WebdavServlet
 add 6dfefeefbe Improve debug log in DefaultServlet/WebdavServlet

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 java/org/apache/catalina/servlets/WebdavServlet.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


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



(tomcat) branch 9.0.x updated: BZ 69360: Inconsistent DELETE behavior between DefaultServlet and WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new bb5bf0ac7a BZ 69360: Inconsistent DELETE behavior between 
DefaultServlet and WebdavServlet
bb5bf0ac7a is described below

commit bb5bf0ac7a62148efb2d67d647c1f2be1addd755
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:04:44 2024 +0200

BZ 69360: Inconsistent DELETE behavior between DefaultServlet and 
WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++---
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 35221a30c7..aa35636bff 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1693,7 +1693,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
+resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
 return false;
 }
 } else {
@@ -1702,7 +1702,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 deleteCollection(req, path, errorList);
 if (!resource.delete()) {
-errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 
 if (!errorList.isEmpty()) {
@@ -1769,7 +1769,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 if (!childResource.isDirectory()) {
 // If it's not a collection, then it's an unknown
 // error
-errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 25726400ef..997c6d04e0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,11 @@
 getRelativePath() method from super class with
 incorrect Javadoc. (michaelo)
   
+  
+69360: Inconsistent DELETE behavior between
+WebdavServlet and DefaultServlet.
+    (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: BZ 69360: Inconsistent DELETE behavior between DefaultServlet and WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 75b291f08e BZ 69360: Inconsistent DELETE behavior between 
DefaultServlet and WebdavServlet
75b291f08e is described below

commit 75b291f08e9e9d2b6c5c5c9a6b42172049e94146
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:04:44 2024 +0200

BZ 69360: Inconsistent DELETE behavior between DefaultServlet and 
WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++---
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7845f37ec4..7c871b2317 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1694,7 +1694,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
+resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
 return false;
 }
 } else {
@@ -1703,7 +1703,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 deleteCollection(req, path, errorList);
 if (!resource.delete()) {
-errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 
 if (!errorList.isEmpty()) {
@@ -1770,7 +1770,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 if (!childResource.isDirectory()) {
 // If it's not a collection, then it's an unknown
 // error
-errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e2df458303..0478f1068b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -147,6 +147,11 @@
 getRelativePath() method from super class with
 incorrect Javadoc. (michaelo)
   
+  
+69360: Inconsistent DELETE behavior between
+WebdavServlet and DefaultServlet.
+    (michaelo)
+  
 
   
   


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



(tomcat) branch 11.0.x updated: BZ 69360: Inconsistent DELETE behavior between DefaultServlet and WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new d975c2b0f1 BZ 69360: Inconsistent DELETE behavior between 
DefaultServlet and WebdavServlet
d975c2b0f1 is described below

commit d975c2b0f1e17e4756933037f7dd834f82254a13
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:04:44 2024 +0200

BZ 69360: Inconsistent DELETE behavior between DefaultServlet and 
WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++---
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 7845f37ec4..7c871b2317 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1694,7 +1694,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
+resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
 return false;
 }
 } else {
@@ -1703,7 +1703,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 deleteCollection(req, path, errorList);
 if (!resource.delete()) {
-errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 
 if (!errorList.isEmpty()) {
@@ -1770,7 +1770,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 if (!childResource.isDirectory()) {
 // If it's not a collection, then it's an unknown
 // error
-errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a9971af3e1..51d0bf6233 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -147,6 +147,11 @@
 getRelativePath() method from super class with
 incorrect Javadoc. (michaelo)
   
+  
+69360: Inconsistent DELETE behavior between
+WebdavServlet and DefaultServlet.
+    (michaelo)
+  
 
   
   


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



(tomcat) branch main updated: BZ 69360: Inconsistent DELETE behavior between DefaultServlet and WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 142c45a427 BZ 69360: Inconsistent DELETE behavior between 
DefaultServlet and WebdavServlet
142c45a427 is described below

commit 142c45a4271e1fd8d400196a883fb560ebded110
Author: Michael Osipov 
AuthorDate: Wed Oct 2 11:04:44 2024 +0200

BZ 69360: Inconsistent DELETE behavior between DefaultServlet and 
WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++---
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index d32868a9b3..c2cf8f3d78 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1696,7 +1696,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 if (!resource.isDirectory()) {
 if (!resource.delete()) {
-resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
+resp.sendError(WebdavStatus.SC_METHOD_NOT_ALLOWED);
 return false;
 }
 } else {
@@ -1705,7 +1705,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 
 deleteCollection(req, path, errorList);
 if (!resource.delete()) {
-errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(path, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 
 if (!errorList.isEmpty()) {
@@ -1772,7 +1772,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 if (!childResource.isDirectory()) {
 // If it's not a collection, then it's an unknown
 // error
-errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_INTERNAL_SERVER_ERROR));
+errorList.put(childName, 
Integer.valueOf(WebdavStatus.SC_METHOD_NOT_ALLOWED));
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ca652cd604..f4eb84d1b4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -128,6 +128,11 @@
 getRelativePath() method from super class with
 incorrect Javadoc. (michaelo)
   
+  
+69360: Inconsistent DELETE behavior between
+WebdavServlet and DefaultServlet.
+    (michaelo)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: BZ 69359: WebdavServlet duplicates getRelativePath() method from super class with incorrect Javadoc

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 7e68fa79dd BZ 69359: WebdavServlet duplicates getRelativePath() method 
from super class with incorrect Javadoc
7e68fa79dd is described below

commit 7e68fa79dde2090a7f69343ec3ee3c355ef463ad
Author: Michael Osipov 
AuthorDate: Wed Oct 2 10:18:36 2024 +0200

BZ 69359: WebdavServlet duplicates getRelativePath() method from super 
class with incorrect Javadoc
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 -
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 0dbd2be2d9..35221a30c7 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -407,11 +407,6 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
  *
  * @param request The servlet request we are processing
  */
-@Override
-protected String getRelativePath(HttpServletRequest request) {
-return getRelativePath(request, false);
-}
-
 @Override
 protected String getRelativePath(HttpServletRequest request, boolean 
allowEmptyPath) {
 String pathInfo;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4d9b158c2a..25726400ef 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -137,6 +137,11 @@
 Avoid store config backup loss when storing one configuration more than
 once per second. (remm)
   
+  
+69359: WebdavServlet duplicates
+getRelativePath() method from super class with
+incorrect Javadoc. (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: BZ 69359: WebdavServlet duplicates getRelativePath() method from super class with incorrect Javadoc

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 4d8e8d7969 BZ 69359: WebdavServlet duplicates getRelativePath() method 
from super class with incorrect Javadoc
4d8e8d7969 is described below

commit 4d8e8d7969caa77916761c9aac6bb33850666563
Author: Michael Osipov 
AuthorDate: Wed Oct 2 10:18:36 2024 +0200

BZ 69359: WebdavServlet duplicates getRelativePath() method from super 
class with incorrect Javadoc
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 -
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 09493fd879..7845f37ec4 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -408,11 +408,6 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
  *
  * @param request The servlet request we are processing
  */
-@Override
-protected String getRelativePath(HttpServletRequest request) {
-return getRelativePath(request, false);
-}
-
 @Override
 protected String getRelativePath(HttpServletRequest request, boolean 
allowEmptyPath) {
 String pathInfo;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cdec618a5d..e2df458303 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,11 @@
 Avoid store config backup loss when storing one configuration more than
 once per second. (remm)
   
+  
+69359: WebdavServlet duplicates
+getRelativePath() method from super class with
+incorrect Javadoc. (michaelo)
+  
 
   
   


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



(tomcat) branch 11.0.x updated: BZ 69359: WebdavServlet duplicates getRelativePath() method from super class with incorrect Javadoc

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new f476b10d9f BZ 69359: WebdavServlet duplicates getRelativePath() method 
from super class with incorrect Javadoc
f476b10d9f is described below

commit f476b10d9f128be2a9ff50e1dfacedb11773bbd7
Author: Michael Osipov 
AuthorDate: Wed Oct 2 10:18:36 2024 +0200

BZ 69359: WebdavServlet duplicates getRelativePath() method from super 
class with incorrect Javadoc
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 -
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 09493fd879..7845f37ec4 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -408,11 +408,6 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
  *
  * @param request The servlet request we are processing
  */
-@Override
-protected String getRelativePath(HttpServletRequest request) {
-return getRelativePath(request, false);
-}
-
 @Override
 protected String getRelativePath(HttpServletRequest request, boolean 
allowEmptyPath) {
 String pathInfo;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 574c237583..a9971af3e1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,11 @@
 Avoid store config backup loss when storing one configuration more than
 once per second. (remm)
   
+  
+69359: WebdavServlet duplicates
+getRelativePath() method from super class with
+incorrect Javadoc. (michaelo)
+  
 
   
   


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



(tomcat) branch main updated: BZ 69359: WebdavServlet duplicates getRelativePath() method from super class with incorrect Javadoc

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 2427059b2b BZ 69359: WebdavServlet duplicates getRelativePath() method 
from super class with incorrect Javadoc
2427059b2b is described below

commit 2427059b2bc9629f9d53198be3ce0f607ee1bdb6
Author: Michael Osipov 
AuthorDate: Wed Oct 2 10:18:36 2024 +0200

BZ 69359: WebdavServlet duplicates getRelativePath() method from super 
class with incorrect Javadoc
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 5 -
 webapps/docs/changelog.xml   | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index dfe0461c9f..d32868a9b3 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -410,11 +410,6 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
  *
  * @param request The servlet request we are processing
  */
-@Override
-protected String getRelativePath(HttpServletRequest request) {
-return getRelativePath(request, false);
-}
-
 @Override
 protected String getRelativePath(HttpServletRequest request, boolean 
allowEmptyPath) {
 String pathInfo;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b30a554613..ca652cd604 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,11 @@
 Remove default value (was catalina) for the
 secret init parameter of the WebDAV Servlet. (remm)
   
+  
+69359: WebdavServlet duplicates
+getRelativePath() method from super class with
+incorrect Javadoc. (michaelo)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: Consistently use HttpServletRequest#getContextPath() in WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 7764e121f2 Consistently use HttpServletRequest#getContextPath() in 
WebdavServlet
7764e121f2 is described below

commit 7764e121f2bc1bfeef08c1c014b5271fc4bb2b14
Author: Michael Osipov 
AuthorDate: Wed Oct 2 09:16:34 2024 +0200

Consistently use HttpServletRequest#getContextPath() in WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index cd9d6a24d7..0dbd2be2d9 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1808,7 +1808,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
 generatedXML.writeElement("D", "href", XMLWriter.OPENING);
-generatedXML.writeText(getServletContext().getContextPath() + 
errorPath);
+generatedXML.writeText(req.getContextPath() + errorPath);
 generatedXML.writeElement("D", "href", XMLWriter.CLOSING);
 
 generatedXML.writeElement("D", "status", XMLWriter.OPENING);


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



(tomcat) branch 10.1.x updated: Consistently use HttpServletRequest#getContextPath() in WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 6fa72e264c Consistently use HttpServletRequest#getContextPath() in 
WebdavServlet
6fa72e264c is described below

commit 6fa72e264c87280c2309f1f2fc61e1ea73fd208b
Author: Michael Osipov 
AuthorDate: Wed Oct 2 09:16:34 2024 +0200

Consistently use HttpServletRequest#getContextPath() in WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index f3280fde49..09493fd879 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1809,7 +1809,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
 generatedXML.writeElement("D", "href", XMLWriter.OPENING);
-generatedXML.writeText(getServletContext().getContextPath() + 
errorPath);
+generatedXML.writeText(req.getContextPath() + errorPath);
 generatedXML.writeElement("D", "href", XMLWriter.CLOSING);
 
 generatedXML.writeElement("D", "status", XMLWriter.OPENING);


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



(tomcat) branch 11.0.x updated: Consistently use HttpServletRequest#getContextPath() in WebdavServlet

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
 new 34c1e9dde8 Consistently use HttpServletRequest#getContextPath() in 
WebdavServlet
34c1e9dde8 is described below

commit 34c1e9dde87458db2633607a2c00b2d2e929acdf
Author: Michael Osipov 
AuthorDate: Wed Oct 2 09:16:34 2024 +0200

Consistently use HttpServletRequest#getContextPath() in WebdavServlet
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index f3280fde49..09493fd879 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1809,7 +1809,7 @@ public class WebdavServlet extends DefaultServlet 
implements PeriodicEventListen
 generatedXML.writeElement("D", "response", XMLWriter.OPENING);
 
 generatedXML.writeElement("D", "href", XMLWriter.OPENING);
-generatedXML.writeText(getServletContext().getContextPath() + 
errorPath);
+generatedXML.writeText(req.getContextPath() + errorPath);
 generatedXML.writeElement("D", "href", XMLWriter.CLOSING);
 
 generatedXML.writeElement("D", "status", XMLWriter.OPENING);


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



(tomcat) branch main updated (63edfb3ec4 -> c50b8aa258)

2024-10-02 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


from 63edfb3ec4 Split Stream.recycle() into replace() and recycle()
 add c50b8aa258 Consistently use HttpServletRequest#getContextPath() in 
WebdavServlet

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/servlets/WebdavServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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



(tomcat) branch 9.0.x updated: Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

2024-06-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 9cace36b99 Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
9cace36b99 is described below

commit 9cace36b9917d978cc6760ed41d81bb1bb95d17f
Author: Michael Osipov 
AuthorDate: Tue Jun 11 11:11:29 2024 +0200

Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

A realm might want to access extended/additional information from an
established GSS context to properly build an authenticated princpal.
One prominent example is 
com.sun.security.jgss.ExtendedGSSContext.inquireSecContext(InquireType).
---
 java/org/apache/catalina/realm/RealmBase.java | 16 +++-
 webapps/docs/changelog.xml|  5 +
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 45082831ab..471bc6e896 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -492,7 +492,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 }
 }
 
-return getPrincipal(gssName, gssCredential);
+return getPrincipal(gssName, gssCredential, gssContext);
 }
 } else {
 log.error(sm.getString("realmBase.gssContextNotEstablished"));
@@ -1247,6 +1247,20 @@ public abstract class RealmBase extends 
LifecycleMBeanBase implements Realm {
 }
 
 
+/**
+ * Get the principal associated with the specified {@link GSSName}.
+ *
+ * @param gssName   The GSS name
+ * @param gssCredential the GSS credential of the principal
+ * @param gssContext the established GSS context
+ *
+ * @return the principal associated with the given user name.
+ */
+protected Principal getPrincipal(GSSName gssName, GSSCredential 
gssCredential, GSSContext gssContext) {
+return getPrincipal(gssName, gssCredential);
+}
+
+
 /**
  * Get the principal associated with the specified {@link GSSName}.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 27569bd081..611c596507 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -130,6 +130,11 @@
 attribute, thus causing facade objects to be discarded by default.
 (remm)
   
+  
+Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
+for retrieving extended/additional information from an established
+GSS context. (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

2024-06-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 2f0187e02b Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
2f0187e02b is described below

commit 2f0187e02b571c67e7d124bd21fb28e02721c98c
Author: Michael Osipov 
AuthorDate: Tue Jun 11 11:11:29 2024 +0200

Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

A realm might want to access extended/additional information from an
established GSS context to properly build an authenticated princpal.
One prominent example is 
com.sun.security.jgss.ExtendedGSSContext.inquireSecContext(InquireType).
---
 java/org/apache/catalina/realm/RealmBase.java | 16 +++-
 webapps/docs/changelog.xml|  5 +
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 438b7296df..0021696b50 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -492,7 +492,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 }
 }
 
-return getPrincipal(gssName, gssCredential);
+return getPrincipal(gssName, gssCredential, gssContext);
 }
 } else {
 log.error(sm.getString("realmBase.gssContextNotEstablished"));
@@ -1225,6 +1225,20 @@ public abstract class RealmBase extends 
LifecycleMBeanBase implements Realm {
 protected abstract Principal getPrincipal(String username);
 
 
+/**
+ * Get the principal associated with the specified {@link GSSName}.
+ *
+ * @param gssName   The GSS name
+ * @param gssCredential the GSS credential of the principal
+ * @param gssContext the established GSS context
+ *
+ * @return the principal associated with the given user name.
+ */
+protected Principal getPrincipal(GSSName gssName, GSSCredential 
gssCredential, GSSContext gssContext) {
+return getPrincipal(gssName, gssCredential);
+}
+
+
 /**
  * Get the principal associated with the specified {@link GSSName}.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 390870161c..3e238ff8b4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,11 @@
 69066: Fix regression in SPNEGO authenticator when
 processing Base64. Submitted by Daniel Lyko. (remm)
   
+  
+Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
+for retrieving extended/additional information from an established
+GSS context. (michaelo)
+  
 
   
   


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



(tomcat) branch main updated: Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

2024-06-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 956c4577ca Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
956c4577ca is described below

commit 956c4577caedca7d77c5eb996a83ebafdf80b889
Author: Michael Osipov 
AuthorDate: Tue Jun 11 11:11:29 2024 +0200

Add RealmBase.getPrincipal(GSSName, GSSCredential, GSSContext)

A realm might want to access extended/additional information from an
established GSS context to properly build an authenticated princpal.
One prominent example is 
com.sun.security.jgss.ExtendedGSSContext.inquireSecContext(InquireType).
---
 java/org/apache/catalina/realm/RealmBase.java | 16 +++-
 webapps/docs/changelog.xml|  5 +
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index c0aaa49068..c441d51ecf 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -484,7 +484,7 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 }
 }
 
-return getPrincipal(gssName, gssCredential);
+return getPrincipal(gssName, gssCredential, gssContext);
 }
 } else {
 log.error(sm.getString("realmBase.gssContextNotEstablished"));
@@ -1201,6 +1201,20 @@ public abstract class RealmBase extends 
LifecycleMBeanBase implements Realm {
 protected abstract Principal getPrincipal(String username);
 
 
+/**
+ * Get the principal associated with the specified {@link GSSName}.
+ *
+ * @param gssName   The GSS name
+ * @param gssCredential the GSS credential of the principal
+ * @param gssContext the established GSS context
+ *
+ * @return the principal associated with the given user name.
+ */
+protected Principal getPrincipal(GSSName gssName, GSSCredential 
gssCredential, GSSContext gssContext) {
+return getPrincipal(gssName, gssCredential);
+}
+
+
 /**
  * Get the principal associated with the specified {@link GSSName}.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cd704f988c..1273c41722 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,11 @@
 69066: Fix regression in SPNEGO authenticator when
 processing Base64. Submitted by Daniel Lyko. (remm)
   
+  
+Add RealmBase.getPrincipal(GSSName, GSSCredential, 
GSSContext)
+for retrieving extended/additional information from an established
+GSS context. (michaelo)
+  
 
   
   


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



(tomcat-native) branch 1.3.x updated: Fix a crash on Windows in SSLContext.setCACertificate()

2024-05-16 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.3.x by this push:
 new e77dcb05d Fix a crash on Windows in SSLContext.setCACertificate()
e77dcb05d is described below

commit e77dcb05d395e7dec6ed071a332af0e7287e0c35
Author: Michael Osipov 
AuthorDate: Thu May 16 17:48:26 2024 +0200

Fix a crash on Windows in SSLContext.setCACertificate()
---
 native/src/sslcontext.c   | 2 +-
 xdocs/miscellaneous/changelog.xml | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index e3d67131d..76662cc09 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -709,7 +709,7 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCACertificate)(TCN_STDARGS,
 SSL_CTX_set_client_CA_list(c->ctx, ca_certs);
 }
 else {
-if (!SSL_add_file_cert_subjects_to_stack(ca_certs, J2S(file)))
+if (file != NULL && !SSL_add_file_cert_subjects_to_stack(ca_certs, 
J2S(file)))
 ca_certs = NULL;
 }
 if (ca_certs == NULL && c->verify_mode == SSL_CVERIFY_REQUIRE) {
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 027f715f7..d88705ed6 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -33,6 +33,13 @@
 
 
   
+
+  Fix a crash on Windows when SSLContext.setCACertificate()
+  is invoked with a null value for 
caCertificateFile
+  and a non-null value for caCertificatePath
+  until properly addressed with
+  https://github.com/openssl/openssl/issues/24416. (michaelo)
+
   
 
 


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



(tomcat-native) branch main updated: Fix a crash on Windows in SSLContext.setCACertificate()

2024-05-16 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 745455f12 Fix a crash on Windows in SSLContext.setCACertificate()
745455f12 is described below

commit 745455f127e3181c75f694d5821eead9d5ab4c00
Author: Michael Osipov 
AuthorDate: Thu May 16 17:48:26 2024 +0200

Fix a crash on Windows in SSLContext.setCACertificate()
---
 native/src/sslcontext.c   | 2 +-
 xdocs/miscellaneous/changelog.xml | 7 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 9fbe7a19b..72feb4324 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -708,7 +708,7 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCACertificate)(TCN_STDARGS,
 SSL_CTX_set_client_CA_list(c->ctx, ca_certs);
 }
 else {
-if (!SSL_add_file_cert_subjects_to_stack(ca_certs, J2S(file)))
+if (file != NULL && !SSL_add_file_cert_subjects_to_stack(ca_certs, 
J2S(file)))
 ca_certs = NULL;
 }
 if (ca_certs == NULL && c->verify_mode == SSL_CVERIFY_REQUIRE) {
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 5d16781b6..5ee7eacf0 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -33,6 +33,13 @@
 
 
   
+
+  Fix a crash on Windows when SSLContext.setCACertificate()
+  is invoked with a null value for 
caCertificateFile
+  and a non-null value for caCertificatePath
+  until properly addressed with
+  https://github.com/openssl/openssl/issues/24416. (michaelo)
+
   
 
 


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



(tomcat-native) branch 1.3.x updated: Add missing newlines to printf statements

2024-05-16 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.3.x by this push:
 new 6ddbab7fe Add missing newlines to printf statements
6ddbab7fe is described below

commit 6ddbab7fe4ac9e5c82ec26c5a2ba66ead8b405bd
Author: Michael Osipov 
AuthorDate: Thu May 16 16:35:38 2024 +0200

Add missing newlines to printf statements
---
 native/src/sslcontext.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 660aed768..e3d67131d 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -721,13 +721,13 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCACertificate)(TCN_STDARGS,
 BIO_printf(c->bio_os,
 "[WARN] Oops, you want to request client "
 "authentication, but no CAs are known for "
-"verification!?");
+"verification!?\n");
 }
 else {
 fprintf(stderr,
 "[WARN] Oops, you want to request client "
 "authentication, but no CAs are known for "
-"verification!?");
+"verification!?\n");
 }
 
 }
@@ -1680,10 +1680,10 @@ TCN_IMPLEMENT_CALL(void, SSLContext, 
setSessionTicketKeys)(TCN_STDARGS, jlong ct
 
 if ((*e)->GetArrayLength(e, keys) != TICKET_KEYS_SIZE) {
 if (c->bio_os) {
-BIO_printf(c->bio_os, "[ERROR] Session ticket keys provided were 
wrong size.");
+BIO_printf(c->bio_os, "[ERROR] Session ticket keys provided were 
wrong size.\n");
 }
 else {
-fprintf(stderr, "[ERROR] Session ticket keys provided were wrong 
size.");
+fprintf(stderr, "[ERROR] Session ticket keys provided were wrong 
size.\n");
 }
 exit(1);
 }


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



(tomcat-native) branch main updated: Add missing newlines to printf statements

2024-05-16 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 6a6a6b239 Add missing newlines to printf statements
6a6a6b239 is described below

commit 6a6a6b2395036c6a6cabb2b8af22aa329e438436
Author: Michael Osipov 
AuthorDate: Thu May 16 16:35:38 2024 +0200

Add missing newlines to printf statements
---
 native/src/sslcontext.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index a7951f53f..9fbe7a19b 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -720,13 +720,13 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCACertificate)(TCN_STDARGS,
 BIO_printf(c->bio_os,
 "[WARN] Oops, you want to request client "
 "authentication, but no CAs are known for "
-"verification!?");
+"verification!?\n");
 }
 else {
 fprintf(stderr,
 "[WARN] Oops, you want to request client "
 "authentication, but no CAs are known for "
-"verification!?");
+"verification!?\n");
 }
 
 }
@@ -1679,10 +1679,10 @@ TCN_IMPLEMENT_CALL(void, SSLContext, 
setSessionTicketKeys)(TCN_STDARGS, jlong ct
 
 if ((*e)->GetArrayLength(e, keys) != TICKET_KEYS_SIZE) {
 if (c->bio_os) {
-BIO_printf(c->bio_os, "[ERROR] Session ticket keys provided were 
wrong size.");
+BIO_printf(c->bio_os, "[ERROR] Session ticket keys provided were 
wrong size.\n");
 }
 else {
-fprintf(stderr, "[ERROR] Session ticket keys provided were wrong 
size.");
+fprintf(stderr, "[ERROR] Session ticket keys provided were wrong 
size.\n");
 }
 exit(1);
 }


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



(tomcat-native) branch 1.3.x updated: Fix comment

2024-04-17 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.3.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.3.x by this push:
 new 5998cbf84 Fix comment
5998cbf84 is described below

commit 5998cbf8484e0b65dbb4a1fc17a5da9f5190b8b1
Author: Michael Osipov 
AuthorDate: Thu Apr 18 08:24:42 2024 +0200

Fix comment
---
 native/src/ssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/native/src/ssl.c b/native/src/ssl.c
index 56304ee29..5ca7c0781 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -653,7 +653,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, fipsModeGet)(TCN_STDARGS)
 const char  *name;
 UNREFERENCED(o);
 
-// Maps the OpenSSL 3. x onwards behaviour to theOpenSSL 1.x API
+// Maps the OpenSSL 3.x onwards behaviour to the OpenSSL 1.x API
 
 // Checks that FIPS is the default provider
 md = EVP_MD_fetch(NULL, "SHA-512", NULL);


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



(tomcat-native) branch main updated: Fix comment

2024-04-17 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 43ddd1e80 Fix comment
43ddd1e80 is described below

commit 43ddd1e8059528454110198ca0d7d191322beeaf
Author: Michael Osipov 
AuthorDate: Thu Apr 18 08:24:42 2024 +0200

Fix comment
---
 native/src/ssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/native/src/ssl.c b/native/src/ssl.c
index 7f4ca7e78..7624a4e67 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -405,7 +405,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, fipsModeGet)(TCN_STDARGS)
 const char  *name;
 UNREFERENCED(o);
 
-// Maps the OpenSSL 3. x onwards behaviour to theOpenSSL 1.x API
+// Maps the OpenSSL 3.x onwards behaviour to the OpenSSL 1.x API
 
 // Checks that FIPS is the default provider
 md = EVP_MD_fetch(NULL, "SHA-512", NULL);


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



(tomcat-native) branch main updated: Fix APR version check in M4 macro

2024-04-17 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 49d1a3a5b Fix APR version check in M4 macro
49d1a3a5b is described below

commit 49d1a3a5baf3bd50a3d4761ceb96d3efa9c05159
Author: Michael Osipov 
AuthorDate: Thu Apr 18 08:20:08 2024 +0200

Fix APR version check in M4 macro
---
 native/build/tcnative.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/native/build/tcnative.m4 b/native/build/tcnative.m4
index 272eac47f..11789e5b5 100644
--- a/native/build/tcnative.m4
+++ b/native/build/tcnative.m4
@@ -38,9 +38,9 @@ AC_DEFUN([TCN_FIND_APR],[
   set $sapr_version
   IFS=$tc_save_IFS
   decimal_apr_version=`printf %02d%02d%03d ${1} ${2} ${3}`
-  if test "${decimal_apr_version}" -lt "0104003"
+  if test "${decimal_apr_version}" -lt "0107000"
   then
-AC_MSG_ERROR(Found APR $sapr_version. You need version 1.4.3 or newer 
installed.)
+AC_MSG_ERROR(Found APR $sapr_version. You need version 1.7.0 or newer 
installed.)
   fi
   AC_MSG_NOTICE(APR $sapr_version detected.)
 


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



(tomcat) branch 8.5.x updated: BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs

2023-10-31 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 40a1d14fd4 BZ 67926: PEMFile prints unidentifiable string 
representation of ASN.1 OIDs
40a1d14fd4 is described below

commit 40a1d14fd4717505f756f08d5b76abaf55b7778c
Author: Michael Osipov 
AuthorDate: Mon Oct 30 11:43:36 2023 +0100

BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs
---
 java/org/apache/tomcat/util/net/jsse/PEMFile.java | 20 
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java 
b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
index a136bef6a6..2499beda79 100644
--- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java
+++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
@@ -56,6 +56,8 @@ import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.file.ConfigFileLoader;
 import org.apache.tomcat.util.res.StringManager;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
 
 /**
  * RFC 1421 PEM file containing X509 certificates or private keys.
@@ -373,7 +375,7 @@ public class PEMFile {
  */
 if (!Arrays.equals(oidEncryptionAlgorithm, OID_PBES2)) {
 throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPkcs8Algorithm",
-HexUtils.toHexString(oidEncryptionAlgorithm)));
+toDottedOidString(oidEncryptionAlgorithm)));
 }
 
 // PBES2-params
@@ -386,7 +388,7 @@ public class PEMFile {
 byte[] oidKDF = p.parseOIDAsBytes();
 if (!Arrays.equals(oidKDF, OID_PBKDF2)) {
 throw new NoSuchAlgorithmException(
-sm.getString("pemFile.notPbkdf2", 
HexUtils.toHexString(oidKDF)));
+sm.getString("pemFile.notPbkdf2", 
toDottedOidString(oidKDF)));
 }
 
 // PBES2 KDF-params
@@ -404,7 +406,7 @@ public class PEMFile {
 byte[] oidPRF = p.parseOIDAsBytes();
 String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF));
 if (prf == null) {
-throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
HexUtils.toHexString(oidPRF)));
+throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
toDottedOidString(oidPRF)));
 }
 p.parseNull();
 
@@ -415,7 +417,7 @@ public class PEMFile {
 Algorithm algorithm = 
OID_TO_ALGORITHM.get(HexUtils.toHexString(oidCipher));
 if (algorithm == null) {
 throw new NoSuchAlgorithmException(
-
sm.getString("pemFile.unknownEncryptionAlgorithm", 
HexUtils.toHexString(oidCipher)));
+
sm.getString("pemFile.unknownEncryptionAlgorithm", 
toDottedOidString(oidCipher)));
 }
 
 byte[] iv = p.parseOctetString();
@@ -622,6 +624,16 @@ public class PEMFile {
 }
 return bytes;
 }
+
+
+private String toDottedOidString(byte[] oidBytes) {
+try {
+Oid oid = new Oid(oidBytes);
+return oid.toString();
+} catch (GSSException e) {
+return HexUtils.toHexString(oidBytes);
+}
+}
 }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 72ea1e0402..2340769f7a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 Optionally allow ServiceBindingPropertySource to trim a trailing 
newline
 from a file containing a property-value. (schultz)
   
+  
+67926: PEMFile prints unidentifiable string 
representation
+ of ASN.1 OIDs. (michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs

2023-10-31 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 60b68d8f2a BZ 67926: PEMFile prints unidentifiable string 
representation of ASN.1 OIDs
60b68d8f2a is described below

commit 60b68d8f2a84e10e275fa8d7b83d1a2da99e35c2
Author: Michael Osipov 
AuthorDate: Mon Oct 30 11:43:36 2023 +0100

BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs
---
 java/org/apache/tomcat/util/net/jsse/PEMFile.java | 20 
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java 
b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
index b3f60ce0db..5bef5b6f24 100644
--- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java
+++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
@@ -56,6 +56,8 @@ import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.file.ConfigFileLoader;
 import org.apache.tomcat.util.res.StringManager;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
 
 /**
  * RFC 1421 PEM file containing X509 certificates or private keys.
@@ -375,7 +377,7 @@ public class PEMFile {
  */
 if (!Arrays.equals(oidEncryptionAlgorithm, OID_PBES2)) {
 throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPkcs8Algorithm",
-HexUtils.toHexString(oidEncryptionAlgorithm)));
+toDottedOidString(oidEncryptionAlgorithm)));
 }
 
 // PBES2-params
@@ -388,7 +390,7 @@ public class PEMFile {
 byte[] oidKDF = p.parseOIDAsBytes();
 if (!Arrays.equals(oidKDF, OID_PBKDF2)) {
 throw new NoSuchAlgorithmException(
-sm.getString("pemFile.notPbkdf2", 
HexUtils.toHexString(oidKDF)));
+sm.getString("pemFile.notPbkdf2", 
toDottedOidString(oidKDF)));
 }
 
 // PBES2 KDF-params
@@ -406,7 +408,7 @@ public class PEMFile {
 byte[] oidPRF = p.parseOIDAsBytes();
 String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF));
 if (prf == null) {
-throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
HexUtils.toHexString(oidPRF)));
+throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
toDottedOidString(oidPRF)));
 }
 p.parseNull();
 
@@ -417,7 +419,7 @@ public class PEMFile {
 Algorithm algorithm = 
OID_TO_ALGORITHM.get(HexUtils.toHexString(oidCipher));
 if (algorithm == null) {
 throw new NoSuchAlgorithmException(
-
sm.getString("pemFile.unknownEncryptionAlgorithm", 
HexUtils.toHexString(oidCipher)));
+
sm.getString("pemFile.unknownEncryptionAlgorithm", 
toDottedOidString(oidCipher)));
 }
 
 byte[] iv = p.parseOctetString();
@@ -624,6 +626,16 @@ public class PEMFile {
 }
 return bytes;
 }
+
+
+private String toDottedOidString(byte[] oidBytes) {
+try {
+Oid oid = new Oid(oidBytes);
+return oid.toString();
+} catch (GSSException e) {
+return HexUtils.toHexString(oidBytes);
+}
+}
 }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4301e1fa40..89f9ad68db 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 Optionally allow ServiceBindingPropertySource to trim a trailing 
newline
 from a file containing a property-value. (schultz)
   
+  
+67926: PEMFile prints unidentifiable string 
representation
+ of ASN.1 OIDs. (michaelo)
+  
 
   
   


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



(tomcat) branch 9.0.x updated: BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs

2023-10-31 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 96688ea1ff BZ 67926: PEMFile prints unidentifiable string 
representation of ASN.1 OIDs
96688ea1ff is described below

commit 96688ea1ff1b622653dd9cc1c7cbe1a04ad5d81b
Author: Michael Osipov 
AuthorDate: Mon Oct 30 11:43:36 2023 +0100

BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs
---
 java/org/apache/tomcat/util/net/jsse/PEMFile.java | 20 
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java 
b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
index b3f60ce0db..5bef5b6f24 100644
--- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java
+++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
@@ -56,6 +56,8 @@ import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.file.ConfigFileLoader;
 import org.apache.tomcat.util.res.StringManager;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
 
 /**
  * RFC 1421 PEM file containing X509 certificates or private keys.
@@ -375,7 +377,7 @@ public class PEMFile {
  */
 if (!Arrays.equals(oidEncryptionAlgorithm, OID_PBES2)) {
 throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPkcs8Algorithm",
-HexUtils.toHexString(oidEncryptionAlgorithm)));
+toDottedOidString(oidEncryptionAlgorithm)));
 }
 
 // PBES2-params
@@ -388,7 +390,7 @@ public class PEMFile {
 byte[] oidKDF = p.parseOIDAsBytes();
 if (!Arrays.equals(oidKDF, OID_PBKDF2)) {
 throw new NoSuchAlgorithmException(
-sm.getString("pemFile.notPbkdf2", 
HexUtils.toHexString(oidKDF)));
+sm.getString("pemFile.notPbkdf2", 
toDottedOidString(oidKDF)));
 }
 
 // PBES2 KDF-params
@@ -406,7 +408,7 @@ public class PEMFile {
 byte[] oidPRF = p.parseOIDAsBytes();
 String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF));
 if (prf == null) {
-throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
HexUtils.toHexString(oidPRF)));
+throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
toDottedOidString(oidPRF)));
 }
 p.parseNull();
 
@@ -417,7 +419,7 @@ public class PEMFile {
 Algorithm algorithm = 
OID_TO_ALGORITHM.get(HexUtils.toHexString(oidCipher));
 if (algorithm == null) {
 throw new NoSuchAlgorithmException(
-
sm.getString("pemFile.unknownEncryptionAlgorithm", 
HexUtils.toHexString(oidCipher)));
+
sm.getString("pemFile.unknownEncryptionAlgorithm", 
toDottedOidString(oidCipher)));
 }
 
 byte[] iv = p.parseOctetString();
@@ -624,6 +626,16 @@ public class PEMFile {
 }
 return bytes;
 }
+
+
+private String toDottedOidString(byte[] oidBytes) {
+try {
+Oid oid = new Oid(oidBytes);
+return oid.toString();
+} catch (GSSException e) {
+return HexUtils.toHexString(oidBytes);
+}
+}
 }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b576cb62b7..9f96c43e8e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 Optionally allow ServiceBindingPropertySource to trim a trailing 
newline
 from a file containing a property-value. (schultz)
   
+  
+67926: PEMFile prints unidentifiable string 
representation
+ of ASN.1 OIDs. (michaelo)
+  
 
   
   


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



(tomcat) branch main updated: BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs

2023-10-31 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 3151ed38a6 BZ 67926: PEMFile prints unidentifiable string 
representation of ASN.1 OIDs
3151ed38a6 is described below

commit 3151ed38a65a77f0bb2ef9668bd19ceb5f31c48a
Author: Michael Osipov 
AuthorDate: Mon Oct 30 11:43:36 2023 +0100

BZ 67926: PEMFile prints unidentifiable string representation of ASN.1 OIDs
---
 java/org/apache/tomcat/util/net/jsse/PEMFile.java | 20 
 webapps/docs/changelog.xml|  4 
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/jsse/PEMFile.java 
b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
index b3f60ce0db..5bef5b6f24 100644
--- a/java/org/apache/tomcat/util/net/jsse/PEMFile.java
+++ b/java/org/apache/tomcat/util/net/jsse/PEMFile.java
@@ -56,6 +56,8 @@ import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.codec.binary.Base64;
 import org.apache.tomcat.util.file.ConfigFileLoader;
 import org.apache.tomcat.util.res.StringManager;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
 
 /**
  * RFC 1421 PEM file containing X509 certificates or private keys.
@@ -375,7 +377,7 @@ public class PEMFile {
  */
 if (!Arrays.equals(oidEncryptionAlgorithm, OID_PBES2)) {
 throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPkcs8Algorithm",
-HexUtils.toHexString(oidEncryptionAlgorithm)));
+toDottedOidString(oidEncryptionAlgorithm)));
 }
 
 // PBES2-params
@@ -388,7 +390,7 @@ public class PEMFile {
 byte[] oidKDF = p.parseOIDAsBytes();
 if (!Arrays.equals(oidKDF, OID_PBKDF2)) {
 throw new NoSuchAlgorithmException(
-sm.getString("pemFile.notPbkdf2", 
HexUtils.toHexString(oidKDF)));
+sm.getString("pemFile.notPbkdf2", 
toDottedOidString(oidKDF)));
 }
 
 // PBES2 KDF-params
@@ -406,7 +408,7 @@ public class PEMFile {
 byte[] oidPRF = p.parseOIDAsBytes();
 String prf = OID_TO_PRF.get(HexUtils.toHexString(oidPRF));
 if (prf == null) {
-throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
HexUtils.toHexString(oidPRF)));
+throw new 
NoSuchAlgorithmException(sm.getString("pemFile.unknownPrfAlgorithm", 
toDottedOidString(oidPRF)));
 }
 p.parseNull();
 
@@ -417,7 +419,7 @@ public class PEMFile {
 Algorithm algorithm = 
OID_TO_ALGORITHM.get(HexUtils.toHexString(oidCipher));
 if (algorithm == null) {
 throw new NoSuchAlgorithmException(
-
sm.getString("pemFile.unknownEncryptionAlgorithm", 
HexUtils.toHexString(oidCipher)));
+
sm.getString("pemFile.unknownEncryptionAlgorithm", 
toDottedOidString(oidCipher)));
 }
 
 byte[] iv = p.parseOctetString();
@@ -624,6 +626,16 @@ public class PEMFile {
 }
 return bytes;
 }
+
+
+private String toDottedOidString(byte[] oidBytes) {
+try {
+Oid oid = new Oid(oidBytes);
+return oid.toString();
+} catch (GSSException e) {
+return HexUtils.toHexString(oidBytes);
+}
+}
 }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 575b08f3dc..edac7d0e60 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,10 @@
 support a broader range of environments, and to give better information
 in the event of a failure. (schultz)
   
+  
+67926: PEMFile prints unidentifiable string 
representation
+ of ASN.1 OIDs. (michaelo)
+  
 
   
   


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



(tomcat-native) branch 1.2.x updated: BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently set undocumented default verify paths

2023-10-30 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 193c4e504 BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently 
set undocumented default verify paths
193c4e504 is described below

commit 193c4e504fc10f74737b062ddd1b34f54f38a268
Author: Michael Osipov 
AuthorDate: Wed Oct 18 22:22:06 2023 +0200

BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently set undocumented 
default verify paths
---
 native/src/ssl.c  | 11 ++-
 native/src/sslcontext.c   | 12 +++-
 xdocs/miscellaneous/changelog.xml |  4 
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/native/src/ssl.c b/native/src/ssl.c
index 31493e74f..ff716091f 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -1894,15 +1894,8 @@ TCN_IMPLEMENT_CALL(void, SSL, setVerify)(TCN_STDARGS, 
jlong ssl,
 if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
 (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
 verify |= SSL_VERIFY_PEER;
-if (!c->store) {
-if (SSL_CTX_set_default_verify_paths(c->ctx)) {
-c->store = SSL_CTX_get_cert_store(c->ctx);
-X509_STORE_set_flags(c->store, 0);
-}
-else {
-/* XXX: See if this is fatal */
-}
-}
+if (!c->store)
+c->store = SSL_CTX_get_cert_store(c->ctx);
 
 SSL_set_verify(ssl_, verify, SSL_callback_SSL_verify);
 }
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 646577e72..36cf11ed0 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -36,6 +36,7 @@ static apr_status_t ssl_context_cleanup(void *data)
 if (c) {
 int i;
 c->crl = NULL;
+c->store = NULL;
 if (c->ctx)
 SSL_CTX_free(c->ctx);
 c->ctx = NULL;
@@ -968,15 +969,8 @@ TCN_IMPLEMENT_CALL(void, SSLContext, 
setVerify)(TCN_STDARGS, jlong ctx,
 if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
 (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
 verify |= SSL_VERIFY_PEER;
-if (!c->store) {
-if (SSL_CTX_set_default_verify_paths(c->ctx)) {
-c->store = SSL_CTX_get_cert_store(c->ctx);
-X509_STORE_set_flags(c->store, 0);
-}
-else {
-/* XXX: See if this is fatal */
-}
-}
+if (!c->store)
+c->store = SSL_CTX_get_cert_store(c->ctx);
 
 SSL_CTX_set_verify(c->ctx, verify, SSL_callback_SSL_verify);
 }
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index a7462ec00..cac6e1b2d 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -44,6 +44,10 @@
 
   Remove an unreachable if condition around CRLs in sslcontext.c. 
(michaelo)
 
+
+  67818: 
SSL.setVerify()/SSLContext.setVerify()
+  silently set undocumented default verify paths. (michaelo)
+
   
 
 


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



(tomcat-native) branch main updated: BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently set undocumented default verify paths

2023-10-30 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new ccc6bfe99 BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently 
set undocumented default verify paths
ccc6bfe99 is described below

commit ccc6bfe99d1981aabde6a3175866f99d38207f03
Author: Michael Osipov 
AuthorDate: Wed Oct 18 22:22:06 2023 +0200

BZ 67818: SSL#setVerify()/SSLContext#setVerify() silently set undocumented 
default verify paths
---
 native/src/ssl.c  | 11 ++-
 native/src/sslcontext.c   | 12 +++-
 xdocs/miscellaneous/changelog.xml |  4 
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/native/src/ssl.c b/native/src/ssl.c
index e0b0461a9..7f4ca7e78 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -1177,15 +1177,8 @@ TCN_IMPLEMENT_CALL(void, SSL, setVerify)(TCN_STDARGS, 
jlong ssl,
 if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
 (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
 verify |= SSL_VERIFY_PEER;
-if (!c->store) {
-if (SSL_CTX_set_default_verify_paths(c->ctx)) {
-c->store = SSL_CTX_get_cert_store(c->ctx);
-X509_STORE_set_flags(c->store, 0);
-}
-else {
-/* XXX: See if this is fatal */
-}
-}
+if (!c->store)
+c->store = SSL_CTX_get_cert_store(c->ctx);
 
 SSL_set_verify(ssl_, verify, SSL_callback_SSL_verify);
 }
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 34669ff70..f5b2b9831 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -35,6 +35,7 @@ static apr_status_t ssl_context_cleanup(void *data)
 if (c) {
 int i;
 c->crl = NULL;
+c->store = NULL;
 if (c->ctx)
 SSL_CTX_free(c->ctx);
 c->ctx = NULL;
@@ -861,15 +862,8 @@ TCN_IMPLEMENT_CALL(void, SSLContext, 
setVerify)(TCN_STDARGS, jlong ctx,
 if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
 (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
 verify |= SSL_VERIFY_PEER;
-if (!c->store) {
-if (SSL_CTX_set_default_verify_paths(c->ctx)) {
-c->store = SSL_CTX_get_cert_store(c->ctx);
-X509_STORE_set_flags(c->store, 0);
-}
-else {
-/* XXX: See if this is fatal */
-}
-}
+if (!c->store)
+c->store = SSL_CTX_get_cert_store(c->ctx);
 
 SSL_CTX_set_verify(c->ctx, verify, SSL_callback_SSL_verify);
 }
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index ffd0e10f5..0aedd8212 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -59,6 +59,10 @@
 
   Remove an unreachable if condition around CRLs in sslcontext.c. 
(michaelo)
 
+
+  67818: 
SSL.setVerify()/SSLContext.setVerify()
+  silently set undocumented default verify paths. (michaelo)
+
   
 
 


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



(tomcat-native) branch 1.2.x updated: Remove an unreachable if condition around CRLs in sslcontext.c

2023-10-27 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new de660b456 Remove an unreachable if condition around CRLs in 
sslcontext.c
de660b456 is described below

commit de660b456ec6efdbc03e5c1e7324449756764481
Author: Michael Osipov 
AuthorDate: Fri Oct 27 12:52:19 2023 +0200

Remove an unreachable if condition around CRLs in sslcontext.c

SSL_CTX_get_cert_store() will never return NULL because it is initialized at
context creation time with X509_STORE_new() and unless we have set it 
explicitly
to NULL with SSL_CTX_set_cert_store().
---
 native/src/sslcontext.c   | 7 +++
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 2cde86087..646577e72 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -718,10 +718,9 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCARevocation)(TCN_STDARGS, jlong ctx
 return JNI_FALSE;
 }
 
-if (!c->crl) {
-if ((c->crl = SSL_CTX_get_cert_store(c->ctx)) == NULL)
-goto cleanup;
-}
+if (!c->crl)
+c->crl = SSL_CTX_get_cert_store(c->ctx);
+
 if (J2S(file)) {
 lookup = X509_STORE_add_lookup(c->crl, X509_LOOKUP_file());
 if (lookup == NULL) {
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 5e3f2ae8f..a7462ec00 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -41,6 +41,9 @@
 
   Fix version set in DLL header on Windows. (michaelo)
 
+
+  Remove an unreachable if condition around CRLs in sslcontext.c. 
(michaelo)
+
   
 
 


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



(tomcat-native) branch main updated: Remove an unreachable if condition around CRLs in sslcontext.c

2023-10-27 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new ac6f59b81 Remove an unreachable if condition around CRLs in 
sslcontext.c
ac6f59b81 is described below

commit ac6f59b8162c52bc6fe1add64d38af9da9dd9c02
Author: Michael Osipov 
AuthorDate: Fri Oct 27 12:52:19 2023 +0200

Remove an unreachable if condition around CRLs in sslcontext.c

SSL_CTX_get_cert_store() will never return NULL because it is initialized at
context creation time with X509_STORE_new() and unless we have set it 
explicitly
to NULL with SSL_CTX_set_cert_store().
---
 native/src/sslcontext.c   | 7 +++
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index b52258914..34669ff70 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -611,10 +611,9 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCARevocation)(TCN_STDARGS, jlong ctx
 return JNI_FALSE;
 }
 
-if (!c->crl) {
-if ((c->crl = SSL_CTX_get_cert_store(c->ctx)) == NULL)
-goto cleanup;
-}
+if (!c->crl)
+c->crl = SSL_CTX_get_cert_store(c->ctx);
+
 if (J2S(file)) {
 lookup = X509_STORE_add_lookup(c->crl, X509_LOOKUP_file());
 if (lookup == NULL) {
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index c5ea8ce09..ffd0e10f5 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -56,6 +56,9 @@
 
   Add Ant version (1.10.2) requirement identical to Tomcat. (michaelo)
 
+
+  Remove an unreachable if condition around CRLs in sslcontext.c. 
(michaelo)
+
   
 
 


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



[tomcat] branch 8.5.x updated: BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and SSLHostConfig#certificateKeystorePasswordFile

2023-10-23 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 8768cb1607 BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
8768cb1607 is described below

commit 8768cb160766487e43f861de9ded9d527fd9d334
Author: Michael Osipov 
AuthorDate: Wed Sep 27 11:23:19 2023 +0200

BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 34 
 java/org/apache/tomcat/util/net/SSLHostConfig.java | 34 +++-
 .../tomcat/util/net/SSLHostConfigCertificate.java  | 27 -
 java/org/apache/tomcat/util/net/SSLUtilBase.java   | 47 ++
 java/org/apache/tomcat/util/net/jsse/PEMFile.java  | 31 --
 .../tomcat/util/net/openssl/OpenSSLContext.java| 17 +++-
 test/org/apache/tomcat/util/net/TestSsl.java   | 22 +-
 test/org/apache/tomcat/util/net/TesterSupport.java | 12 +-
 .../apache/tomcat/util/net/jsse/TestPEMFile.java   | 39 +++---
 test/org/apache/tomcat/util/net/jsse/key-password  |  1 +
 test/org/apache/tomcat/util/net/key-password   |  1 +
 test/org/apache/tomcat/util/net/keystore-password  |  1 +
 webapps/docs/changelog.xml |  4 ++
 webapps/docs/config/http.xml   | 20 -
 14 files changed, 267 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index 8e4f3efe98..18005783e2 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -1013,6 +1013,17 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
+public String getKeystorePassFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeystorePasswordFile();
+}
+
+public void setKeystorePassFile(String certificateKeystorePasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeystorePasswordFile(certificateKeystorePasswordFile);
+}
+
+
 public String getKeyPass() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateKeyPassword();
@@ -1023,6 +1034,18 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 defaultSSLHostConfig.setCertificateKeyPassword(certificateKeyPassword);
 }
 
+
+public String getKeyPassFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeyPasswordFile();
+}
+
+public void setKeyPassFile(String certificateKeyPasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeyPasswordFile(certificateKeyPasswordFile);
+}
+
+
 public String getSSLPassword() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateKeyPassword();
@@ -1034,6 +1057,17 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
+public String getSSLPasswordFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeyPasswordFile();
+}
+
+public void setSSLPasswordFile(String certificateKeyPasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeyPasswordFile(certificateKeyPasswordFile);
+}
+
+
 public String getCrlFile() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateRevocationListFile();
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java 
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index 7563015373..c9b921026e 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -306,12 +306,29 @@ public class SSLHostConfig implements Serializable {
 return defaultCertificate.getCertificateKeyPassword();
 }
 }
+
+
 public void setCertificateKeyPassword(String certificateKeyPassword) {
 registerDefaultCertificate();
 defaultCertificate.setCertificateKeyPassword(certificateKeyPassword);
 }
 
 
+public String getCertificateKeyPasswordFile() {
+if (defaultCertificate == null) {
+return null;
+} else {
+return defaultCertificate.getCertificateKeyPasswordFile();
+}
+}
+
+
+public void setCertificateKeyPasswordFile(String 
certificateKeyPasswordFile) {
+registerDefaultCertificate();
+
defaultCertificate.setCertificateKeyPasswordFile(certificateKeyPasswordFile

[tomcat] branch 9.0.x updated: BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and SSLHostConfig#certificateKeystorePasswordFile

2023-10-23 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3d8db8cd57 BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
3d8db8cd57 is described below

commit 3d8db8cd57b1e89be75b004b7401eb9581f531a2
Author: Michael Osipov 
AuthorDate: Wed Sep 27 11:23:19 2023 +0200

BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 34 
 java/org/apache/tomcat/util/net/SSLHostConfig.java | 34 +++-
 .../tomcat/util/net/SSLHostConfigCertificate.java  | 27 -
 java/org/apache/tomcat/util/net/SSLUtilBase.java   | 47 ++
 java/org/apache/tomcat/util/net/jsse/PEMFile.java  | 31 --
 .../tomcat/util/net/openssl/OpenSSLContext.java| 17 +++-
 test/org/apache/tomcat/util/net/TestSsl.java   | 22 +-
 test/org/apache/tomcat/util/net/TesterSupport.java | 12 +-
 .../apache/tomcat/util/net/jsse/TestPEMFile.java   | 39 +++---
 test/org/apache/tomcat/util/net/jsse/key-password  |  1 +
 test/org/apache/tomcat/util/net/key-password   |  1 +
 test/org/apache/tomcat/util/net/keystore-password  |  1 +
 webapps/docs/changelog.xml |  4 ++
 webapps/docs/config/http.xml   | 20 -
 14 files changed, 267 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index cc6988d308..9f12ae8ec4 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -1009,6 +1009,17 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
+public String getKeystorePassFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeystorePasswordFile();
+}
+
+public void setKeystorePassFile(String certificateKeystorePasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeystorePasswordFile(certificateKeystorePasswordFile);
+}
+
+
 public String getKeyPass() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateKeyPassword();
@@ -1019,6 +1030,18 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 defaultSSLHostConfig.setCertificateKeyPassword(certificateKeyPassword);
 }
 
+
+public String getKeyPassFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeyPasswordFile();
+}
+
+public void setKeyPassFile(String certificateKeyPasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeyPasswordFile(certificateKeyPasswordFile);
+}
+
+
 public String getSSLPassword() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateKeyPassword();
@@ -1030,6 +1053,17 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
+public String getSSLPasswordFile() {
+registerDefaultSSLHostConfig();
+return defaultSSLHostConfig.getCertificateKeyPasswordFile();
+}
+
+public void setSSLPasswordFile(String certificateKeyPasswordFile) {
+registerDefaultSSLHostConfig();
+
defaultSSLHostConfig.setCertificateKeyPasswordFile(certificateKeyPasswordFile);
+}
+
+
 public String getCrlFile() {
 registerDefaultSSLHostConfig();
 return defaultSSLHostConfig.getCertificateRevocationListFile();
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java 
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index b2d944ee9b..af320dfbb6 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -305,12 +305,29 @@ public class SSLHostConfig implements Serializable {
 return defaultCertificate.getCertificateKeyPassword();
 }
 }
+
+
 public void setCertificateKeyPassword(String certificateKeyPassword) {
 registerDefaultCertificate();
 defaultCertificate.setCertificateKeyPassword(certificateKeyPassword);
 }
 
 
+public String getCertificateKeyPasswordFile() {
+if (defaultCertificate == null) {
+return null;
+} else {
+return defaultCertificate.getCertificateKeyPasswordFile();
+}
+}
+
+
+public void setCertificateKeyPasswordFile(String 
certificateKeyPasswordFile) {
+registerDefaultCertificate();
+
defaultCertificate.setCertificateKeyPasswordFile(certificateKeyPasswordFile

[tomcat] branch 10.1.x updated: BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and SSLHostConfig#certificateKeystorePasswordFile

2023-10-23 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 62bbe46266 BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
62bbe46266 is described below

commit 62bbe462666b34eda971d1256cc1e830b500bdc1
Author: Michael Osipov 
AuthorDate: Wed Sep 27 11:23:19 2023 +0200

BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
---
 java/org/apache/tomcat/util/net/SSLHostConfig.java |  4 +-
 .../tomcat/util/net/SSLHostConfigCertificate.java  | 27 -
 java/org/apache/tomcat/util/net/SSLUtilBase.java   | 47 ++
 java/org/apache/tomcat/util/net/jsse/PEMFile.java  | 31 --
 .../tomcat/util/net/openssl/OpenSSLContext.java| 17 +++-
 test/org/apache/tomcat/util/net/TestSsl.java   | 22 +-
 test/org/apache/tomcat/util/net/TesterSupport.java | 12 +-
 .../apache/tomcat/util/net/jsse/TestPEMFile.java   | 39 +++---
 test/org/apache/tomcat/util/net/jsse/key-password  |  1 +
 test/org/apache/tomcat/util/net/key-password   |  1 +
 test/org/apache/tomcat/util/net/keystore-password  |  1 +
 webapps/docs/changelog.xml |  4 ++
 webapps/docs/config/http.xml   | 20 -
 13 files changed, 203 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java 
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index 003c9b8b27..a447c7fec0 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -659,7 +659,7 @@ public class SSLHostConfig implements Serializable {
 if (truststoreFile != null){
 try {
 result = SSLUtilBase.getStore(getTruststoreType(), 
getTruststoreProvider(),
-getTruststoreFile(), getTruststorePassword());
+getTruststoreFile(), getTruststorePassword(), 
null);
 } catch (IOException ioe) {
 Throwable cause = ioe.getCause();
 if (cause instanceof UnrecoverableKeyException) {
@@ -668,7 +668,7 @@ public class SSLHostConfig implements Serializable {
 cause);
 // Re-try
 result = SSLUtilBase.getStore(getTruststoreType(), 
getTruststoreProvider(),
-getTruststoreFile(), null);
+getTruststoreFile(), null, null);
 } else {
 // Something else went wrong - re-throw
 throw ioe;
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index ff635bf588..0c0ebb7274 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -59,10 +59,12 @@ public class SSLHostConfigCertificate implements 
Serializable {
 private final SSLHostConfig sslHostConfig;
 private final Type type;
 private String certificateKeyPassword = null;
+private String certificateKeyPasswordFile = null;
 
 // JSSE
 private String certificateKeyAlias;
 private String certificateKeystorePassword = DEFAULT_KEYSTORE_PASSWORD;
+private String certificateKeystorePasswordFile = null;
 private String certificateKeystoreFile = DEFAULT_KEYSTORE_FILE;
 private String certificateKeystoreProvider = DEFAULT_KEYSTORE_PROVIDER;
 private String certificateKeystoreType = DEFAULT_KEYSTORE_TYPE;
@@ -131,6 +133,16 @@ public class SSLHostConfigCertificate implements 
Serializable {
 }
 
 
+public String getCertificateKeyPasswordFile() {
+return certificateKeyPasswordFile;
+}
+
+
+public void setCertificateKeyPasswordFile(String 
certificateKeyPasswordFile) {
+this.certificateKeyPasswordFile = certificateKeyPasswordFile;
+}
+
+
 // JSSE
 
 public void setCertificateKeyAlias(String certificateKeyAlias) {
@@ -171,6 +183,19 @@ public class SSLHostConfigCertificate implements 
Serializable {
 }
 
 
+public void setCertificateKeystorePasswordFile(String 
certificateKeystorePasswordFile) {
+sslHostConfig.setProperty(
+"Certificate.certificateKeystorePasswordFile", 
SSLHostConfig.Type.JSSE);
+setStoreType("Certificate.certificateKeystorePasswordFile", 
StoreType.KEYSTORE);
+this.certificateKeystorePasswordFile = certificateKeystorePasswordFile;
+}
+
+
+public String getCertificateKeystorePasswordFile() {
+return certificateKeystorePasswordFile;
+}

[tomcat] branch main updated: BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and SSLHostConfig#certificateKeystorePasswordFile

2023-10-23 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 b1d20cc6b0 BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
b1d20cc6b0 is described below

commit b1d20cc6b04d64f35b3b5e47d68e02c93437867b
Author: Michael Osipov 
AuthorDate: Wed Sep 27 11:23:19 2023 +0200

BZ 66670: Add SSLHostConfig#certificateKeyPasswordFile and 
SSLHostConfig#certificateKeystorePasswordFile
---
 java/org/apache/tomcat/util/net/SSLHostConfig.java |  4 +-
 .../tomcat/util/net/SSLHostConfigCertificate.java  | 27 -
 java/org/apache/tomcat/util/net/SSLUtilBase.java   | 47 ++
 java/org/apache/tomcat/util/net/jsse/PEMFile.java  | 31 --
 .../tomcat/util/net/openssl/OpenSSLContext.java| 17 +++-
 test/org/apache/tomcat/util/net/TestSsl.java   | 22 +-
 test/org/apache/tomcat/util/net/TesterSupport.java | 12 +-
 .../apache/tomcat/util/net/jsse/TestPEMFile.java   | 39 +++---
 test/org/apache/tomcat/util/net/jsse/key-password  |  1 +
 test/org/apache/tomcat/util/net/key-password   |  1 +
 test/org/apache/tomcat/util/net/keystore-password  |  1 +
 webapps/docs/changelog.xml |  4 ++
 webapps/docs/config/http.xml   | 20 -
 13 files changed, 203 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java 
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index 003c9b8b27..a447c7fec0 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -659,7 +659,7 @@ public class SSLHostConfig implements Serializable {
 if (truststoreFile != null){
 try {
 result = SSLUtilBase.getStore(getTruststoreType(), 
getTruststoreProvider(),
-getTruststoreFile(), getTruststorePassword());
+getTruststoreFile(), getTruststorePassword(), 
null);
 } catch (IOException ioe) {
 Throwable cause = ioe.getCause();
 if (cause instanceof UnrecoverableKeyException) {
@@ -668,7 +668,7 @@ public class SSLHostConfig implements Serializable {
 cause);
 // Re-try
 result = SSLUtilBase.getStore(getTruststoreType(), 
getTruststoreProvider(),
-getTruststoreFile(), null);
+getTruststoreFile(), null, null);
 } else {
 // Something else went wrong - re-throw
 throw ioe;
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java 
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index ff635bf588..0c0ebb7274 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -59,10 +59,12 @@ public class SSLHostConfigCertificate implements 
Serializable {
 private final SSLHostConfig sslHostConfig;
 private final Type type;
 private String certificateKeyPassword = null;
+private String certificateKeyPasswordFile = null;
 
 // JSSE
 private String certificateKeyAlias;
 private String certificateKeystorePassword = DEFAULT_KEYSTORE_PASSWORD;
+private String certificateKeystorePasswordFile = null;
 private String certificateKeystoreFile = DEFAULT_KEYSTORE_FILE;
 private String certificateKeystoreProvider = DEFAULT_KEYSTORE_PROVIDER;
 private String certificateKeystoreType = DEFAULT_KEYSTORE_TYPE;
@@ -131,6 +133,16 @@ public class SSLHostConfigCertificate implements 
Serializable {
 }
 
 
+public String getCertificateKeyPasswordFile() {
+return certificateKeyPasswordFile;
+}
+
+
+public void setCertificateKeyPasswordFile(String 
certificateKeyPasswordFile) {
+this.certificateKeyPasswordFile = certificateKeyPasswordFile;
+}
+
+
 // JSSE
 
 public void setCertificateKeyAlias(String certificateKeyAlias) {
@@ -171,6 +183,19 @@ public class SSLHostConfigCertificate implements 
Serializable {
 }
 
 
+public void setCertificateKeystorePasswordFile(String 
certificateKeystorePasswordFile) {
+sslHostConfig.setProperty(
+"Certificate.certificateKeystorePasswordFile", 
SSLHostConfig.Type.JSSE);
+setStoreType("Certificate.certificateKeystorePasswordFile", 
StoreType.KEYSTORE);
+this.certificateKeystorePasswordFile = certificateKeystorePasswordFile;
+}
+
+
+public String getCertificateKeystorePasswordFile() {
+return certificateKeystorePasswordFile;
+}

[tomcat-native] branch 1.2.x updated: Fix version set in DLL header on Windows

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new d5dbac61e Fix version set in DLL header on Windows
d5dbac61e is described below

commit d5dbac61e4357ea5c5c2a434b85bafd0321e065b
Author: Michael Osipov 
AuthorDate: Thu Oct 12 17:12:19 2023 +0200

Fix version set in DLL header on Windows
---
 native/NMAKEmakefile  | 4 ++--
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/native/NMAKEmakefile b/native/NMAKEmakefile
index 1c91b5c47..ad02d3152 100644
--- a/native/NMAKEmakefile
+++ b/native/NMAKEmakefile
@@ -69,7 +69,7 @@ INCLUDES = $(INCLUDES) -I$(WITH_OPENSSL)\inc32
 LDIRS = $(LDIRS) /libpath:"$(WITH_OPENSSL)\out32"
 !ENDIF
 
-LFLAGS = $(LFLAGS) /version:1.1
+LFLAGS = $(LFLAGS) /version:1.2
 LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib wldap32.lib 
ole32.lib
 LFLAGS = $(LFLAGS) $(APR_LIB)
 !IF DEFINED(WITH_FIPS)
@@ -78,7 +78,7 @@ LFLAGS = $(LFLAGS) libeayfips32.lib libeaycompat32.lib 
ssleay32.lib /NODEFAULTLI
 !IF DEFINED(OPENSSL_NEW_LIBS)
 LFLAGS = $(LFLAGS) libssl.lib libcrypto.lib crypt32.lib
 !ELSE
-LFLAGS = $(LFLAGS) libeay32.lib ssleay32.lib 
+LFLAGS = $(LFLAGS) libeay32.lib ssleay32.lib
 !ENDIF
 !ENDIF
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index a80514dbf..5e3f2ae8f 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -38,6 +38,9 @@
 
   Align Java source compile configuration with Tomcat. (michaelo)
 
+
+  Fix version set in DLL header on Windows. (michaelo)
+
   
 
 


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



[tomcat-native] 01/02: Add Ant version (1.10.2) requirement identical to Tomcat

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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

commit 4478b720db92369f08151b7976f30dabc969d2ce
Author: Michael Osipov 
AuthorDate: Thu Oct 12 16:42:16 2023 +0200

Add Ant version (1.10.2) requirement identical to Tomcat
---
 build.properties.default  | 3 +++
 build.xml | 7 +++
 xdocs/miscellaneous/changelog.xml | 3 +++
 3 files changed, 13 insertions(+)

diff --git a/build.properties.default b/build.properties.default
index f97fc6e24..dda9e6380 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -30,6 +30,9 @@ base.path=/usr/share/java
 #base.path=C:/path/to/the/repository
 #base.path=/usr/local
 
+# - Build tools -
+ant.version.required=1.10.2
+
 # - Build control flags -
 compile.debug=true
 # Do not pass -deprecation (-Xlint:deprecation) flag to javac
diff --git a/build.xml b/build.xml
index 3be0ed0ca..f8d6b767b 100644
--- a/build.xml
+++ b/build.xml
@@ -26,6 +26,13 @@
 
 
 
+
+
+
+  
+
+  
+
 
 
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 2dc11b1a9..e37f73976 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -49,6 +49,9 @@
 
   Align Java source compile configuration with Tomcat. (michaelo)
 
+
+  Add Ant version (1.10.2) requirement identical to Tomcat. (michaelo)
+
   
 
 


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



[tomcat-native] 02/02: BZ 67538: Make use of Ant's task to enfore the mininum Java build version

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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

commit 82a502dab27ac12d00079ae3310387b000f7e901
Author: Michael Osipov 
AuthorDate: Thu Oct 12 16:13:01 2023 +0200

BZ 67538: Make use of Ant's  task to enfore the mininum Java 
build version
---
 build.xml | 7 +++
 xdocs/miscellaneous/changelog.xml | 4 
 2 files changed, 11 insertions(+)

diff --git a/build.xml b/build.xml
index f8d6b767b..ce1f16c48 100644
--- a/build.xml
+++ b/build.xml
@@ -64,6 +64,13 @@
 
 
 
+
+
+
+
+
+
+
 
 
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index e37f73976..c5ea8ce09 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -33,6 +33,10 @@
 
 
   
+
+  67538: Make use of Ant's <javaversion /> 
task
+  to enfore the mininum Java build version. (michaelo)
+
 
   67615: Windows binary for version 2 has incorrect version 
suffix
   compared to the GNU autoconf version. (michaelo)


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



[tomcat-native] branch main updated (1f32d55d5 -> 82a502dab)

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


from 1f32d55d5 Align Java source compile configuration with Tomcat
 new 4478b720d Add Ant version (1.10.2) requirement identical to Tomcat
 new 82a502dab BZ 67538: Make use of Ant's  task to enfore 
the mininum Java build version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default  |  3 +++
 build.xml | 14 ++
 xdocs/miscellaneous/changelog.xml |  7 +++
 3 files changed, 24 insertions(+)


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



[tomcat] branch 8.5.x updated: BZ 67538: Make use of Ant's task to enfore the mininum Java build version

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 1927cd1b5c BZ 67538: Make use of Ant's  task to enfore 
the mininum Java build version
1927cd1b5c is described below

commit 1927cd1b5cc8b6da4fa4bcb2d6731421a7e84b66
Author: Michael Osipov 
AuthorDate: Thu Oct 12 15:14:46 2023 +0200

BZ 67538: Make use of Ant's  task to enfore the mininum Java 
build version

Introduce property 'skip.build.java.version' to skip Java build check to 
perform tests
with Java 8.
---
 build.xml  | 10 ++
 webapps/docs/changelog.xml |  8 
 2 files changed, 18 insertions(+)

diff --git a/build.xml b/build.xml
index 723be26ac5..83f3eca952 100644
--- a/build.xml
+++ b/build.xml
@@ -116,6 +116,16 @@
   
   
 
+  
+  
+
+  
+
+
+  
+
+  
+
   
   
   
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f64befd633..3f6cd5e504 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
   
 
   
+  
+
+  
+67538: Make use of Ant's <javaversion /> 
task
+to enfore the mininum Java build version. (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch 10.1.x updated: BZ 67538: Make use of Ant's task to enfore the mininum Java build version

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new cbfc9eb850 BZ 67538: Make use of Ant's  task to enfore 
the mininum Java build version
cbfc9eb850 is described below

commit cbfc9eb85085cd32f2e7c23fadcf1303de46eb79
Author: Michael Osipov 
AuthorDate: Thu Oct 12 15:14:46 2023 +0200

BZ 67538: Make use of Ant's  task to enfore the mininum Java 
build version
---
 build.xml  | 7 +++
 webapps/docs/changelog.xml | 8 
 2 files changed, 15 insertions(+)

diff --git a/build.xml b/build.xml
index be035680d5..ea6a2b9d52 100644
--- a/build.xml
+++ b/build.xml
@@ -109,6 +109,13 @@
   
   
 
+  
+  
+
+  
+
+  
+
   
   
   
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ad09a9ea3d..f13e0e0639 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
   
 
   
+  
+
+  
+67538: Make use of Ant's <javaversion /> 
task
+to enfore the mininum Java build version. (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch main updated: BZ 67538: Make use of Ant's task to enfore the mininum Java build version

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 eb9913a7d7 BZ 67538: Make use of Ant's  task to enfore 
the mininum Java build version
eb9913a7d7 is described below

commit eb9913a7d70522f60682728a8950e993085d1d33
Author: Michael Osipov 
AuthorDate: Thu Oct 12 15:14:46 2023 +0200

BZ 67538: Make use of Ant's  task to enfore the mininum Java 
build version
---
 build.xml  | 7 +++
 webapps/docs/changelog.xml | 8 
 2 files changed, 15 insertions(+)

diff --git a/build.xml b/build.xml
index d1af5a62e2..071091425a 100644
--- a/build.xml
+++ b/build.xml
@@ -109,6 +109,13 @@
   
   
 
+  
+  
+
+  
+
+  
+
   
   
   
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index faf938bb4a..ea64cd14b3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
   
 
   
+  
+
+  
+67538: Make use of Ant's <javaversion /> 
task
+to enfore the mininum Java build version. (michaelo)
+  
+
+  
 
 
   


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



[tomcat-native] branch 1.2.x updated: Align Java source compile configuration with Tomcat

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 06fd25f1e Align Java source compile configuration with Tomcat
06fd25f1e is described below

commit 06fd25f1e717d34d50e1938dc449540e79519277
Author: Michael Osipov 
AuthorDate: Thu Oct 12 14:05:42 2023 +0200

Align Java source compile configuration with Tomcat
---
 build.properties.default  |  8 
 build.xml | 19 ++-
 xdocs/miscellaneous/changelog.xml |  3 +++
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 5ddd86f88..37e678139 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -30,10 +30,10 @@ base.path=/usr/share/java
 #base.path=C:/path/to/the/repository
 #base.path=/usr/local
 
-compile.source=1.8
-compile.target=1.8
-compile.debug=off
-compile.deprecation=on
+# - Build control flags -
+compile.debug=true
+# Do not pass -deprecation (-Xlint:deprecation) flag to javac
+compile.deprecation=false
 
 base-maven.loc=https://repo.maven.apache.org/maven2
 
diff --git a/build.xml b/build.xml
index e7fa10232..96358892d 100644
--- a/build.xml
+++ b/build.xml
@@ -55,6 +55,10 @@
 
 
 
+
+
+
+
 
 
 
@@ -204,12 +208,11 @@ limitations under the License.-->">
 
 
 
-
 
@@ -244,13 +247,11 @@ limitations under the License.-->">
 
 
 
-
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 34e0a77ef..a80514dbf 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -35,6 +35,9 @@
 
   Drop useless compile.optimize option. (michaelo)
 
+
+  Align Java source compile configuration with Tomcat. (michaelo)
+
   
 
 


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



[tomcat-native] branch main updated: Align Java source compile configuration with Tomcat

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1f32d55d5 Align Java source compile configuration with Tomcat
1f32d55d5 is described below

commit 1f32d55d598b99cc5cb8369944bd75f3ff9d1144
Author: Michael Osipov 
AuthorDate: Thu Oct 12 14:05:42 2023 +0200

Align Java source compile configuration with Tomcat
---
 build.properties.default  |  8 
 build.xml | 18 --
 xdocs/miscellaneous/changelog.xml |  3 +++
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index edc5342db..f97fc6e24 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -30,10 +30,10 @@ base.path=/usr/share/java
 #base.path=C:/path/to/the/repository
 #base.path=/usr/local
 
-compile.source=11
-compile.target=11
-compile.debug=off
-compile.deprecation=on
+# - Build control flags -
+compile.debug=true
+# Do not pass -deprecation (-Xlint:deprecation) flag to javac
+compile.deprecation=false
 
 base-maven.loc=https://repo.maven.apache.org/maven2
 
diff --git a/build.xml b/build.xml
index df6ed702a..3be0ed0ca 100644
--- a/build.xml
+++ b/build.xml
@@ -54,6 +54,9 @@
 
 
 
+
+
+
 
 
 
@@ -197,12 +200,10 @@ limitations under the License.-->">
 
 
 
-
 
@@ -237,13 +238,10 @@ limitations under the License.-->">
 
 
 
-
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 88e9ed553..2dc11b1a9 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -46,6 +46,9 @@
 
   Drop useless compile.optimize option. (michaelo)
 
+
+  Align Java source compile configuration with Tomcat. (michaelo)
+
   
 
 


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



[tomcat-native] branch 1.2.x updated: Drop useless 'compile.optimize' option

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 5d19eda23 Drop useless 'compile.optimize' option
5d19eda23 is described below

commit 5d19eda231c9868c927e25659632847194b80d9b
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:37:35 2023 +0200

Drop useless 'compile.optimize' option
---
 build.properties.default  | 5 ++---
 build.xml | 1 -
 xdocs/miscellaneous/changelog.xml | 5 -
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 0e6f0e9a8..5ddd86f88 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -5,9 +5,9 @@
 #  The ASF licenses this file to You under the Apache License, Version 2.0
 #  (the "License"); you may not use this file except in compliance with
 #  the License.  You may obtain a copy of the License at
-# 
+#
 #  http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 #  Unless required by applicable law or agreed to in writing, software
 #  distributed under the License is distributed on an "AS IS" BASIS,
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,6 @@ compile.source=1.8
 compile.target=1.8
 compile.debug=off
 compile.deprecation=on
-compile.optimize=on
 
 base-maven.loc=https://repo.maven.apache.org/maven2
 
diff --git a/build.xml b/build.xml
index 227cb86df..e7fa10232 100644
--- a/build.xml
+++ b/build.xml
@@ -210,7 +210,6 @@ limitations under the License.-->">
 target="${compile.target}"
 debug="${compile.debug}"
 deprecation="${compile.deprecation}"
-optimize="${compile.optimize}"
 encoding="ISO-8859-1"
 includeantruntime="false">
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 59dfc0394..34e0a77ef 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -32,6 +32,9 @@
 
 
   
+
+  Drop useless compile.optimize option. (michaelo)
+
   
 
 
@@ -513,7 +516,7 @@
 
   59797: Ensure that the per thread error hash maintained by
   OpenSSL is cleaned up as individual threads exit to ensure it does not
-  grow too large. Patch provided by Nate Clark. (markt) 
+  grow too large. Patch provided by Nate Clark. (markt)
 
 
   59996: Correctly handle building tc-native on a 64-bit system


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



[tomcat-native] branch main updated: Drop useless 'compile.optimize' option

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 97a76c3a4 Drop useless 'compile.optimize' option
97a76c3a4 is described below

commit 97a76c3a441e1bb9f38b2e9664655b016d39d842
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:37:35 2023 +0200

Drop useless 'compile.optimize' option
---
 build.properties.default  | 5 ++---
 build.xml | 1 -
 xdocs/miscellaneous/changelog.xml | 3 +++
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index abef2f347..edc5342db 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -5,9 +5,9 @@
 #  The ASF licenses this file to You under the Apache License, Version 2.0
 #  (the "License"); you may not use this file except in compliance with
 #  the License.  You may obtain a copy of the License at
-# 
+#
 #  http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 #  Unless required by applicable law or agreed to in writing, software
 #  distributed under the License is distributed on an "AS IS" BASIS,
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,6 @@ compile.source=11
 compile.target=11
 compile.debug=off
 compile.deprecation=on
-compile.optimize=on
 
 base-maven.loc=https://repo.maven.apache.org/maven2
 
diff --git a/build.xml b/build.xml
index c511fc473..df6ed702a 100644
--- a/build.xml
+++ b/build.xml
@@ -203,7 +203,6 @@ limitations under the License.-->">
 target="${compile.target}"
 debug="${compile.debug}"
 deprecation="${compile.deprecation}"
-optimize="${compile.optimize}"
 encoding="ISO-8859-1"
 includeantruntime="false">
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 638eb1fc4..88e9ed553 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -43,6 +43,9 @@
 
   67616: o.a.tomcat.jni.SSL contains useless check for old 
OpenSSL version. (michaelo)
 
+
+  Drop useless compile.optimize option. (michaelo)
+
   
 
 


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



[tomcat] branch 8.5.x updated: BZ 67667: TLSCertificateReloadListener prints unreadable rendering of X509Certificate#getNotAfter()

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new b03e642842 BZ 67667: TLSCertificateReloadListener prints unreadable 
rendering of X509Certificate#getNotAfter()
b03e642842 is described below

commit b03e6428420f874463fda9a44cd0031d0579a52e
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:09:02 2023 +0200

BZ 67667: TLSCertificateReloadListener prints unreadable rendering of 
X509Certificate#getNotAfter()
---
 .../apache/catalina/security/TLSCertificateReloadListener.java| 4 +++-
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/catalina/security/TLSCertificateReloadListener.java 
b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
index 0596732575..3db6e286c3 100644
--- a/java/org/apache/catalina/security/TLSCertificateReloadListener.java
+++ b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
@@ -17,6 +17,7 @@
 package org.apache.catalina.security;
 
 import java.security.cert.X509Certificate;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Set;
 
@@ -45,6 +46,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
 private static final Log log = 
LogFactory.getLog(TLSCertificateReloadListener.class);
 private static final StringManager sm = 
StringManager.getManager(TLSCertificateReloadListener.class);
+private final SimpleDateFormat dateFormat = new 
SimpleDateFormat("-MM-dd'T'HH:mm:ssXXX");
 
 // Configuration
 private int checkPeriod = 24 * 60 * 60;
@@ -160,7 +162,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
log.warn(sm.getString("tlsCertRenewalListener.notRenewed", connector,
 sslHostConfig.getHostName(),
 
expiringCertificate.getSubjectX500Principal().getName(),
-
expiringCertificate.getNotAfter()));
+
dateFormat.format(expiringCertificate.getNotAfter(;
 }
 }
 } catch (IllegalArgumentException iae) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e4388d9f74..f64befd633 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+67667: TLSCertificateReloadListener prints 
unreadable
+rendering of X509Certificate#getNotAfter(). (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch 9.0.x updated: BZ 67667: TLSCertificateReloadListener prints unreadable rendering of X509Certificate#getNotAfter()

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new ec3c350dd6 BZ 67667: TLSCertificateReloadListener prints unreadable 
rendering of X509Certificate#getNotAfter()
ec3c350dd6 is described below

commit ec3c350dd6993081408e5c8c82a0aea524bc59d5
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:09:02 2023 +0200

BZ 67667: TLSCertificateReloadListener prints unreadable rendering of 
X509Certificate#getNotAfter()
---
 .../apache/catalina/security/TLSCertificateReloadListener.java| 4 +++-
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/catalina/security/TLSCertificateReloadListener.java 
b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
index 0596732575..3db6e286c3 100644
--- a/java/org/apache/catalina/security/TLSCertificateReloadListener.java
+++ b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
@@ -17,6 +17,7 @@
 package org.apache.catalina.security;
 
 import java.security.cert.X509Certificate;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Set;
 
@@ -45,6 +46,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
 private static final Log log = 
LogFactory.getLog(TLSCertificateReloadListener.class);
 private static final StringManager sm = 
StringManager.getManager(TLSCertificateReloadListener.class);
+private final SimpleDateFormat dateFormat = new 
SimpleDateFormat("-MM-dd'T'HH:mm:ssXXX");
 
 // Configuration
 private int checkPeriod = 24 * 60 * 60;
@@ -160,7 +162,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
log.warn(sm.getString("tlsCertRenewalListener.notRenewed", connector,
 sslHostConfig.getHostName(),
 
expiringCertificate.getSubjectX500Principal().getName(),
-
expiringCertificate.getNotAfter()));
+
dateFormat.format(expiringCertificate.getNotAfter(;
 }
 }
 } catch (IllegalArgumentException iae) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 13a5ac0be2..cae843b18c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+67667: TLSCertificateReloadListener prints 
unreadable
+rendering of X509Certificate#getNotAfter(). (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch 10.1.x updated: BZ 67667: TLSCertificateReloadListener prints unreadable rendering of X509Certificate#getNotAfter()

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 3ade127959 BZ 67667: TLSCertificateReloadListener prints unreadable 
rendering of X509Certificate#getNotAfter()
3ade127959 is described below

commit 3ade1279599f08cfcaf6802a060a6d241988
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:09:02 2023 +0200

BZ 67667: TLSCertificateReloadListener prints unreadable rendering of 
X509Certificate#getNotAfter()
---
 .../apache/catalina/security/TLSCertificateReloadListener.java| 4 +++-
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/catalina/security/TLSCertificateReloadListener.java 
b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
index 0596732575..3db6e286c3 100644
--- a/java/org/apache/catalina/security/TLSCertificateReloadListener.java
+++ b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
@@ -17,6 +17,7 @@
 package org.apache.catalina.security;
 
 import java.security.cert.X509Certificate;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Set;
 
@@ -45,6 +46,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
 private static final Log log = 
LogFactory.getLog(TLSCertificateReloadListener.class);
 private static final StringManager sm = 
StringManager.getManager(TLSCertificateReloadListener.class);
+private final SimpleDateFormat dateFormat = new 
SimpleDateFormat("-MM-dd'T'HH:mm:ssXXX");
 
 // Configuration
 private int checkPeriod = 24 * 60 * 60;
@@ -160,7 +162,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
log.warn(sm.getString("tlsCertRenewalListener.notRenewed", connector,
 sslHostConfig.getHostName(),
 
expiringCertificate.getSubjectX500Principal().getName(),
-
expiringCertificate.getNotAfter()));
+
dateFormat.format(expiringCertificate.getNotAfter(;
 }
 }
 } catch (IllegalArgumentException iae) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2582c4adc5..ad09a9ea3d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+67667: TLSCertificateReloadListener prints 
unreadable
+rendering of X509Certificate#getNotAfter(). (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch main updated: BZ 67667: TLSCertificateReloadListener prints unreadable rendering of X509Certificate#getNotAfter()

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 69143e32da BZ 67667: TLSCertificateReloadListener prints unreadable 
rendering of X509Certificate#getNotAfter()
69143e32da is described below

commit 69143e32da1b51c9f2c08e280f9133175f5b8dc1
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:09:02 2023 +0200

BZ 67667: TLSCertificateReloadListener prints unreadable rendering of 
X509Certificate#getNotAfter()
---
 .../apache/catalina/security/TLSCertificateReloadListener.java| 4 +++-
 webapps/docs/changelog.xml| 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/catalina/security/TLSCertificateReloadListener.java 
b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
index 0596732575..3db6e286c3 100644
--- a/java/org/apache/catalina/security/TLSCertificateReloadListener.java
+++ b/java/org/apache/catalina/security/TLSCertificateReloadListener.java
@@ -17,6 +17,7 @@
 package org.apache.catalina.security;
 
 import java.security.cert.X509Certificate;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Set;
 
@@ -45,6 +46,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
 private static final Log log = 
LogFactory.getLog(TLSCertificateReloadListener.class);
 private static final StringManager sm = 
StringManager.getManager(TLSCertificateReloadListener.class);
+private final SimpleDateFormat dateFormat = new 
SimpleDateFormat("-MM-dd'T'HH:mm:ssXXX");
 
 // Configuration
 private int checkPeriod = 24 * 60 * 60;
@@ -160,7 +162,7 @@ public class TLSCertificateReloadListener implements 
LifecycleListener {
 
log.warn(sm.getString("tlsCertRenewalListener.notRenewed", connector,
 sslHostConfig.getHostName(),
 
expiringCertificate.getSubjectX500Principal().getName(),
-
expiringCertificate.getNotAfter()));
+
dateFormat.format(expiringCertificate.getNotAfter(;
 }
 }
 } catch (IllegalArgumentException iae) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 09b0227b59..faf938bb4a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+67667: TLSCertificateReloadListener prints 
unreadable
+rendering of X509Certificate#getNotAfter(). (michaelo)
+  
+
+  
 
 
   


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



[tomcat] branch 8.5.x updated: Increment version number for next development cycle

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 8234f4dc31 Increment version number for next development cycle
8234f4dc31 is described below

commit 8234f4dc31c0db7533caa976d42170c04e87b874
Author: Michael Osipov 
AuthorDate: Thu Oct 12 12:03:39 2023 +0200

Increment version number for next development cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 8fd2616b02..4722989dcc 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -31,7 +31,7 @@
 # - Version Control Flags -
 version.major=8
 version.minor=5
-version.build=95
+version.build=96
 version.patch=0
 version.suffix=
 version.dev=-dev
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index a6e44a1f26..99afd53698 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=8.5.95
+maven.asf.release.deploy.version=8.5.96
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index af3449284b..e4388d9f74 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


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



[tomcat] branch 10.1.x updated: Increment version number for next development cycle

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new f1865eb249 Increment version number for next development cycle
f1865eb249 is described below

commit f1865eb2497f4855b3aa3e1340a6d42940508983
Author: Michael Osipov 
AuthorDate: Thu Oct 12 11:59:44 2023 +0200

Increment version number for next development cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 40b7ec4687..3e26aa27f6 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -31,7 +31,7 @@
 # - Version Control Flags -
 version.major=10
 version.minor=1
-version.build=15
+version.build=16
 version.patch=0
 version.suffix=
 version.dev=-dev
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index ae8200046a..2e69dcce7b 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=10.1.15
+maven.asf.release.deploy.version=10.1.16
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 63b5577150..2582c4adc5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


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



[tomcat] branch main updated: Increment version number for next development cycle

2023-10-12 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 c3d9dbc444 Increment version number for next development cycle
c3d9dbc444 is described below

commit c3d9dbc4448dabe1a47c65c9d22b05eaf33861f7
Author: Michael Osipov 
AuthorDate: Thu Oct 12 11:54:22 2023 +0200

Increment version number for next development cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 8ad061797f..b5af5f53c6 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -33,7 +33,7 @@ version.major=11
 version.minor=0
 version.build=0
 version.patch=0
-version.suffix=-M13
+version.suffix=-M14
 version.dev=-dev
 
 # - Build tools -
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index 288f82806d..310e4ac9b7 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=11.0.0-M13
+maven.asf.release.deploy.version=11.0.0-M14
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 3771afc552..09b0227b59 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


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



[tomcat-native] branch main updated: BZ 67616: o.a.tomcat.jni.SSL contains useless check for old OpenSSL version

2023-10-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 3549935bf BZ 67616: o.a.tomcat.jni.SSL contains useless check for old 
OpenSSL version
3549935bf is described below

commit 3549935bfae8d3d9f870b79a346b8ae327a128db
Author: Michael Osipov 
AuthorDate: Wed Oct 11 19:11:09 2023 +0200

BZ 67616: o.a.tomcat.jni.SSL contains useless check for old OpenSSL version
---
 java/org/apache/tomcat/jni/SSL.java | 7 +--
 xdocs/miscellaneous/changelog.xml   | 3 +++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/jni/SSL.java 
b/java/org/apache/tomcat/jni/SSL.java
index 4fff8081b..64da0ca9c 100644
--- a/java/org/apache/tomcat/jni/SSL.java
+++ b/java/org/apache/tomcat/jni/SSL.java
@@ -73,12 +73,7 @@ public final class SSL {
 public static final int SSL_PROTOCOL_ALL;
 
 static {
-if (version() >= 0x1010100f) {
-SSL_PROTOCOL_ALL = (SSL_PROTOCOL_TLSV1 | SSL_PROTOCOL_TLSV1_1 | 
SSL_PROTOCOL_TLSV1_2 |
-SSL_PROTOCOL_TLSV1_3);
-} else {
-SSL_PROTOCOL_ALL = (SSL_PROTOCOL_TLSV1 | SSL_PROTOCOL_TLSV1_1 | 
SSL_PROTOCOL_TLSV1_2);
-}
+SSL_PROTOCOL_ALL = 
(SSL_PROTOCOL_TLSV1|SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2|SSL_PROTOCOL_TLSV1_3);
 }
 
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index d7e1fad4f..638eb1fc4 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -40,6 +40,9 @@
 
   Align default pass phrase prompt with HTTPd on Windows as well. 
(michaelo)
 
+
+  67616: o.a.tomcat.jni.SSL contains useless check for old 
OpenSSL version. (michaelo)
+
   
 
 


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



[tomcat-native] branch 1.2.x updated: Fix incorrect comment

2023-10-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 7064b588d Fix incorrect comment
7064b588d is described below

commit 7064b588d5962a4fccd30d895212a60ea95dfdd3
Author: Michael Osipov 
AuthorDate: Wed Oct 11 18:42:11 2023 +0200

Fix incorrect comment
---
 java/org/apache/tomcat/jni/SSL.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/SSL.java 
b/java/org/apache/tomcat/jni/SSL.java
index 91a8bc66f..ac0ca9da5 100644
--- a/java/org/apache/tomcat/jni/SSL.java
+++ b/java/org/apache/tomcat/jni/SSL.java
@@ -254,7 +254,7 @@ public final class SSL {
 public static final int SSL_SELECTOR_FAILURE_NO_ADVERTISE = 0;
 public static final int SSL_SELECTOR_FAILURE_CHOOSE_MY_LAST_PROTOCOL = 1;
 
-/* Return OpenSSL version number (compile time version, if version < 
1.1.0) */
+/* Return OpenSSL version number (run time version) */
 public static native int version();
 
 /* Return OpenSSL version string (run time version) */


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



[tomcat-native] branch main updated: Fix incorrect comment

2023-10-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new fd3df8fc4 Fix incorrect comment
fd3df8fc4 is described below

commit fd3df8fc42fc5981bd4519363a5f8be80a1590a7
Author: Michael Osipov 
AuthorDate: Wed Oct 11 18:42:11 2023 +0200

Fix incorrect comment
---
 java/org/apache/tomcat/jni/SSL.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/SSL.java 
b/java/org/apache/tomcat/jni/SSL.java
index 974e998c7..4fff8081b 100644
--- a/java/org/apache/tomcat/jni/SSL.java
+++ b/java/org/apache/tomcat/jni/SSL.java
@@ -241,7 +241,7 @@ public final class SSL {
 public static final int SSL_SELECTOR_FAILURE_NO_ADVERTISE = 0;
 public static final int SSL_SELECTOR_FAILURE_CHOOSE_MY_LAST_PROTOCOL = 1;
 
-/* Return OpenSSL version number (compile time version, if version < 
1.1.0) */
+/* Return OpenSSL version number (run time version) */
 public static native int version();
 
 /* Return OpenSSL version string (run time version) */


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



[tomcat-native] branch main updated: Align default pass phrase prompt with HTTPd on Windows as well

2023-10-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 161333137 Align default pass phrase prompt with HTTPd on Windows as 
well
161333137 is described below

commit 161333137499255cd01761517a1eacedd1ddfede
Author: Michael Osipov 
AuthorDate: Wed Oct 11 17:19:49 2023 +0200

Align default pass phrase prompt with HTTPd on Windows as well
---
 native/os/win32/libtcnative.rc| 4 ++--
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/native/os/win32/libtcnative.rc b/native/os/win32/libtcnative.rc
index aa195e393..a0b8b28cf 100644
--- a/native/os/win32/libtcnative.rc
+++ b/native/os/win32/libtcnative.rc
@@ -24,13 +24,13 @@ LANGUAGE 0x9,0x1
 
 1001 DIALOGEX 0, 0, 252, 51
 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_CAPTION
-CAPTION "Password prompt"
+CAPTION "Pass Phrase Prompt"
 FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
 ICON1000,-1,8,6,21,20
 LTEXT   "Some of your private key files are encrypted for security 
reasons.\nIn order to read them you have to provide the pass phrases.",
 -1,29,5,220,19
-LTEXT   "Enter password:",-1,7,28,75,8
+LTEXT   "Enter pass phrase:",-1,7,28,75,8
 EDITTEXT1002,67,27,174,12,ES_PASSWORD | ES_AUTOHSCROLL
 END
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 9772a91a9..d7e1fad4f 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -37,6 +37,9 @@
   67615: Windows binary for version 2 has incorrect version 
suffix
   compared to the GNU autoconf version. (michaelo)
 
+
+  Align default pass phrase prompt with HTTPd on Windows as well. 
(michaelo)
+
   
 
 


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



[tomcat-native] branch main updated: BZ 67615: Windows binary for version 2 has incorrect version suffix compared to the GNU autoconf version

2023-10-11 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new d280a8d1e BZ 67615: Windows binary for version 2 has incorrect version 
suffix compared to the GNU autoconf version
d280a8d1e is described below

commit d280a8d1e3e8f8e0ff23b53ead03c429f4e8ad35
Author: Michael Osipov 
AuthorDate: Wed Oct 11 17:08:34 2023 +0200

BZ 67615: Windows binary for version 2 has incorrect version suffix 
compared to the GNU autoconf version
---
 native/NMAKEmakefile  | 4 ++--
 native/libtcnative.dsp| 4 ++--
 native/tcnative.dsp   | 4 ++--
 xdocs/miscellaneous/changelog.xml | 6 ++
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/native/NMAKEmakefile b/native/NMAKEmakefile
index 51653caf5..011cbb06a 100644
--- a/native/NMAKEmakefile
+++ b/native/NMAKEmakefile
@@ -29,9 +29,9 @@
 #
 
 !IF !DEFINED(APR_DECLARE_STATIC) || "$(APR_DECLARE_STATIC)" == ""
-PROJECT = libtcnative-1
+PROJECT = libtcnative-2
 !ELSE
-PROJECT = tcnative-1
+PROJECT = tcnative-2
 !ENDIF
 TARGET = DLL
 
diff --git a/native/libtcnative.dsp b/native/libtcnative.dsp
index 1e88b7c57..02c512b42 100644
--- a/native/libtcnative.dsp
+++ b/native/libtcnative.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /debug /machine:I386 /opt:ref
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"Release/libtcnative-1.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll" /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"Release/libtcnative-2.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll" /opt:ref
 
 !ELSEIF  "$(CFG)" == "libtcnative - Win32 Debug"
 
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /incremental:no /debug /machine:I386
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"Debug/libtcnative-1.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll"
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /incremental:no /debug /machine:I386 
/out:"Debug/libtcnative-2.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll"
 
 !ENDIF 
 
diff --git a/native/tcnative.dsp b/native/tcnative.dsp
index 56c9db8c7..dbaeae301 100644
--- a/native/tcnative.dsp
+++ b/native/tcnative.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib /nologo /base:"0x6EE0" /subsystem:windows 
/dll /debug /machine:I386 /opt:ref
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"LibR/tcnative-1.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll" /opt:ref
+# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib rpcrt4.lib libeay32.lib ssleay32.lib /nologo 
/base:"0x6EE0" /subsystem:windows /dll /debug /machine:I386 
/out:"LibR/tcnative-2.dll" /libpath:"./srclib/openssl/out32" 
/libpath:"./srclib/openssl/out32dll" /opt:ref
 
 !ELSEIF  "$(CFG)" == "tcnative - Win32 Debug"
 
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib wldap32.lib 
psapi.lib ole32.lib shlwapi.lib /nologo /base:"0x6EE

[tomcat] branch 9.0.x updated: Remove used property

2023-06-30 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 0df28a6201 Remove used property
0df28a6201 is described below

commit 0df28a6201defbce8b835e9336d260b4574fc6e3
Author: Michael Osipov 
AuthorDate: Fri Jun 30 13:24:02 2023 +0200

Remove used property
---
 java/org/apache/catalina/core/LocalStrings.properties | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index 8f71f2d9b6..4d72b24c78 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -172,7 +172,6 @@ propertiesRoleMappingListener.linkedRole=Successfully 
linked application role [{
 propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
 propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
 propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
-propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
 propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
 
 pushBuilder.noPath=It is illegal to call push() before setting a path


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



[tomcat] branch 10.1.x updated: Remove used property

2023-06-30 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 8b1833f75b Remove used property
8b1833f75b is described below

commit 8b1833f75bfce59a05791dede5eb9904b51da3da
Author: Michael Osipov 
AuthorDate: Fri Jun 30 13:24:02 2023 +0200

Remove used property
---
 java/org/apache/catalina/core/LocalStrings.properties | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index a45cfbff54..44cd9a37a5 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -166,7 +166,6 @@ propertiesRoleMappingListener.linkedRole=Successfully 
linked application role [{
 propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
 propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
 propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
-propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
 propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
 
 pushBuilder.noPath=It is illegal to call push() before setting a path


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



[tomcat] branch main updated: Remove used property

2023-06-30 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo 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 b9a8bd4fda Remove used property
b9a8bd4fda is described below

commit b9a8bd4fdaf31b0cc08cc72f95c802d35bb885f2
Author: Michael Osipov 
AuthorDate: Fri Jun 30 13:24:02 2023 +0200

Remove used property
---
 java/org/apache/catalina/core/LocalStrings.properties | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index aa6e810ba7..fd59aa65dc 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -166,7 +166,6 @@ pushBuilder.noPath=It is illegal to call push() before 
setting a path
 
 propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
 propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
-propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
 propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
 propertiesRoleMappingListener.linkedRole=Successfully linked application role 
[{0}] to technical role [{1}]
 propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles


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



[tomcat] branch 8.5.x updated: Align PropertiesRoleMappingListener for API difference

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d79954dfc7 Align PropertiesRoleMappingListener for API difference
d79954dfc7 is described below

commit d79954dfc7171417231eaaa0ec6586e50f69f8e6
Author: Michael Osipov 
AuthorDate: Thu Jun 29 12:27:59 2023 +0200

Align PropertiesRoleMappingListener for API difference
---
 java/org/apache/catalina/core/PropertiesRoleMappingListener.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java 
b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
index 60b135d27f..2dc44e9adb 100644
--- a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
+++ b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
@@ -115,7 +115,7 @@ public class PropertiesRoleMappingListener implements 
LifecycleListener {
 is = context.getServletContext().getResourceAsStream(path);
 } else {
 try {
-is = 
ConfigFileLoader.getSource().getResource(roleMappingFile).getInputStream();
+is = ConfigFileLoader.getInputStream(roleMappingFile);
 } catch (FileNotFoundException e1) {
 is = null;
 } catch (IOException e2) {


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



[tomcat] 01/02: Add BZ issue ID

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4480ff33ff30413993c2773564164f72ae07b76d
Author: Michael Osipov 
AuthorDate: Thu Jun 29 11:22:38 2023 +0200

Add BZ issue ID
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e28909a12b..605533ba40 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,7 +108,8 @@
   
 
   
-Add org.apache.catalina.core.ContextNamingInfoListener,
+59232: Add
+org.apache.catalina.core.ContextNamingInfoListener,
 a listener which creates context naming information environment 
entries.
 (michaelo)
   


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



[tomcat] 01/02: Add BZ issue ID

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit d936b7058990a749414161fb38250cca9593669e
Author: Michael Osipov 
AuthorDate: Thu Jun 29 11:22:38 2023 +0200

Add BZ issue ID
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a47a8898d1..e8934b7e27 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,7 +108,8 @@
   
 
   
-Add org.apache.catalina.core.ContextNamingInfoListener,
+59232: Add
+org.apache.catalina.core.ContextNamingInfoListener,
 a listener which creates context naming information environment 
entries.
 (michaelo)
   


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



[tomcat] 02/02: Bug 66665: Provide option to supply role mapping from a properties file

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 5ae93dda3d7e2834666f9c223dcf90db830c2193
Author: Michael Osipov 
AuthorDate: Fri Jun 23 15:07:25 2023 +0200

Bug 5: Provide option to supply role mapping from a properties file
---
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 391 insertions(+)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index 98accac8e3..47ccb88279 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -173,6 +173,13 @@ noPluggabilityServletContext.notAllowed=Section 4.4 of the 
Servlet 3.0 specifica
 
 pushBuilder.noPath=It is illegal to call push() before setting a path
 
+propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
+propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
+propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
+propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
+propertiesRoleMappingListener.linkedRole=Successfully linked application role 
[{0}] to technical role [{1}]
+propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
+
 standardContext.applicationListener=Error configuring application listener of 
class [{0}]
 standardContext.applicationSkipped=Skipped installing application listeners 
due to previous error(s)
 standardContext.backgroundProcess.instanceManager=Exception processing 
instance manager [{0}] background process
diff --git a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java 
b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
new file mode 100644
index 00..60b135d27f
--- /dev/null
+++ b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Properties;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.file.ConfigFileLoader;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * Implementation of {@code LifecycleListener} that will populate the 
context's role mapping from a properties file.
+ * 
+ * This listener must only be nested within {@link Context} elements.
+ * 
+ * The keys represent application roles (e.g., admin, user, uservisor, etc.) 
while the values represent technical roles
+ * (e.g., DNs, SIDs, UUIDs, etc.). A key can also be prefixed if, e.g., the 
properties file contains generic
+ * application configuration as well: {@code app-roles.}.
+ * 
+ * Note: The default value for the {@code roleMappingFile} is {@code 
webapp:/WEB-INF/role-mapping.properties}.
+ */
+public class PropertiesRoleMappingListener implements LifecycleListener {
+
+private static final String WEBAPP_PROTOCOL = "webapp:";

[tomcat] branch 8.5.x updated (54ff8b3240 -> 5ae93dda3d)

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 54ff8b3240 Improve Javadoc
 new d936b70589 Add BZ issue ID
 new 5ae93dda3d Bug 5: Provide option to supply role mapping from a 
properties file

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   9 +-
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 393 insertions(+), 1 deletion(-)
 create mode 100644 
java/org/apache/catalina/core/PropertiesRoleMappingListener.java
 create mode 100644 
test/org/apache/catalina/core/TestPropertiesRoleMappingListener.java
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/prefixed-role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/prefixed-role-mapping.properties
 create mode 100644 test/webapp-role-mapping/WEB-INF/role-mapping.properties
 create mode 100644 test/webapp-role-mapping/admin
 create mode 100644 test/webapp-role-mapping/unmapped
 create mode 100644 test/webapp-role-mapping/user


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



[tomcat] branch 9.0.x updated (b00c5c80b4 -> e393ce35cb)

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from b00c5c80b4 Improve Javadoc
 new 4480ff33ff Add BZ issue ID
 new e393ce35cb Bug 5: Provide option to supply role mapping from a 
properties file

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   9 +-
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 393 insertions(+), 1 deletion(-)
 create mode 100644 
java/org/apache/catalina/core/PropertiesRoleMappingListener.java
 create mode 100644 
test/org/apache/catalina/core/TestPropertiesRoleMappingListener.java
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/prefixed-role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/prefixed-role-mapping.properties
 create mode 100644 test/webapp-role-mapping/WEB-INF/role-mapping.properties
 create mode 100644 test/webapp-role-mapping/admin
 create mode 100644 test/webapp-role-mapping/unmapped
 create mode 100644 test/webapp-role-mapping/user


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



[tomcat] 02/02: Bug 66665: Provide option to supply role mapping from a properties file

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e393ce35cb769c3e54d0904db3ec349efb53ffbc
Author: Michael Osipov 
AuthorDate: Fri Jun 23 15:07:25 2023 +0200

Bug 5: Provide option to supply role mapping from a properties file
---
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 391 insertions(+)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index d1a5762c84..744a93b31b 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -170,6 +170,13 @@ noPluggabilityServletContext.notAllowed=Section 4.4 of the 
Servlet 3.0 specifica
 
 pushBuilder.noPath=It is illegal to call push() before setting a path
 
+propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
+propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
+propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
+propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
+propertiesRoleMappingListener.linkedRole=Successfully linked application role 
[{0}] to technical role [{1}]
+propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
+
 standardContext.applicationListener=Error configuring application listener of 
class [{0}]
 standardContext.applicationSkipped=Skipped installing application listeners 
due to previous error(s)
 standardContext.backgroundProcess.instanceManager=Exception processing 
instance manager [{0}] background process
diff --git a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java 
b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
new file mode 100644
index 00..60b135d27f
--- /dev/null
+++ b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Properties;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.file.ConfigFileLoader;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * Implementation of {@code LifecycleListener} that will populate the 
context's role mapping from a properties file.
+ * 
+ * This listener must only be nested within {@link Context} elements.
+ * 
+ * The keys represent application roles (e.g., admin, user, uservisor, etc.) 
while the values represent technical roles
+ * (e.g., DNs, SIDs, UUIDs, etc.). A key can also be prefixed if, e.g., the 
properties file contains generic
+ * application configuration as well: {@code app-roles.}.
+ * 
+ * Note: The default value for the {@code roleMappingFile} is {@code 
webapp:/WEB-INF/role-mapping.properties}.
+ */
+public class PropertiesRoleMappingListener implements LifecycleListener {
+
+private static final String WEBAPP_PROTOCOL = "webapp:";

[tomcat] 01/02: Add BZ issue ID

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6e435d8ae45fbf9f35845173eddf58228153575c
Author: Michael Osipov 
AuthorDate: Thu Jun 29 11:22:38 2023 +0200

Add BZ issue ID
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 751a70e277..6d65651c81 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,7 +108,8 @@
   
 
   
-Add org.apache.catalina.core.ContextNamingInfoListener,
+59232: Add
+org.apache.catalina.core.ContextNamingInfoListener,
 a listener which creates context naming information environment 
entries.
 (michaelo)
   


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



[tomcat] branch 10.1.x updated (26555450d3 -> 6cb448a3f2)

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 26555450d3 Improve Javadoc
 new 6e435d8ae4 Add BZ issue ID
 new 6cb448a3f2 Bug 5: Provide option to supply role mapping from a 
properties file

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   9 +-
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 393 insertions(+), 1 deletion(-)
 create mode 100644 
java/org/apache/catalina/core/PropertiesRoleMappingListener.java
 create mode 100644 
test/org/apache/catalina/core/TestPropertiesRoleMappingListener.java
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/prefixed-role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/prefixed-role-mapping.properties
 create mode 100644 test/webapp-role-mapping/WEB-INF/role-mapping.properties
 create mode 100644 test/webapp-role-mapping/admin
 create mode 100644 test/webapp-role-mapping/unmapped
 create mode 100644 test/webapp-role-mapping/user


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



[tomcat] 02/02: Bug 66665: Provide option to supply role mapping from a properties file

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6cb448a3f2ac4d936a01098fb032f32cac9960e4
Author: Michael Osipov 
AuthorDate: Fri Jun 23 15:07:25 2023 +0200

Bug 5: Provide option to supply role mapping from a properties file
---
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 391 insertions(+)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index c5ab4a3506..7e419226f0 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -164,6 +164,13 @@ noPluggabilityServletContext.notAllowed=Section 4.4 of the 
Servlet 3.0 specifica
 
 pushBuilder.noPath=It is illegal to call push() before setting a path
 
+propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
+propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
+propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
+propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
+propertiesRoleMappingListener.linkedRole=Successfully linked application role 
[{0}] to technical role [{1}]
+propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
+
 standardContext.applicationListener=Error configuring application listener of 
class [{0}]
 standardContext.applicationSkipped=Skipped installing application listeners 
due to previous error(s)
 standardContext.backgroundProcess.instanceManager=Exception processing 
instance manager [{0}] background process
diff --git a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java 
b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
new file mode 100644
index 00..60b135d27f
--- /dev/null
+++ b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Properties;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.file.ConfigFileLoader;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * Implementation of {@code LifecycleListener} that will populate the 
context's role mapping from a properties file.
+ * 
+ * This listener must only be nested within {@link Context} elements.
+ * 
+ * The keys represent application roles (e.g., admin, user, uservisor, etc.) 
while the values represent technical roles
+ * (e.g., DNs, SIDs, UUIDs, etc.). A key can also be prefixed if, e.g., the 
properties file contains generic
+ * application configuration as well: {@code app-roles.}.
+ * 
+ * Note: The default value for the {@code roleMappingFile} is {@code 
webapp:/WEB-INF/role-mapping.properties}.
+ */
+public class PropertiesRoleMappingListener implements LifecycleListener {
+
+private static final String WEBAPP_PROTOCOL = "webapp:";

[tomcat] 02/02: Bug 66665: Provide option to supply role mapping from a properties file

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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

commit c8adc4c4869f432b900606ae52a89e54c324f3dd
Author: Michael Osipov 
AuthorDate: Fri Jun 23 15:07:25 2023 +0200

Bug 5: Provide option to supply role mapping from a properties file
---
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 391 insertions(+)

diff --git a/java/org/apache/catalina/core/LocalStrings.properties 
b/java/org/apache/catalina/core/LocalStrings.properties
index 66e5067aac..aa6e810ba7 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -164,6 +164,13 @@ noPluggabilityServletContext.notAllowed=Section 4.4 of the 
Servlet 3.0 specifica
 
 pushBuilder.noPath=It is illegal to call push() before setting a path
 
+propertiesRoleMappingListener.roleMappingFileNull=Role mapping file cannot be 
null
+propertiesRoleMappingListener.roleMappingFileEmpty=Role mapping file cannot be 
empty
+propertiesRoleMappingListener.roleMappingFileNotFound=Role mapping file [{0}] 
not found
+propertiesRoleMappingListener.roleMappingFileFail=Failed to load role mapping 
file [{0}]
+propertiesRoleMappingListener.linkedRole=Successfully linked application role 
[{0}] to technical role [{1}]
+propertiesRoleMappingListener.linkedRoleCount=Linked [{0}] application roles 
to technical roles
+
 standardContext.applicationListener=Error configuring application listener of 
class [{0}]
 standardContext.applicationSkipped=Skipped installing application listeners 
due to previous error(s)
 standardContext.backgroundProcess.instanceManager=Exception processing 
instance manager [{0}] background process
diff --git a/java/org/apache/catalina/core/PropertiesRoleMappingListener.java 
b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
new file mode 100644
index 00..60b135d27f
--- /dev/null
+++ b/java/org/apache/catalina/core/PropertiesRoleMappingListener.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.core;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Properties;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.file.ConfigFileLoader;
+import org.apache.tomcat.util.res.StringManager;
+
+/**
+ * Implementation of {@code LifecycleListener} that will populate the 
context's role mapping from a properties file.
+ * 
+ * This listener must only be nested within {@link Context} elements.
+ * 
+ * The keys represent application roles (e.g., admin, user, uservisor, etc.) 
while the values represent technical roles
+ * (e.g., DNs, SIDs, UUIDs, etc.). A key can also be prefixed if, e.g., the 
properties file contains generic
+ * application configuration as well: {@code app-roles.}.
+ * 
+ * Note: The default value for the {@code roleMappingFile} is {@code 
webapp:/WEB-INF/role-mapping.properties}.
+ */
+public class PropertiesRoleMappingListener implements LifecycleListener {
+
+private static final String WEBAPP_PROTOCOL = "webapp:";

[tomcat] branch main updated (d1f0c34b18 -> c8adc4c486)

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


from d1f0c34b18 Pull up as default method since it avoids API compatibility 
issues
 new ecca27f193 Add BZ issue ID
 new c8adc4c486 Bug 5: Provide option to supply role mapping from a 
properties file

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/catalina/core/LocalStrings.properties   |   7 +
 .../core/PropertiesRoleMappingListener.java| 168 +
 .../core/TestPropertiesRoleMappingListener.java| 168 +
 .../com/example/prefixed-role-mapping.properties   |   2 +
 .../classes/com/example/role-mapping.properties|   2 +
 .../WEB-INF/prefixed-role-mapping.properties   |   2 +
 .../WEB-INF/role-mapping.properties|   2 +
 test/webapp-role-mapping/admin |   1 +
 test/webapp-role-mapping/unmapped  |   1 +
 test/webapp-role-mapping/user  |   1 +
 webapps/docs/changelog.xml |   9 +-
 webapps/docs/config/listeners.xml  |  31 
 12 files changed, 393 insertions(+), 1 deletion(-)
 create mode 100644 
java/org/apache/catalina/core/PropertiesRoleMappingListener.java
 create mode 100644 
test/org/apache/catalina/core/TestPropertiesRoleMappingListener.java
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/prefixed-role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/classes/com/example/role-mapping.properties
 create mode 100644 
test/webapp-role-mapping/WEB-INF/prefixed-role-mapping.properties
 create mode 100644 test/webapp-role-mapping/WEB-INF/role-mapping.properties
 create mode 100644 test/webapp-role-mapping/admin
 create mode 100644 test/webapp-role-mapping/unmapped
 create mode 100644 test/webapp-role-mapping/user


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



[tomcat] 01/02: Add BZ issue ID

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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

commit ecca27f193585ff7b4bd17a1739fa0d59138b02c
Author: Michael Osipov 
AuthorDate: Thu Jun 29 11:22:38 2023 +0200

Add BZ issue ID
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 537749e57a..dd909b6b1a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,7 +108,8 @@
   
 
   
-Add org.apache.catalina.core.ContextNamingInfoListener,
+59232: Add
+org.apache.catalina.core.ContextNamingInfoListener,
 a listener which creates context naming information environment 
entries.
 (michaelo)
   


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



[tomcat-native] branch main updated: Bug 66666: Remove non-reachable functions from ssl.c

2023-06-29 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 2e865ff87 Bug 6: Remove non-reachable functions from ssl.c
2e865ff87 is described below

commit 2e865ff8788b3c738170713771ba5a2ec0e2e364
Author: Michael Osipov 
AuthorDate: Fri Jun 23 11:09:58 2023 +0200

Bug 6: Remove non-reachable functions from ssl.c
---
 native/include/ssl_private.h  |   1 -
 native/src/ssl.c  | 156 +-
 native/src/sslutils.c |  27 +--
 xdocs/miscellaneous/changelog.xml |   3 +
 4 files changed, 8 insertions(+), 179 deletions(-)

diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index 242ab4dd4..6c5c9d297 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -232,7 +232,6 @@ typedef struct tcn_ssl_ctxt_t tcn_ssl_ctxt_t;
 typedef struct {
 charpassword[SSL_MAX_PASSWORD_LEN];
 const char *prompt;
-tcn_callback_t cb;
 } tcn_pass_cb_t;
 
 extern tcn_pass_cb_t tcn_password_callback;
diff --git a/native/src/ssl.c b/native/src/ssl.c
index 53ae4b4a9..a1ab58fa0 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -45,8 +45,7 @@ static jclass stringClass;
 
 /*
  * supported_ssl_opts is a bitmask that contains all supported SSL_OP_*
- * options at compile-time. This is used in hasOp to determine which
- * SSL_OP_* options are available at runtime.
+ * options at compile-time.
  *
  * Note that at least up through OpenSSL 0.9.8o, checking SSL_OP_ALL will
  * return JNI_FALSE because SSL_OP_ALL is a mask that covers all bug
@@ -301,13 +300,6 @@ static apr_status_t ssl_init_cleanup(void *data)
 return APR_SUCCESS;
 ssl_initialized = 0;
 
-if (tcn_password_callback.cb.obj) {
-JNIEnv *env;
-tcn_get_java_env(&env);
-TCN_UNLOAD_CLASS(env,
- tcn_password_callback.cb.obj);
-}
-
 free_bio_methods();
 free_dh_params();
 
@@ -600,37 +592,6 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS, 
jstring engine)
 return (jint)APR_SUCCESS;
 }
 
-TCN_IMPLEMENT_CALL(jboolean, SSL, randLoad)(TCN_STDARGS, jstring file)
-{
-TCN_ALLOC_CSTRING(file);
-int r;
-UNREFERENCED(o);
-r = SSL_rand_seed(J2S(file));
-TCN_FREE_CSTRING(file);
-return r ? JNI_TRUE : JNI_FALSE;
-}
-
-TCN_IMPLEMENT_CALL(jboolean, SSL, randSave)(TCN_STDARGS, jstring file)
-{
-TCN_ALLOC_CSTRING(file);
-int r;
-UNREFERENCED(o);
-r = ssl_rand_save_file(J2S(file));
-TCN_FREE_CSTRING(file);
-return r ? JNI_TRUE : JNI_FALSE;
-}
-
-TCN_IMPLEMENT_CALL(jboolean, SSL, randMake)(TCN_STDARGS, jstring file,
-jint length, jboolean base64)
-{
-TCN_ALLOC_CSTRING(file);
-int r;
-UNREFERENCED(o);
-r = ssl_rand_make(J2S(file), length, base64);
-TCN_FREE_CSTRING(file);
-return r ? JNI_TRUE : JNI_FALSE;
-}
-
 TCN_IMPLEMENT_CALL(void, SSL, randSet)(TCN_STDARGS, jstring file)
 {
 TCN_ALLOC_CSTRING(file);
@@ -894,96 +855,6 @@ static BIO_METHOD *BIO_jbs()
 return jbs_methods;
 }
 
-TCN_IMPLEMENT_CALL(jlong, SSL, newBIO)(TCN_STDARGS, jlong pool,
-   jobject callback)
-{
-BIO *bio = NULL;
-BIO_JAVA *j;
-jclass cls;
-
-UNREFERENCED(o);
-
-if ((bio = BIO_new(BIO_jbs())) == NULL) {
-tcn_ThrowException(e, "Create BIO failed");
-goto init_failed;
-}
-j = (BIO_JAVA *)BIO_get_data(bio);
-if (j == NULL) {
-tcn_ThrowException(e, "Create BIO failed");
-goto init_failed;
-}
-j->pool = J2P(pool, apr_pool_t *);
-if (j->pool) {
-apr_pool_cleanup_register(j->pool, (const void *)bio,
-  generic_bio_cleanup,
-  apr_pool_cleanup_null);
-}
-
-cls = (*e)->GetObjectClass(e, callback);
-j->cb.mid[0] = (*e)->GetMethodID(e, cls, "write", "([B)I");
-j->cb.mid[1] = (*e)->GetMethodID(e, cls, "read",  "([B)I");
-j->cb.mid[2] = (*e)->GetMethodID(e, cls, "puts",  "(Ljava/lang/String;)I");
-j->cb.mid[3] = (*e)->GetMethodID(e, cls, "gets",  "(I)Ljava/lang/String;");
-/* TODO: Check if method id's are valid */
-j->cb.obj= (*e)->NewGlobalRef(e, callback);
-
-BIO_set_init(bio, 1);
-BIO_set_flags(bio, SSL_BIO_FLAG_CALLBACK);
-return P2J(bio);
-init_failed:
-return 0;
-}
-
-TCN_IMPLEMENT_CALL(jint, SSL, closeBIO)(TCN_STDARGS, jlong bio)
-{
-BIO *b = J2P(bio, BIO *);
-UNREFERENCED_STDARGS;
-SSL_BIO_close(b);
-return APR_SUCCESS;
-}
-
-TCN_IMPLEMENT_CALL(void, SSL, setPasswordCallback)(TCN_STDARGS,

[tomcat-native] branch 1.2.x updated: Align default pass phrase prompt with HTTPd

2023-06-26 Thread michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/1.2.x by this push:
 new 8049561c8 Align default pass phrase prompt with HTTPd
8049561c8 is described below

commit 8049561c86c3270b86dfd484fd07f1e8627d6b41
Author: Michael Osipov 
AuthorDate: Mon Jun 26 18:05:40 2023 +0200

Align default pass phrase prompt with HTTPd
---
 native/include/ssl_private.h  | 6 +++---
 xdocs/miscellaneous/changelog.xml | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index b48f7ca84..d90bc1f4b 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -171,9 +171,9 @@ extern ENGINE *tcn_ssl_engine;
 || (errnum == X509_V_ERR_CERT_UNTRUSTED) \
 || (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
 
-#define SSL_DEFAULT_PASS_PROMPT "Some of your private key files are encrypted 
for security reasons.\n"  \
-"In order to read them you have to provide the 
pass phrases.\n" \
-"Enter password :"
+#define SSL_DEFAULT_PASS_PROMPT "Some of your private key files are encrypted 
for security reasons.\n" \
+"In order to read them you have to provide the 
pass phrases.\n"\
+"Enter pass phrase:"
 
 #define SSL_CIPHERS_ALWAYS_DISABLED ("!aNULL:!eNULL:!EXP:")
 
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 2f6d3d9a8..c4dd3694b 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -32,6 +32,9 @@
 
 
   
+
+  Align default pass phrase prompt with HTTPd. (michaelo)
+
   
 
 


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



  1   2   3   4   >