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/01/08 17:49:49 UTC

(tomcat-native) branch 1.3.x updated: Fix a compilation warning

This is an automated email from the ASF dual-hosted git repository.

markt 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 c65d6c9e9 Fix a compilation warning
c65d6c9e9 is described below

commit c65d6c9e95b994b9d7b4161226d173ca61b23b04
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 8 17:48:19 2026 +0000

    Fix a compilation warning
---
 native/src/sslutils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index 8637641fe..a4518f404 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -1043,7 +1043,7 @@ static int process_ocsp_response(OCSP_REQUEST *ocsp_req, OCSP_RESPONSE *ocsp_res
     OCSP_CERTID *certid;
     ASN1_GENERALIZEDTIME *thisupd;
     ASN1_GENERALIZEDTIME *nextupd;
-    STACK_OF(X509) *certStack;
+    const STACK_OF(X509) *certStack;
 
     r = OCSP_response_status(ocsp_resp);
 
@@ -1059,7 +1059,8 @@ static int process_ocsp_response(OCSP_REQUEST *ocsp_req, OCSP_RESPONSE *ocsp_res
     }
 
     certStack = OCSP_resp_get0_certs(bs);
-    if (OCSP_basic_verify(bs, certStack, X509_STORE_CTX_get0_store(ctx), verifyFlags) <= 0) {
+    // Cast to non-const pointer is OK here since OCSP_basic_verify does not modify the provided certs
+    if (OCSP_basic_verify(bs, (STACK_OF(X509) *)certStack, X509_STORE_CTX_get0_store(ctx), verifyFlags) <= 0) {
         X509_STORE_CTX_set_error(ctx, X509_V_ERR_OCSP_SIGNATURE_FAILURE);
         o = OCSP_STATUS_UNKNOWN;
         goto clean_bs;


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