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 47b8780cc Remove dead code
47b8780cc is described below
commit 47b8780cc5cf354aa98d8f61b13e3586f212db57
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Aug 27 09:57:24 2026 +0100
Remove dead code
---
native/include/ssl_private.h | 2 --
native/src/sslcontext.c | 20 --------------------
xdocs/miscellaneous/changelog.xml | 3 +++
3 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/native/include/ssl_private.h b/native/include/ssl_private.h
index 132866c1d..7c6fd043b 100644
--- a/native/include/ssl_private.h
+++ b/native/include/ssl_private.h
@@ -261,8 +261,6 @@ struct tcn_ssl_ctxt_t {
BIO *bio_os;
BIO *bio_is;
- unsigned char context_id[SHA_DIGEST_LENGTH];
-
int protocol;
/* we are one or the other */
int mode;
diff --git a/native/src/sslcontext.c b/native/src/sslcontext.c
index 9365cdd3e..3ed9629a0 100644
--- a/native/src/sslcontext.c
+++ b/native/src/sslcontext.c
@@ -202,10 +202,6 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, make)(TCN_STDARGS,
jlong pool,
/* Longer session timeout */
SSL_CTX_set_timeout(c->ctx, 14400);
- EVP_Digest((const unsigned char *)SSL_DEFAULT_VHOST_NAME,
- (unsigned long)((sizeof SSL_DEFAULT_VHOST_NAME) - 1),
- &(c->context_id[0]), NULL, EVP_sha1(), NULL);
-
/* Set default Certificate verification level
* and depth for the Client Authentication
*/
@@ -253,22 +249,6 @@ TCN_IMPLEMENT_CALL(jint, SSLContext, free)(TCN_STDARGS,
jlong ctx)
return apr_pool_cleanup_run(c->pool, c, ssl_context_cleanup);
}
-TCN_IMPLEMENT_CALL(void, SSLContext, setContextId)(TCN_STDARGS, jlong ctx,
- jstring id)
-{
- tcn_ssl_ctxt_t *c = J2P(ctx, tcn_ssl_ctxt_t *);
- TCN_ALLOC_CSTRING(id);
-
- TCN_ASSERT(ctx != 0);
- UNREFERENCED(o);
- if (J2S(id)) {
- EVP_Digest((const unsigned char *)J2S(id),
- (unsigned long)strlen(J2S(id)),
- &(c->context_id[0]), NULL, EVP_sha1(), NULL);
- }
- TCN_FREE_CSTRING(id);
-}
-
TCN_IMPLEMENT_CALL(void, SSLContext, setBIO)(TCN_STDARGS, jlong ctx,
jlong bio, jint dir)
{
diff --git a/xdocs/miscellaneous/changelog.xml
b/xdocs/miscellaneous/changelog.xml
index 004efd3ae..a728f60d4 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -61,6 +61,9 @@
Java long) rather than a 32-bit unsigned int (represented by a Java
int).
(markt)
</fix>
+ <scode>
+ Remove unused code. (markt)
+ </scode>
</changelog>
</section>
<section name="2.0.15" rtext="2026-06-15">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]