This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 d58fce60d Add a NULL guard. Should never happen but just in case...
d58fce60d is described below
commit d58fce60d5333dee4be2af7d2cc804945fa73e2b
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Nov 23 14:57:23 2026 +0000
Add a NULL guard. Should never happen but just in case...
---
native/src/sslcontext.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 19c161619..fb058a7a5 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -1827,6 +1827,10 @@ static int SSL_cert_verify(X509_STORE_CTX *ctx, void
*arg) {
SSL *ssl = X509_STORE_CTX_get_ex_data(ctx,
SSL_get_ex_data_X509_STORE_CTX_idx());
tcn_ssl_ctxt_t *c = SSL_get_app_data2(ssl);
+ // Fail closed if there is no Java verifier available for this context
+ if (c == NULL || c->verifier == NULL || c->verifier_method == NULL) {
+ return 0;
+ }
// Get a stack of all certs in the chain
STACK_OF(X509) *sk = X509_STORE_CTX_get0_untrusted(ctx);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]