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

markt-asf 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 680f4b42f Remove unused code
680f4b42f is described below

commit 680f4b42fd532bd426f2d14a5125a7f5134415db
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Aug 27 10:17:24 2026 +0100

    Remove unused code
---
 native/include/ssl_private.h | 3 +--
 native/src/ssl.c             | 2 --
 native/src/sslcontext.c      | 4 ----
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index 6c6165789..0d3c2a5f2 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -259,8 +259,7 @@ struct tcn_ssl_ctxt_t {
 
     /* certificate revocation list */
     X509_STORE      *crl;
-    /* pointer to the context verify store */
-    X509_STORE      *store;
+
     X509            *certs[SSL_AIDX_MAX];
     EVP_PKEY        *keys[SSL_AIDX_MAX];
 
diff --git a/native/src/ssl.c b/native/src/ssl.c
index 3995cbbf8..9c5b08c50 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -1056,8 +1056,6 @@ TCN_IMPLEMENT_CALL(void, SSL, setVerify)(TCN_STDARGS, 
jlong ssl,
     if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
         (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
         verify |= SSL_VERIFY_PEER;
-    if (!c->store)
-        c->store = SSL_CTX_get_cert_store(c->ctx);
 
     SSL_set_verify(ssl_, verify, SSL_callback_SSL_verify);
 }
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 3970ea8f8..13960ca1c 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -35,7 +35,6 @@ static apr_status_t ssl_context_cleanup(void *data)
     if (c) {
         int i;
         c->crl = NULL;
-        c->store = NULL;
         if (c->ctx)
             SSL_CTX_free(c->ctx);
         c->ctx = NULL;
@@ -559,7 +558,6 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, 
setCACertificate)(TCN_STDARGS,
         rv = JNI_FALSE;
         goto cleanup;
     }
-    c->store = SSL_CTX_get_cert_store(c->ctx);
     if (c->mode) {
         STACK_OF(X509_NAME) *ca_certs;
         ca_certs = SSL_CTX_get_client_CA_list(c->ctx);
@@ -630,8 +628,6 @@ TCN_IMPLEMENT_CALL(void, SSLContext, 
setVerify)(TCN_STDARGS, jlong ctx,
     if ((c->verify_mode == SSL_CVERIFY_OPTIONAL) ||
         (c->verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
         verify |= SSL_VERIFY_PEER;
-    if (!c->store)
-        c->store = SSL_CTX_get_cert_store(c->ctx);
 
     SSL_CTX_set_verify(c->ctx, verify, SSL_callback_SSL_verify);
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to