You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/05/28 09:39:01 UTC
(tomcat) branch 11.0.x updated: Fix one cause of Gump failures with PQC tests
This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 f7f4915004 Fix one cause of Gump failures with PQC tests
f7f4915004 is described below
commit f7f4915004ca833a0a29b2829d6b35e7b985e680
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 28 10:38:42 2026 +0100
Fix one cause of Gump failures with PQC tests
---
java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java | 16 ++++++++++------
.../tomcat/util/net/openssl/panama/OpenSSLUtil.java | 16 ++++++++++------
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java
index b15461f742..3ddae0bc90 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLUtil.java
@@ -19,6 +19,7 @@ package org.apache.tomcat.util.net.openssl;
import java.io.IOException;
import java.security.KeyException;
import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Set;
@@ -127,10 +128,14 @@ public class OpenSSLUtil extends SSLUtilBase {
log.info(msg);
}
return null;
- } catch (KeyStoreException | KeyException | IOException e) {
- // Depending on what is presented, JSSE may also throw
- // KeyStoreException or IOException if it doesn't understand the
- // provided file.
+ } catch (KeyStoreException | KeyException | IOException | NoSuchAlgorithmException e) {
+ /*
+ * JSSE may throw any of KeyStoreException, KeyException or IOException if it does not understand the format
+ * of the provided file.
+ *
+ * If JSSE does understand the file but does not support the algorithm used then NoSuchAlgorithmException
+ * will be seen.
+ */
if (certificate.getCertificateFile() != null) {
String msg = sm.getString("openssl.nonJsseCertificate", certificate.getCertificateFile(),
certificate.getCertificateKeyFile());
@@ -139,8 +144,7 @@ public class OpenSSLUtil extends SSLUtilBase {
} else {
log.info(msg);
}
- // Assume JSSE processing of the certificate failed, try again with OpenSSL
- // without a key manager
+ // Assume JSSE processing of the certificate failed, try again with OpenSSL without a key manager.
return null;
}
throw e;
diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLUtil.java b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLUtil.java
index 1d7e768271..ba26f0c758 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLUtil.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLUtil.java
@@ -19,6 +19,7 @@ package org.apache.tomcat.util.net.openssl.panama;
import java.io.IOException;
import java.security.KeyException;
import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Set;
@@ -86,10 +87,14 @@ public class OpenSSLUtil extends SSLUtilBase {
log.info(msg);
}
return null;
- } catch (KeyStoreException | KeyException | IOException e) {
- // Depending on what is presented, JSSE may also throw
- // KeyStoreException or IOException if it doesn't understand the
- // provided file.
+ } catch (KeyStoreException | KeyException | IOException | NoSuchAlgorithmException e) {
+ /*
+ * JSSE may throw any of KeyStoreException, KeyException or IOException if it does not understand the format
+ * of the provided file.
+ *
+ * If JSSE does understand the file but does not support the algorithm used then NoSuchAlgorithmException
+ * will be seen.
+ */
if (certificate.getCertificateFile() != null) {
String msg = sm.getString("openssl.nonJsseCertificate", certificate.getCertificateFile(),
certificate.getCertificateKeyFile());
@@ -98,8 +103,7 @@ public class OpenSSLUtil extends SSLUtilBase {
} else {
log.info(msg);
}
- // Assume JSSE processing of the certificate failed, try again with OpenSSL
- // without a key manager
+ // Assume JSSE processing of the certificate failed, try again with OpenSSL without a key manager.
return null;
}
throw e;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org