[MDEV-15848] version_ssl_library seems to be incorrect in some cases Created: 2018-04-11 Updated: 2020-08-25 Resolved: 2018-06-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | SSL |
| Affects Version/s: | 10.2.12, 10.1.31 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | ssl, variable | ||
| Issue Links: |
|
||||||||
| Description |
|
The version_ssl_library variable seems to be incorrect in some cases. For example, my RHEL 7 instance has the following OpenSSL version:
But version_ssl_library seems to refer to an older version:
I did restart mysqld to ensure that it is not using an old version of OpenSSL that has been upgraded. |
| Comments |
| Comment by Sergei Golubchik [ 2018-05-06 ] | |||||||||||||
|
How can I repeat that? What steps do I need to do to get to this output? | |||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-05-07 ] | |||||||||||||
|
To reproduce this, all I did was: 1.) Start up an RHEL 7 VM. 2.) Install the latest version of OpenSSL for that distribution, which is openssl-1.0.2k-12.el7.x86_64. 3.) Start up MariaDB. 4.) Execute the following: SHOW GLOBAL VARIABLES LIKE 'version_ssl_library'; That showed "OpenSSL 1.0.1e-fips 11 Feb 2013" as the version, even though openssl-1.0.2k-12.el7.x86_64 is installed. I'm not actually sure if this is a MariaDB issue or an OpenSSL issue. I searched for a similar string in the OpenSSL shared library, but didn't find this exact string:
| |||||||||||||
| Comment by Sergei Golubchik [ 2018-06-19 ] | |||||||||||||
|
I don't see what we can do here, it's how OpenSSL works. Symbols in libssl.so are versioned, and mysqld gets linked with the symbols of the currently installed version:
When you install 1.0.2, it has symbols both with the new and old versions, that's how shared libraries provide backward compatible functionality:
So, mysqld will be using SSLeay_version@OPENSSL_1.0.1 and it's no surprise that it will report the version as "1.0.1". In other words, if MariaDB was compiled with OpenSSL 1.0.1, after you install OpenSSL 1.0.2 it will not be using 1.0.2, it will be using 1.0.2-pretending-to-be-1.0.1 |