This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch 1.2.x
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
The following commit(s) were added to refs/heads/1.2.x by this push:
new de660b456 Remove an unreachable if condition around CRLs in
sslcontext.c
de660b456 is described below
commit de660b456ec6efdbc03e5c1e7324449756764481
Author: Michael Osipov <[email protected]>
AuthorDate: Fri Oct 27 12:52:19 2023 +0200
Remove an unreachable if condition around CRLs in sslcontext.c
SSL_CTX_get_cert_store() will never return NULL because it is initialized at
context creation time with X509_STORE_new() and unless we have set it
explicitly
to NULL with SSL_CTX_set_cert_store().
---
native/src/sslcontext.c | 7 +++----
xdocs/miscellaneous/changelog.xml | 3 +++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 2cde86087..646577e72 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -718,10 +718,9 @@ TCN_IMPLEMENT_CALL(jboolean, SSLContext,
setCARevocation)(TCN_STDARGS, jlong ctx
return JNI_FALSE;
}
- if (!c->crl) {
- if ((c->crl = SSL_CTX_get_cert_store(c->ctx)) == NULL)
- goto cleanup;
- }
+ if (!c->crl)
+ c->crl = SSL_CTX_get_cert_store(c->ctx);
+
if (J2S(file)) {
lookup = X509_STORE_add_lookup(c->crl, X509_LOOKUP_file());
if (lookup == NULL) {
diff --git a/xdocs/miscellaneous/changelog.xml
b/xdocs/miscellaneous/changelog.xml
index 5e3f2ae8f..a7462ec00 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -41,6 +41,9 @@
<fix>
Fix version set in DLL header on Windows. (michaelo)
</fix>
+ <update>
+ Remove an unreachable if condition around CRLs in sslcontext.c.
(michaelo)
+ </update>
</changelog>
</section>
<section name="Changes in 1.2.39">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]