This is an automated email from the ASF dual-hosted git repository. michaelo 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 745455f12 Fix a crash on Windows in SSLContext.setCACertificate() 745455f12 is described below commit 745455f127e3181c75f694d5821eead9d5ab4c00 Author: Michael Osipov <micha...@apache.org> AuthorDate: Thu May 16 17:48:26 2024 +0200 Fix a crash on Windows in SSLContext.setCACertificate() --- native/src/sslcontext.c | 2 +- xdocs/miscellaneous/changelog.xml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c index 9fbe7a19b..72feb4324 100644 --- a/native/src/sslcontext.c +++ b/native/src/sslcontext.c @@ -708,7 +708,7 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext, setCACertificate)(TCN_STDARGS, SSL_CTX_set_client_CA_list(c->ctx, ca_certs); } else { - if (!SSL_add_file_cert_subjects_to_stack(ca_certs, J2S(file))) + if (file != NULL && !SSL_add_file_cert_subjects_to_stack(ca_certs, J2S(file))) ca_certs = NULL; } if (ca_certs == NULL && c->verify_mode == SSL_CVERIFY_REQUIRE) { diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml index 5d16781b6..5ee7eacf0 100644 --- a/xdocs/miscellaneous/changelog.xml +++ b/xdocs/miscellaneous/changelog.xml @@ -33,6 +33,13 @@ </section> <section name="Changes in 2.0.8"> <changelog> + <fix> + Fix a crash on Windows when <code>SSLContext.setCACertificate()</code> + is invoked with a <code>null</code> value for <code>caCertificateFile</code> + and a non-<code>null</code> value for <code>caCertificatePath</code> + until properly addressed with + https://github.com/openssl/openssl/issues/24416. (michaelo) + </fix> </changelog> </section> <section name="Changes in 2.0.7"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org