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 3818c368e Fix remaining deprecation warning when compiling against
OpenSSL 3.5.x
3818c368e is described below
commit 3818c368ec249a43c5cba8a4fac1382d6ee01af8
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Feb 5 15:52:04 2026 +0000
Fix remaining deprecation warning when compiling against OpenSSL 3.5.x
---
native/src/ssl.c | 6 +++++-
xdocs/miscellaneous/changelog.xml | 6 ++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/native/src/ssl.c b/native/src/ssl.c
index 23b44ce86..55301175e 100644
--- a/native/src/ssl.c
+++ b/native/src/ssl.c
@@ -1406,7 +1406,11 @@ TCN_IMPLEMENT_CALL(jlong, SSL, getTime)(TCN_STDARGS,
jlong ssl)
session = SSL_get_session(ssl_);
if (session) {
- return SSL_get_time(session);
+#if (OPENSSL_VERSION_NUMBER > 0x302FFFFFL)
+ return SSL_SESSION_get_time_ex(session);
+#else
+ return SSL_SESSION_get_time(session);
+#endif
} else {
tcn_ThrowException(e, "ssl session is null");
return 0;
diff --git a/xdocs/miscellaneous/changelog.xml
b/xdocs/miscellaneous/changelog.xml
index 2760e556a..4f7dd6216 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -183,6 +183,12 @@
Refactor extraction of ECDH curve name from the Certificate to avoid
deprecated OpenSSL methods. (markt)
</fix>
+ <fix>
+ Refactor the native implementation of <code>SSL.getTime()</code> to avoid
+ the Y2038 problem in <code>SSL_SESSION_get_time()</code> when running on
a
+ verion of OpenSSL that includes the new
+ <code>SSL_SESSION_get_time_ex()</code> method. (markt)
+ </fix>
</changelog>
</section>
<section name="1.3.4" rtext="2026-01-12">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]