(tomcat) branch 11.0.x updated: Fix OpenSSL-FFM with client certs with multiple OCSP responders

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178656798889.2803040.17196028758832937173@gitbox3-he-fi.apache.org>
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 dc43ddd8d0 Fix OpenSSL-FFM with client certs with multiple OCSP responders
dc43ddd8d0 is described below

commit dc43ddd8d08e16c313ae5b659eb801cb176db489
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 12 21:46:44 2026 +0100

    Fix OpenSSL-FFM with client certs with multiple OCSP responders
---
 .../apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java | 12 ++++++++++--
 webapps/docs/changelog.xml                                   |  8 ++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index 1fd3d6b943..0d07a86d4d 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -1277,11 +1277,19 @@ public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolIn
     private static final byte[] OCSP_OID = { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01 };
 
     private static void parseOCSPURLs(Asn1Parser parser, ArrayList<String> urls) {
+        // See RFC 5280, section 4.2.2.1 for format
+        // Outer sequence
+        int tag = parser.peekTag();
+        if (tag == ASN1_SEQUENCE) {
+            parser.parseTag(ASN1_SEQUENCE);
+            parser.parseFullLength();
+        }
+        // Iterate over nested sequences
         while (!parser.eof()) {
-            int tag = parser.peekTag();
+            tag = parser.peekTag();
             if (tag == ASN1_SEQUENCE) {
                 parser.parseTag(ASN1_SEQUENCE);
-                parser.parseFullLength();
+                parser.parseLength();
             } else if (tag == ASN1_OID) {
                 parser.parseTag(ASN1_OID);
                 int oidLen = parser.parseLength();
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 842c300773..e8720d622d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -108,6 +108,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 11.0.26 (markt)" rtext="in development">
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        Fix parsing of client certificates that specify more than one OCSP
+        responder for configurations that use OpenSSL-FFM. (markt)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 11.0.25 (markt)" rtext="release in progress">
   <subsection name="Catalina">
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.