[VOTE] Release Apache Tomcat Native 1.2.31

2021-08-26 Thread Mark Thomas

Version 1.2.31 includes the following changes compared to 1.2.30

- Build an issue when building with OpenSSL 3.0.0

- Clean up remaining reference to pkg-config

The proposed release artefacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 1.2.31 release is
 [ ] Stable, go ahead and release
 [ ] Broken because of ...

Thanks,

Mark


[1]
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.2.31
[2]
https://gitbox.apache.org/repos/asf?p=tomcat-native.git;a=commit;h=7e16cd817767bfc1be9fd854728d97641928702f

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



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

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new f22238b  Increment version number ready for next development cycle
f22238b is described below

commit f22238bdbdcd8d7fe7e9316ba360d6bfb6dbee88
Author: Mark Thomas 
AuthorDate: Thu Aug 26 17:01:49 2021 +0100

Increment version number ready for next development cycle
---
 build.properties.default  | 2 +-
 native/include/tcn_version.h  | 2 +-
 native/os/win32/libtcnative.rc| 6 +++---
 xdocs/miscellaneous/changelog.xml | 4 
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index b59dfa1..f8ba663 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -18,7 +18,7 @@
 # - Version Control Flags -
 version.major=1
 version.minor=2
-version.build=31
+version.build=32
 version.patch=0
 version.suffix=-dev
 
diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index 742ef0d..6308818 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -63,7 +63,7 @@ extern "C" {
 #define TCN_MINOR_VERSION   2
 
 /** patch level */
-#define TCN_PATCH_VERSION   31
+#define TCN_PATCH_VERSION   32
 
 /**
  *  This symbol is defined for internal, "development" copies of TCN. This
diff --git a/native/os/win32/libtcnative.rc b/native/os/win32/libtcnative.rc
index f05d981..3cec9c6 100644
--- a/native/os/win32/libtcnative.rc
+++ b/native/os/win32/libtcnative.rc
@@ -20,7 +20,7 @@ LANGUAGE 0x9,0x1
  "See the License for the specific language governing " \
  "permissions and limitations under the License."
 
-#define TCN_VERSION "1.2.31"
+#define TCN_VERSION "1.2.32"
 1000 ICON "apache.ico"
 
 1001 DIALOGEX 0, 0, 252, 51
@@ -36,8 +36,8 @@ BEGIN
 END
 
 1 VERSIONINFO
- FILEVERSION 1,2,31,0
- PRODUCTVERSION 1,2,31,0
+ FILEVERSION 1,2,32,0
+ PRODUCTVERSION 1,2,32,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 04a9a5f..14f4906 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -34,6 +34,10 @@
   This is the Changelog for Tomcat Native 1.2.
   
 
+
+  
+  
+
 
   
 

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



svn commit: r49641 - /release/tomcat/tomcat-connectors/native/1.2.28/

2021-08-26 Thread markt
Author: markt
Date: Thu Aug 26 15:56:42 2021
New Revision: 49641

Log:
Drop Tomcat Native 1.2.28 from mirrors

Removed:
release/tomcat/tomcat-connectors/native/1.2.28/


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



svn commit: r49640 - in /dev/tomcat/tomcat-connectors/native/1.2.31: ./ binaries/ source/

2021-08-26 Thread markt
Author: markt
Date: Thu Aug 26 15:56:11 2021
New Revision: 49640

Log:
Upload Tomcat Native 1.2.31 for voting

Added:
dev/tomcat/tomcat-connectors/native/1.2.31/
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip
   (with props)

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.asc

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.sha512

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip
   (with props)

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip.asc

dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip.sha512
dev/tomcat/tomcat-connectors/native/1.2.31/source/

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-src.tar.gz
   (with props)

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-src.tar.gz.asc

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-src.tar.gz.sha512

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-win32-src.zip
   (with props)

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-win32-src.zip.asc

dev/tomcat/tomcat-connectors/native/1.2.31/source/tomcat-native-1.2.31-win32-src.zip.sha512

Added: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip
==
Binary file - no diff available.

Propchange: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip
--
svn:executable = *

Propchange: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip
--
svn:mime-type = application/octet-stream

Added: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.asc
==
--- 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.asc
 (added)
+++ 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.asc
 Thu Aug 26 15:56:11 2021
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Comment: GPGTools - http://gpgtools.org
+
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmEnuW4ACgkQEMAcWi9g
+WecZZA//S2GyJPdBCmV4ka5kRi8Yq/PMCtWyzc0kQv5riLABF85vA6ovMTuf1WOP
+amV8dn/+1b1tTMBIiofChttp7HUNf+pi9zMSmHZW3MwXGe+1yN0ZL9Pr8TrYVTBX
+shgm1oaZqWv4u22TgEL/PIRm5WYs2KwPCI0twIYakYKSNB/A3UwO9kPD2realw3d
+U+q5kLJJzKGBJV03fqQ9WJbtnIqQQBtS6wsq+o6Ru0qxqJIG63brDCJuiDrBnNFa
+tElvj2kqTL9MFPZCajXBih9Z8IJM5d5JYoVHguvZAsgrwvN+Bv2EaZpXcQvdpcK1
+Gg1tD5LQ1XRCFnwl6ucuHz7D786Kog8+l+DDawQqOG/BhyZ4h6ccWz5/HhdF1rYE
+f5ci3TJf45HyjcFeAyunWvip47G3mWo4FjQ71/f0VNebUfIQsV/mdjuVqkp7+cFc
+k7NmFLUjsqhQO5Q2KiswFfx5LVPMHlXJ7/YQYkoRyvIm/d6hifiSPCPDNRnabxs8
+7AKsCb40P55Yl+EO/p3uku3g1n8zMjQWVIL2lz5+OvYdCCVDVb4DiCrJubd+awu9
+VeoX7C7L23nie2V53FwN0RdkM/I2n7oNJNKs9kZdf2xAV69FEufKswudj8CZn0v+
+xgnbezZxA1qFmFvlVjIS+//TeoiyGv6snRPA0MWxZZ3KLCY+eAw=
+=4VFU
+-END PGP SIGNATURE-

Added: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.sha512
==
--- 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.sha512
 (added)
+++ 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip.sha512
 Thu Aug 26 15:56:11 2021
@@ -0,0 +1 @@
+5904d33a56bab0bf7501194e026b5e7135cd2f9134ed8e9dde777a52bc6a57608cf0ffeb6f45a9430ace0afda94f05d377370ddc79083365f1da44be3e1d98a1
 *tomcat-native-1.2.31-openssl-1.1.1l-ocsp-win32-bin.zip
\ No newline at end of file

Added: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip
==
Binary file - no diff available.

Propchange: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip
--
svn:executable = *

Propchange: 
dev/tomcat/tomcat-connectors/native/1.2.31/binaries/tomcat-native-1.2.31-openssl-1.1.1l-win32-bin.zip
--
svn:mime-typ

[tomcat-native] 01/01: Tag 1.2.31

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to tag 1.2.31
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git

commit 7e16cd817767bfc1be9fd854728d97641928702f
Author: Mark Thomas 
AuthorDate: Thu Aug 26 15:53:30 2021 +0100

Tag 1.2.31
---
 build.properties.default | 2 +-
 native/include/tcn_version.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index b59dfa1..ad387ae 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -20,7 +20,7 @@ version.major=1
 version.minor=2
 version.build=31
 version.patch=0
-version.suffix=-dev
+version.suffix=
 
 # - Default Base Path for Dependent Packages -
 # Please note this path must be absolute, not relative,
diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index 742ef0d..1fe3009 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -69,7 +69,7 @@ extern "C" {
  *  This symbol is defined for internal, "development" copies of TCN. This
  *  symbol will be #undef'd for releases.
  */
-#define TCN_IS_DEV_VERSION  1
+#define TCN_IS_DEV_VERSION  0
 
 
 /** The formatted string of APU's version */

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



[tomcat-native] tag 1.2.31 created (now 7e16cd8)

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to tag 1.2.31
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git.


  at 7e16cd8  (commit)
This tag includes the following new commits:

 new 7e16cd8  Tag 1.2.31

The 1 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.


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



[tomcat] branch main updated: Add lock use similar to the memory user database

2021-08-26 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 6382197  Add lock use similar to the memory user database
6382197 is described below

commit 6382197ad57738dc06209845541c728e584f7c5a
Author: remm 
AuthorDate: Thu Aug 26 16:40:44 2021 +0200

Add lock use similar to the memory user database

Remove duplicated code, I verified the memory MBean works fine.
---
 .../catalina/mbeans/MemoryUserDatabaseMBean.java   | 277 +--
 .../catalina/mbeans/SparseUserDatabaseMBean.java   |  59 +--
 .../apache/catalina/realm/UserDatabaseRealm.java   |   2 +-
 .../catalina/users/DataSourceUserDatabase.java | 553 -
 4 files changed, 354 insertions(+), 537 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java 
b/java/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
index b8fc248..7105cf8 100644
--- a/java/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
+++ b/java/org/apache/catalina/mbeans/MemoryUserDatabaseMBean.java
@@ -16,21 +16,7 @@
  */
 package org.apache.catalina.mbeans;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.catalina.Group;
-import org.apache.catalina.Role;
-import org.apache.catalina.User;
-import org.apache.catalina.UserDatabase;
-import org.apache.tomcat.util.modeler.BaseModelMBean;
 import org.apache.tomcat.util.modeler.ManagedBean;
-import org.apache.tomcat.util.modeler.Registry;
-import org.apache.tomcat.util.res.StringManager;
 
 /**
  * A ModelMBean implementation for the
@@ -38,272 +24,11 @@ import org.apache.tomcat.util.res.StringManager;
  *
  * @author Craig R. McClanahan
  */
-public class MemoryUserDatabaseMBean extends BaseModelMBean {
-
-private static final StringManager sm = 
StringManager.getManager(MemoryUserDatabaseMBean.class);
-
-// - Instance Variables
-
-/**
- * The configuration information registry for our managed beans.
- */
-protected final Registry registry = MBeanUtils.createRegistry();
-
+public class MemoryUserDatabaseMBean extends SparseUserDatabaseMBean {
 
 /**
  * The ManagedBean information describing this MBean.
  */
 protected final ManagedBean managed = 
registry.findManagedBean("MemoryUserDatabase");
 
-
-/**
- * The ManagedBean information describing Group MBeans.
- */
-protected final ManagedBean managedGroup = 
registry.findManagedBean("Group");
-
-
-/**
- * The ManagedBean information describing Group MBeans.
- */
-protected final ManagedBean managedRole = registry.findManagedBean("Role");
-
-
-/**
- * The ManagedBean information describing User MBeans.
- */
-protected final ManagedBean managedUser = registry.findManagedBean("User");
-
-
-// - Attributes
-
-/**
- * @return the MBean Names of all groups defined in this database.
- */
-public String[] getGroups() {
-UserDatabase database = (UserDatabase) this.resource;
-List results = new ArrayList<>();
-Iterator groups = database.getGroups();
-while (groups.hasNext()) {
-Group group = groups.next();
-results.add(findGroup(group.getGroupname()));
-}
-return results.toArray(new String[0]);
-}
-
-
-/**
- * @return the MBean Names of all roles defined in this database.
- */
-public String[] getRoles() {
-UserDatabase database = (UserDatabase) this.resource;
-List results = new ArrayList<>();
-Iterator roles = database.getRoles();
-while (roles.hasNext()) {
-Role role = roles.next();
-results.add(findRole(role.getRolename()));
-}
-return results.toArray(new String[0]);
-}
-
-
-/**
- * @return the MBean Names of all users defined in this database.
- */
-public String[] getUsers() {
-UserDatabase database = (UserDatabase) this.resource;
-List results = new ArrayList<>();
-Iterator users = database.getUsers();
-while (users.hasNext()) {
-User user = users.next();
-results.add(findUser(user.getUsername()));
-}
-return results.toArray(new String[0]);
-}
-
-
-// - Operations
-
-/**
- * Create a new Group and return the corresponding MBean Name.
- *
- * @param groupname Group name of the new group
- * @param description Description of the new group
- * @return the new group object name
- */
-public String createGroup(String groupname, 

[Bug 65459] pkg-config file missing but still referenced by tcnative.spec

2021-08-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65459

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Thomas  ---
Reference removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat-native] 01/02: Remove remaining reference to pkg-config file

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit cbb8c4b8a916a6e26402854202dc78ab9664b3e8
Author: Mark Thomas 
AuthorDate: Thu Aug 26 15:35:29 2021 +0100

Remove remaining reference to pkg-config file
---
 native/build/rpm/tcnative.spec.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/native/build/rpm/tcnative.spec.in 
b/native/build/rpm/tcnative.spec.in
index 6966919..73c1642 100644
--- a/native/build/rpm/tcnative.spec.in
+++ b/native/build/rpm/tcnative.spec.in
@@ -86,7 +86,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %{_libdir}/libtcnative-%{tcnver}.*a
 %{_libdir}/libtcnative-%{tcnver}.so
-%{_libdir}/pkgconfig/tcnative-%{tcnver}.pc
 %{_includedir}/%{name}/*.h
 %doc --parents html
 

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



[tomcat-native] 02/02: Update change log.

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 12c56a45c5aab04d3324d34a9688efd3296d2db0
Author: Mark Thomas 
AuthorDate: Thu Aug 26 15:36:45 2021 +0100

Update change log.
---
 xdocs/miscellaneous/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index f43f41e..04a9a5f 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -40,6 +40,10 @@
   65441: Correct previous fix that enabled building to continue
   with OpenSSL 3.x. Patch provided by lzsiga. (markt)
 
+
+  65659: Remove remaining reference to pkg-config
+  which is no longer included in the Tomcat Native distribution. (markt)
+
   
 
 

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



[tomcat-native] branch main updated (dd269c0 -> 12c56a4)

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from dd269c0  Add best guess for 1.2.31 release date
 new cbb8c4b  Remove remaining reference to pkg-config file
 new 12c56a4  Update change log.

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:
 native/build/rpm/tcnative.spec.in | 1 -
 xdocs/miscellaneous/changelog.xml | 4 
 2 files changed, 4 insertions(+), 1 deletion(-)

-
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 best guess for 1.2.31 release date

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new dd269c0  Add best guess for 1.2.31 release date
dd269c0 is described below

commit dd269c0904776d2357d747faba3768778ee0bf3f
Author: Mark Thomas 
AuthorDate: Thu Aug 26 15:28:53 2021 +0100

Add best guess for 1.2.31 release date
---
 xdocs/index.xml | 4 ++--
 xdocs/news/2021.xml | 5 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/xdocs/index.xml b/xdocs/index.xml
index 79a77d5..52eacb2 100644
--- a/xdocs/index.xml
+++ b/xdocs/index.xml
@@ -60,10 +60,10 @@
 
 
 
-4 Jun 2021 - TC-Native-1.2.30
+31 Aug 2021 - TC-Native-1.2.31
 released
 The Apache Tomcat team is proud to announce the immediate availability of
-Tomcat Native 1.2.30 Stable.
+Tomcat Native 1.2.31 Stable.
 
 The sources and the binaries for selected platforms are available from the
 Download page.
diff --git a/xdocs/news/2021.xml b/xdocs/news/2021.xml
index e2e17e8..034dfb9 100644
--- a/xdocs/news/2021.xml
+++ b/xdocs/news/2021.xml
@@ -29,6 +29,11 @@
 
 
 
+ 
+  The Apache Tomcat team is proud to announce the immediate availability of
+  Tomcat Native 1.2.31. This is a bugfix release.
+  
+ 
  
   The Apache Tomcat team is proud to announce the immediate availability of
   Tomcat Native 1.2.30. This is a bugfix release.

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



Re: Embedded JDBC for the testsuite ?

2021-08-26 Thread Mark Thomas

On 26/08/2021 15:06, Rémy Maucherat wrote:

Hi,

Given there are components that use JDBC, they probably could use some
testsuite coverage. What would be the best option for a "real"
embedded JDBC DB for the Tomcat testsuite ? Derby ?


Derby is the one I thought of. If we needed a feature not present in 
Derby (seems unlikely) I'd look at h2 or hsqldb.


Mark

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



Embedded JDBC for the testsuite ?

2021-08-26 Thread Rémy Maucherat
Hi,

Given there are components that use JDBC, they probably could use some
testsuite coverage. What would be the best option for a "real"
embedded JDBC DB for the Tomcat testsuite ? Derby ?

Rémy

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



Re: OpenSSL security announcement - do we need a Tomcat Native release?

2021-08-26 Thread Mark Thomas




On 25/08/2021 09:08, Mark Thomas wrote:

Hi all,

OpenSSL have published a security announcement alongside the latest 
release:


https://www.openssl.org/news/secadv/20210824.txt

I'm trying to figure out if Tomcat Native is affected by these.

For CVE-2021-3711 it isn't clear to me if the issue relates to just 
stand-alone decryption or if any use of SM2 - including in a TLS cipher 
- is affected.


For CVE-2021-3712 I can't find any references in the Tomcat Native code 
to any of the functions named as potential ways to construct an 
ASN1_STRING without the NUL terminators.



Can anyone shed more light on CVE-2021-3711? We do have one fix related 
to building with OpenSSL 3.0.0 so it might be simpler to just do a 
release anyway.


Thoughts?


Give there have been no further comments on this, I am going to go ahead 
and tag 1.2.31 with a view to using that for the September release round 
for 10.1.x etc.


Mark

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



[tomcat] branch main updated: Add a UserDatabase implementation based on DataSourceRealm

2021-08-26 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 299d061  Add a UserDatabase implementation based on DataSourceRealm
299d061 is described below

commit 299d061080774d3a898335d11bc981b23caa859d
Author: remm 
AuthorDate: Thu Aug 26 15:44:36 2021 +0200

Add a UserDatabase implementation based on DataSourceRealm

The goal is to showcase the UserDatabase somewhat more, and this can use
the minimal schema from the DataSourceRealm with reduced functionality.
The MBeans are different. The problem with the current behavior is that
the whole database ends up being registered as individual MBeans.
There's a new MBean that only uses operations. The MBeans from the
memory UserDatabase are still there, but they are only populated on
demand (however, guis often pull the attributes that populate them) and
they are unregistered when saving back.
Make related changes to the realm and its custom principal so that the
results are as dynamic as expected. Add an option for things to be more
static.
Will look into the ReentrantReadWriteLock that is used in the memory
UserDatabase.
The documentation itself will be straightforward.
---
 .../mbeans/DataSourceUserDatabaseMBean.java|  360 +
 .../apache/catalina/mbeans/LocalStrings.properties |1 +
 java/org/apache/catalina/mbeans/MBeanUtils.java|   30 +
 .../catalina/mbeans/SparseUserDatabaseMBean.java   |  369 +
 .../apache/catalina/realm/UserDatabaseRealm.java   |   63 +-
 .../catalina/users/DataSourceUserDatabase.java | 1405 
 .../users/DataSourceUserDatabaseFactory.java   |  163 +++
 java/org/apache/catalina/users/GenericGroup.java   |   10 +
 java/org/apache/catalina/users/GenericRole.java|   10 +
 java/org/apache/catalina/users/GenericUser.java|   10 +
 .../apache/catalina/users/LocalStrings.properties  |2 +
 .../apache/catalina/users/SparseUserDatabase.java  |   29 +
 .../apache/catalina/users/mbeans-descriptors.xml   |  346 +
 webapps/docs/changelog.xml |   10 +
 webapps/docs/config/realm.xml  |8 +
 15 files changed, 2813 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/DataSourceUserDatabaseMBean.java 
b/java/org/apache/catalina/mbeans/DataSourceUserDatabaseMBean.java
new file mode 100644
index 000..86f78ad
--- /dev/null
+++ b/java/org/apache/catalina/mbeans/DataSourceUserDatabaseMBean.java
@@ -0,0 +1,360 @@
+/*
+ * 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.mbeans;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.catalina.Group;
+import org.apache.catalina.Role;
+import org.apache.catalina.User;
+import org.apache.catalina.UserDatabase;
+import org.apache.tomcat.util.modeler.BaseModelMBean;
+import org.apache.tomcat.util.modeler.ManagedBean;
+import org.apache.tomcat.util.modeler.Registry;
+
+/**
+ * A ModelMBean implementation for the
+ * org.apache.catalina.users.DataSourceUserDatabase component.
+ *
+ * @author Craig R. McClanahan
+ */
+public class DataSourceUserDatabaseMBean extends BaseModelMBean {
+
+// - Instance Variables
+
+/**
+ * The configuration information registry for our managed beans.
+ */
+protected final Registry registry = MBeanUtils.createRegistry();
+
+
+/**
+ * The ManagedBean information describing this MBean.
+ */
+protected final ManagedBean managed = 
registry.findManagedBean("DataSourceUserDatabase");
+
+
+// - Attributes
+
+/**
+ * @return the names of all groups defined in this database.
+ */
+public String[] getGroups() {
+UserDatabase database = (UserDatabase) this.resource;
+List results = new ArrayList<>();
+Iterator groups = database.getGroups();
+while (groups.hasNext()) {
+Group group = groups.n

[tomcat] branch 8.5.x updated: Fix Javadoc warnings for Servlet API when building with Java 16

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 3493398  Fix Javadoc warnings for Servlet API when building with Java 
16
3493398 is described below

commit 349339874558de22a046fd0bdb002d179aab367f
Author: Mark Thomas 
AuthorDate: Thu Aug 26 11:45:09 2021 +0100

Fix Javadoc warnings for Servlet API when building with Java 16
---
 java/javax/servlet/AsyncContext.java   | 58 ++-
 java/javax/servlet/MultipartConfigElement.java | 50 -
 java/javax/servlet/Registration.java   | 11 +++
 java/javax/servlet/ServletContext.java |  7 ++
 .../servlet/ServletContextAttributeEvent.java  |  7 ++
 java/javax/servlet/ServletRegistration.java| 40 +++
 .../servlet/ServletRequestAttributeEvent.java  |  7 ++
 java/javax/servlet/ServletSecurityElement.java | 16 -
 java/javax/servlet/SessionCookieConfig.java| 37 +-
 java/javax/servlet/SessionTrackingMode.java| 13 
 java/javax/servlet/UnavailableException.java   | 17 -
 .../servlet/descriptor/JspConfigDescriptor.java| 21 +-
 .../descriptor/JspPropertyGroupDescriptor.java | 82 +-
 .../javax/servlet/descriptor/TaglibDescriptor.java | 15 +++-
 java/javax/servlet/http/Cookie.java| 42 +--
 .../servlet/http/HttpSessionBindingEvent.java  |  8 ++-
 .../catalina/core/ApplicationMappingMatch.java | 22 ++
 17 files changed, 434 insertions(+), 19 deletions(-)

diff --git a/java/javax/servlet/AsyncContext.java 
b/java/javax/servlet/AsyncContext.java
index 2ddc1e8..30052f9 100644
--- a/java/javax/servlet/AsyncContext.java
+++ b/java/javax/servlet/AsyncContext.java
@@ -18,24 +18,52 @@ package javax.servlet;
 
 /**
  * TODO SERVLET3 - Add comments
- * @since Servlet 3.0
  */
 public interface AsyncContext {
+
+/**
+ * The attribute name for the URI of the async request
+ */
 public static final String ASYNC_REQUEST_URI =
 "javax.servlet.async.request_uri";
+
+/**
+ * The attribute name for the Context Path of the async request
+ */
 public static final String ASYNC_CONTEXT_PATH  =
 "javax.servlet.async.context_path";
+
+/**
+ * The attribute name for the Path Info of the async request
+ */
 public static final String ASYNC_PATH_INFO =
 "javax.servlet.async.path_info";
+
+/**
+ * The attribute name for the Servlet Path of the async request
+ */
 public static final String ASYNC_SERVLET_PATH =
 "javax.servlet.async.servlet_path";
+
+/**
+ * The attribute name for the Query String of the async request
+ */
 public static final String ASYNC_QUERY_STRING =
 "javax.servlet.async.query_string";
 
+/**
+ * @return a reference to the ServletRequest object
+ */
 ServletRequest getRequest();
 
+/**
+ * @return a reference to the ServletResponse object
+ */
 ServletResponse getResponse();
 
+/**
+ * @return true if the Request and Response are the original ones
+ */
 boolean hasOriginalRequestAndResponse();
 
 /**
@@ -77,15 +105,43 @@ public interface AsyncContext {
  */
 void dispatch(ServletContext context, String path);
 
+/**
+ * Completes the async request processing and closes the response stream
+ */
 void complete();
 
+/**
+ * Starts a new thread to process the asynchronous request
+ *
+ * @param run a Runnable that the new thread will run
+ */
 void start(Runnable run);
 
+/**
+ * Adds an event listener that will be called for different AsyncEvents 
fire
+ *
+ * @param listener an AsyncListener that will be called with AsyncEvent 
objects
+ */
 void addListener(AsyncListener listener);
 
+/**
+ * Adds an event listener that will be called when different AsyncEvents 
fire
+ *
+ * @param listener an AsyncListener that will be called with AsyncEvent 
objects
+ * @param request the ServletRequest that will be passed with the 
AsyncEvent
+ * @param response the ServletResponse that will be passed with the 
AsyncEvent
+ */
 void addListener(AsyncListener listener, ServletRequest request,
 ServletResponse response);
 
+/**
+ * Creates and returns an AsyncListener object
+ *
+ * @param  The type to create that extends AsyncListener
+ * @param clazz The class to instantiate to create the listener
+ * @return the newly created AsyncListener object
+ * @throws ServletException if the listener cannot be created
+ */
  T createListener(Class clazz)
 throws ServletException;
 
diff --git a/java/javax/servlet/MultipartConfigElement.java 
b/java/javax/servlet/MultipartConfigE

[tomcat] branch 9.0.x updated: Fix Javadoc warnings for Servlet API when building with Java 16

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 21a7a64  Fix Javadoc warnings for Servlet API when building with Java 
16
21a7a64 is described below

commit 21a7a64abf1c426bce2121a338c49c286ef777a5
Author: Mark Thomas 
AuthorDate: Thu Aug 26 11:45:09 2021 +0100

Fix Javadoc warnings for Servlet API when building with Java 16
---
 java/javax/servlet/AsyncContext.java   |  9 +++
 java/javax/servlet/GenericFilter.java  |  3 +
 java/javax/servlet/MultipartConfigElement.java | 50 -
 java/javax/servlet/Registration.java   | 11 +++
 java/javax/servlet/ServletContext.java |  7 ++
 .../servlet/ServletContextAttributeEvent.java  |  7 ++
 java/javax/servlet/ServletRegistration.java| 40 +++
 .../servlet/ServletRequestAttributeEvent.java  |  7 ++
 java/javax/servlet/ServletSecurityElement.java | 16 -
 java/javax/servlet/SessionCookieConfig.java| 37 +-
 java/javax/servlet/SessionTrackingMode.java| 13 
 java/javax/servlet/UnavailableException.java   | 17 -
 .../servlet/descriptor/JspConfigDescriptor.java| 21 +-
 .../descriptor/JspPropertyGroupDescriptor.java | 82 +-
 .../javax/servlet/descriptor/TaglibDescriptor.java | 15 +++-
 java/javax/servlet/http/Cookie.java| 42 +--
 java/javax/servlet/http/HttpServletRequest.java|  5 ++
 .../servlet/http/HttpSessionBindingEvent.java  |  8 ++-
 java/javax/servlet/http/MappingMatch.java  | 22 ++
 19 files changed, 394 insertions(+), 18 deletions(-)

diff --git a/java/javax/servlet/AsyncContext.java 
b/java/javax/servlet/AsyncContext.java
index 9abb6b3..61f5ff1 100644
--- a/java/javax/servlet/AsyncContext.java
+++ b/java/javax/servlet/AsyncContext.java
@@ -59,10 +59,19 @@ public interface AsyncContext {
 public static final String ASYNC_QUERY_STRING =
 "javax.servlet.async.query_string";
 
+/**
+ * @return a reference to the ServletRequest object
+ */
 ServletRequest getRequest();
 
+/**
+ * @return a reference to the ServletResponse object
+ */
 ServletResponse getResponse();
 
+/**
+ * @return true if the Request and Response are the original ones
+ */
 boolean hasOriginalRequestAndResponse();
 
 /**
diff --git a/java/javax/servlet/GenericFilter.java 
b/java/javax/servlet/GenericFilter.java
index f32ac4f..a6232a8 100644
--- a/java/javax/servlet/GenericFilter.java
+++ b/java/javax/servlet/GenericFilter.java
@@ -30,6 +30,9 @@ public abstract class GenericFilter implements Filter, 
FilterConfig, Serializabl
 
 private static final long serialVersionUID = 1L;
 
+/**
+ * The filter configuration.
+ */
 private volatile FilterConfig filterConfig;
 
 
diff --git a/java/javax/servlet/MultipartConfigElement.java 
b/java/javax/servlet/MultipartConfigElement.java
index a2c6c06..3a0952f 100644
--- a/java/javax/servlet/MultipartConfigElement.java
+++ b/java/javax/servlet/MultipartConfigElement.java
@@ -19,8 +19,11 @@ package javax.servlet;
 import javax.servlet.annotation.MultipartConfig;
 
 /**
+ * The programmatic equivalent of
+ * {@link javax.servlet.annotation.MultipartConfig} used to configure
+ * multi-part handling for a Servlet when registering a Servlet via code.
+ *
  * @since Servlet 3.0
- * TODO SERVLET3 - Add comments
  */
 public class MultipartConfigElement {
 
@@ -29,6 +32,12 @@ public class MultipartConfigElement {
 private final long maxRequestSize;// = -1;
 private final int fileSizeThreshold;// = 0;
 
+/**
+ * Create a programmatic multi-part configuration with a specific location
+ * and defaults for the remaining configuration elements.
+ *
+ * @param location  The temporary location to store files
+ */
 public MultipartConfigElement(String location) {
 // Keep empty string default if location is null
 if (location != null) {
@@ -41,6 +50,17 @@ public class MultipartConfigElement {
 this.fileSizeThreshold = 0;
 }
 
+/**
+ * Create a programmatic multi-part configuration from the individual
+ * configuration elements.
+ *
+ * @param location  The temporary location to store files
+ * @param maxFileSize   The maximum permitted size for a single file
+ * @param maxRequestSizeThe maximum permitted size for a request
+ * @param fileSizeThreshold The size above which the file is save in the
+ *  temporary location rather than retained in
+ *  memory.
+ */
 public MultipartConfigElement(String location, long maxFileSize,
 long maxRequestSize, int fileSizeThreshold) {
 // Keep empty

[tomcat] branch 10.0.x updated: Fix Javadoc warnings for Servlet API when building with Java 16

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 8b60d46  Fix Javadoc warnings for Servlet API when building with Java 
16
8b60d46 is described below

commit 8b60d462c9a090755f1f0effa9657fac70dce28d
Author: Mark Thomas 
AuthorDate: Thu Aug 26 11:45:09 2021 +0100

Fix Javadoc warnings for Servlet API when building with Java 16
---
 java/jakarta/servlet/GenericFilter.java|  3 +
 java/jakarta/servlet/MultipartConfigElement.java   | 50 -
 java/jakarta/servlet/Registration.java | 11 +++
 java/jakarta/servlet/ServletContext.java   |  7 ++
 .../servlet/ServletContextAttributeEvent.java  |  7 ++
 java/jakarta/servlet/ServletRegistration.java  | 40 +++
 .../servlet/ServletRequestAttributeEvent.java  |  7 ++
 java/jakarta/servlet/ServletSecurityElement.java   | 16 -
 java/jakarta/servlet/SessionCookieConfig.java  | 37 +-
 java/jakarta/servlet/SessionTrackingMode.java  | 13 
 java/jakarta/servlet/UnavailableException.java | 17 -
 .../servlet/descriptor/JspConfigDescriptor.java| 21 +-
 .../descriptor/JspPropertyGroupDescriptor.java | 82 +-
 .../servlet/descriptor/TaglibDescriptor.java   | 15 +++-
 java/jakarta/servlet/http/Cookie.java  | 42 +--
 java/jakarta/servlet/http/HttpServlet.java |  5 +-
 java/jakarta/servlet/http/HttpServletRequest.java  |  5 ++
 .../servlet/http/HttpSessionBindingEvent.java  |  8 ++-
 java/jakarta/servlet/http/MappingMatch.java| 22 ++
 19 files changed, 389 insertions(+), 19 deletions(-)

diff --git a/java/jakarta/servlet/GenericFilter.java 
b/java/jakarta/servlet/GenericFilter.java
index 210c225..3cdb815 100644
--- a/java/jakarta/servlet/GenericFilter.java
+++ b/java/jakarta/servlet/GenericFilter.java
@@ -30,6 +30,9 @@ public abstract class GenericFilter implements Filter, 
FilterConfig, Serializabl
 
 private static final long serialVersionUID = 1L;
 
+/**
+ * The filter configuration.
+ */
 private volatile FilterConfig filterConfig;
 
 
diff --git a/java/jakarta/servlet/MultipartConfigElement.java 
b/java/jakarta/servlet/MultipartConfigElement.java
index f30101c..dfae9d6 100644
--- a/java/jakarta/servlet/MultipartConfigElement.java
+++ b/java/jakarta/servlet/MultipartConfigElement.java
@@ -19,8 +19,11 @@ package jakarta.servlet;
 import jakarta.servlet.annotation.MultipartConfig;
 
 /**
+ * The programmatic equivalent of
+ * {@link jakarta.servlet.annotation.MultipartConfig} used to configure
+ * multi-part handling for a Servlet when registering a Servlet via code.
+ *
  * @since Servlet 3.0
- * TODO SERVLET3 - Add comments
  */
 public class MultipartConfigElement {
 
@@ -29,6 +32,12 @@ public class MultipartConfigElement {
 private final long maxRequestSize;// = -1;
 private final int fileSizeThreshold;// = 0;
 
+/**
+ * Create a programmatic multi-part configuration with a specific location
+ * and defaults for the remaining configuration elements.
+ *
+ * @param location  The temporary location to store files
+ */
 public MultipartConfigElement(String location) {
 // Keep empty string default if location is null
 if (location != null) {
@@ -41,6 +50,17 @@ public class MultipartConfigElement {
 this.fileSizeThreshold = 0;
 }
 
+/**
+ * Create a programmatic multi-part configuration from the individual
+ * configuration elements.
+ *
+ * @param location  The temporary location to store files
+ * @param maxFileSize   The maximum permitted size for a single file
+ * @param maxRequestSizeThe maximum permitted size for a request
+ * @param fileSizeThreshold The size above which the file is save in the
+ *  temporary location rather than retained in
+ *  memory.
+ */
 public MultipartConfigElement(String location, long maxFileSize,
 long maxRequestSize, int fileSizeThreshold) {
 // Keep empty string default if location is null
@@ -60,6 +80,12 @@ public class MultipartConfigElement {
 }
 }
 
+/**
+ * Create a programmatic configuration from an annotation.
+ *
+ * @param annotation The source annotation to copy to create the
+ *   programmatic equivalent.
+ */
 public MultipartConfigElement(MultipartConfig annotation) {
 location = annotation.location();
 maxFileSize = annotation.maxFileSize();
@@ -67,18 +93,40 @@ public class MultipartConfigElement {
 fileSizeThreshold = annotation.fileSizeThreshold();
 }
 
+/**
+ * Obtain the location where temporary files should be stored.
+ *
+ * @return 

[tomcat] branch main updated: Fix Javadoc warnings for Servlet API when building with Java 16

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new f969a8f1 Fix Javadoc warnings for Servlet API when building with Java 
16
f969a8f1 is described below

commit f969a8f19797e41a70956a66317bdaa72a398158
Author: Mark Thomas 
AuthorDate: Thu Aug 26 11:45:09 2021 +0100

Fix Javadoc warnings for Servlet API when building with Java 16
---
 java/jakarta/servlet/GenericFilter.java|  3 +
 java/jakarta/servlet/MultipartConfigElement.java   | 50 -
 java/jakarta/servlet/Registration.java | 11 +++
 java/jakarta/servlet/ServletContext.java   |  7 ++
 .../servlet/ServletContextAttributeEvent.java  |  7 ++
 java/jakarta/servlet/ServletRegistration.java  | 40 +++
 .../servlet/ServletRequestAttributeEvent.java  |  7 ++
 java/jakarta/servlet/ServletSecurityElement.java   | 16 -
 java/jakarta/servlet/SessionCookieConfig.java  | 37 +-
 java/jakarta/servlet/SessionTrackingMode.java  | 13 
 java/jakarta/servlet/UnavailableException.java | 17 -
 .../servlet/descriptor/JspConfigDescriptor.java| 21 +-
 .../descriptor/JspPropertyGroupDescriptor.java | 82 +-
 .../servlet/descriptor/TaglibDescriptor.java   | 15 +++-
 java/jakarta/servlet/http/Cookie.java  | 16 -
 java/jakarta/servlet/http/HttpServlet.java |  5 +-
 java/jakarta/servlet/http/HttpServletRequest.java  |  5 ++
 .../servlet/http/HttpSessionBindingEvent.java  |  8 ++-
 java/jakarta/servlet/http/MappingMatch.java| 22 ++
 19 files changed, 368 insertions(+), 14 deletions(-)

diff --git a/java/jakarta/servlet/GenericFilter.java 
b/java/jakarta/servlet/GenericFilter.java
index 210c225..3cdb815 100644
--- a/java/jakarta/servlet/GenericFilter.java
+++ b/java/jakarta/servlet/GenericFilter.java
@@ -30,6 +30,9 @@ public abstract class GenericFilter implements Filter, 
FilterConfig, Serializabl
 
 private static final long serialVersionUID = 1L;
 
+/**
+ * The filter configuration.
+ */
 private volatile FilterConfig filterConfig;
 
 
diff --git a/java/jakarta/servlet/MultipartConfigElement.java 
b/java/jakarta/servlet/MultipartConfigElement.java
index f30101c..dfae9d6 100644
--- a/java/jakarta/servlet/MultipartConfigElement.java
+++ b/java/jakarta/servlet/MultipartConfigElement.java
@@ -19,8 +19,11 @@ package jakarta.servlet;
 import jakarta.servlet.annotation.MultipartConfig;
 
 /**
+ * The programmatic equivalent of
+ * {@link jakarta.servlet.annotation.MultipartConfig} used to configure
+ * multi-part handling for a Servlet when registering a Servlet via code.
+ *
  * @since Servlet 3.0
- * TODO SERVLET3 - Add comments
  */
 public class MultipartConfigElement {
 
@@ -29,6 +32,12 @@ public class MultipartConfigElement {
 private final long maxRequestSize;// = -1;
 private final int fileSizeThreshold;// = 0;
 
+/**
+ * Create a programmatic multi-part configuration with a specific location
+ * and defaults for the remaining configuration elements.
+ *
+ * @param location  The temporary location to store files
+ */
 public MultipartConfigElement(String location) {
 // Keep empty string default if location is null
 if (location != null) {
@@ -41,6 +50,17 @@ public class MultipartConfigElement {
 this.fileSizeThreshold = 0;
 }
 
+/**
+ * Create a programmatic multi-part configuration from the individual
+ * configuration elements.
+ *
+ * @param location  The temporary location to store files
+ * @param maxFileSize   The maximum permitted size for a single file
+ * @param maxRequestSizeThe maximum permitted size for a request
+ * @param fileSizeThreshold The size above which the file is save in the
+ *  temporary location rather than retained in
+ *  memory.
+ */
 public MultipartConfigElement(String location, long maxFileSize,
 long maxRequestSize, int fileSizeThreshold) {
 // Keep empty string default if location is null
@@ -60,6 +80,12 @@ public class MultipartConfigElement {
 }
 }
 
+/**
+ * Create a programmatic configuration from an annotation.
+ *
+ * @param annotation The source annotation to copy to create the
+ *   programmatic equivalent.
+ */
 public MultipartConfigElement(MultipartConfig annotation) {
 location = annotation.location();
 maxFileSize = annotation.maxFileSize();
@@ -67,18 +93,40 @@ public class MultipartConfigElement {
 fileSizeThreshold = annotation.fileSizeThreshold();
 }
 
+/**
+ * Obtain the location where temporary files should be stored.
+ *
+ * @return the locat

Re: OT: Parsing EC private keys in PEM format

2021-08-26 Thread Mark Thomas

On 25/08/2021 18:04, Christopher Schultz wrote:

Mark,

On 8/25/21 10:28, Mark Thomas wrote:

On 25/08/2021 15:10, Christopher Schultz wrote:

All,

I'm trying to do this without looking at the code which is in Tomcat 
because I'd like to release it separately and not have to worry about 
figuring out hos to get permission, etc.


It is ALv2 so the requirements are pretty minimal. You just need to 
include a copy of the ALv2, note you based it on Apache Tomcat and 
don;t use any ASF trademarks in your product name.


Hmm. I seem to recall asking someone if I could contribute your PEMFile 
stuff to the PostgreSQL JDBC driver project (they only support 
non-encrypted DER files directly) and the reply I got was something 
along the lines of "horrific copyright violation/IP theft/good luck 
finding all the original authors and getting their permission/etc." 
(paraphrasing).


Hmm. Odd. I wonder why they said that. Do you have a public reference to 
that conversation. Obviously, any potential IP issues are a concern.


Looking at the code, I'm struggling to see where the concern would come 
from.


The original contribution was from Emmanuel. Given his work on JSign I 
have no reason to think the contribution wasn't original.


The ASN.1 parser was written from scratch by me. There are comment 
references to various specifications but whatever copyright/license they 
are under has no bearing on the copyright/licensing of the 
implementation. (And most, if not all, are RFCs.)


The other commits are essentially cosmetic / refactoring.

If they wanted to relicense the code rather than use it under the ALv2 
then I can see how they might view that as potentially difficult 
although in this instance given all the people involved are Tomcat 
committers it would likely be fairly simple (assuming all the 
contributors were happy).


Mark

-
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: Fix bug reference

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 6a4f406  Fix bug reference
6a4f406 is described below

commit 6a4f4061000e7d2843f9505520e7b3716f96a452
Author: Mark Thomas 
AuthorDate: Thu Aug 26 10:47:03 2021 +0100

Fix bug reference
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0d1db93..9ba7d76 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -9091,7 +9091,7 @@
 correctly represented. Patch provided by zikfat. (markt)
   
   
-59295: Add support for using pem encoded certificates with
+59344: Add support for using pem encoded certificates with
 JSSE SSL. Submitted by Emmanuel Bourg with additional tweaks. (remm)
   
   

-
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: Fix bug reference

2021-08-26 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 5e4fd77  Fix bug reference
5e4fd77 is described below

commit 5e4fd77acc9a882c6bdbb8d6006162515714b242
Author: Mark Thomas 
AuthorDate: Thu Aug 26 10:47:03 2021 +0100

Fix bug reference
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cd44189..4ff6ca2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -10792,7 +10792,7 @@
 correctly represented. Patch provided by zikfat. (markt)
   
   
-59295: Add support for using pem encoded certificates with
+59344: Add support for using pem encoded certificates with
 JSSE SSL. Submitted by Emmanuel Bourg with additional tweaks. (remm)
   
   

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