You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2016/02/18 08:12:51 UTC

svn commit: r1731004 - in /tomcat/native/trunk: native/src/ssl.c xdocs/miscellaneous/changelog.xml

Author: rjung
Date: Thu Feb 18 07:12:51 2016
New Revision: 1731004

URL: http://svn.apache.org/viewvc?rev=1731004&view=rev
Log:
BZ 58566: Native function "versionString()"
and for OpenSSL 1.1.0 also "version()"
(both in in ssl.c) now return the OpenSSL
run time version, not the compile time version.

Modified:
    tomcat/native/trunk/native/src/ssl.c
    tomcat/native/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/native/trunk/native/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1731004&r1=1731003&r2=1731004&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/ssl.c (original)
+++ tomcat/native/trunk/native/src/ssl.c Thu Feb 18 07:12:51 2016
@@ -267,13 +267,21 @@ DH *SSL_get_dh_params(unsigned keylen)
 TCN_IMPLEMENT_CALL(jint, SSL, version)(TCN_STDARGS)
 {
     UNREFERENCED_STDARGS;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
     return OPENSSL_VERSION_NUMBER;
+#else
+    return OpenSSL_version_num();
+#endif
 }
 
 TCN_IMPLEMENT_CALL(jstring, SSL, versionString)(TCN_STDARGS)
 {
     UNREFERENCED(o);
-    return AJP_TO_JSTRING(OPENSSL_VERSION_TEXT);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    return AJP_TO_JSTRING(SSLeay_version(SSLEAY_VERSION));
+#else
+    return AJP_TO_JSTRING(OpenSSL_version(OPENSSL_VERSION));
+#endif
 }
 
 /*

Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/xdocs/miscellaneous/changelog.xml?rev=1731004&r1=1731003&r2=1731004&view=diff
==============================================================================
--- tomcat/native/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/trunk/xdocs/miscellaneous/changelog.xml Thu Feb 18 07:12:51 2016
@@ -41,6 +41,12 @@
       default. It can be turned off using
       <code>--disable-openssl-version-check</code>. (rjung)
     </update>
+    <fix>
+      <bug>58566</bug>: Native function <code>versionString()</code> and
+      for OpenSSL 1.1.0 also <code>version()</code> (both in in ssl.c) now
+      return the OpenSSL run time version, not the compile time version.
+      (rjung)
+    </fix>
   </changelog>
 </section>
 <section name="Changes in 1.2.4">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org