This is an automated email from the ASF dual-hosted git repository.
remm 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 305f9a2da5 69607: Allow failed initialization of MD5
305f9a2da5 is described below
commit 305f9a2da51854a3ea2aed46739a9cc8de21e2bf
Author: remm <[email protected]>
AuthorDate: Tue Mar 11 22:47:29 2025 +0100
69607: Allow failed initialization of MD5
Based on code submitted by Shivam Verma
---
.../apache/tomcat/util/security/ConcurrentMessageDigest.java | 11 +++++++++--
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
b/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
index c59a0fe8ea..45dc4ae48c 100644
--- a/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
+++ b/java/org/apache/tomcat/util/security/ConcurrentMessageDigest.java
@@ -23,6 +23,8 @@ import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
@@ -33,6 +35,7 @@ import org.apache.tomcat.util.res.StringManager;
public class ConcurrentMessageDigest {
private static final StringManager sm =
StringManager.getManager(ConcurrentMessageDigest.class);
+ private static final Log log =
LogFactory.getLog(ConcurrentMessageDigest.class);
private static final String MD5 = "MD5";
private static final String SHA1 = "SHA-1";
@@ -46,10 +49,14 @@ public class ConcurrentMessageDigest {
}
static {
+ // Init commonly used algorithms
try {
- // Init commonly used algorithms
init(MD5);
- init(SHA1);
+ } catch (NoSuchAlgorithmException e) {
+ log.warn(sm.getString("concurrentMessageDigest.noDigest"), e);
+ }
+ try {
+ init(SHA1);
} catch (NoSuchAlgorithmException e) {
throw new
IllegalArgumentException(sm.getString("concurrentMessageDigest.noDigest"), e);
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f5b04a3e6b..819fa48462 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -130,6 +130,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <bug>69607</bug>: Allow failed initialization of MD5. Based on code
+ submitted by Shivam Verma. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<scode>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]