Bug #69744 ssl.cmake silently chooses bundled yassl instead of erroring for old openssl ver
Submitted: 15 Jul 2013 8:43 Modified: 16 Aug 2013 16:52
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.12 OS:Any
Assigned to: CPU Architecture:Any

[15 Jul 2013 8:43] Shane Bester
Description:
If you compile mysqld with intention of using older 0.9.8 openssl version instead of bundled yassl, the openssl is ignored if major version is 0.

It should generate an error instead of continue with bundled yassl.

How to repeat:
Read ./cmake/ssl.cmake

 IF(OPENSSL_INCLUDE_DIR AND
      OPENSSL_LIBRARY   AND
      CRYPTO_LIBRARY      AND
      OPENSSL_MAJOR_VERSION STREQUAL "1"  <-------
     )
     SET(OPENSSL_FOUND TRUE)
   ELSE()
     SET(OPENSSL_FOUND FALSE)
   ENDIF()

Suggested fix:
Issue warning or error out if an old openssl version is specified manually.
[16 Aug 2013 16:52] Paul DuBois
Noted in 5.7.2 changelog.

If the WITH_SSL CMake option was specified with an incorrect path to
the SSL installation or the path to an unsupported (too old) SSL
installation, the option was implicitly changed to the bundled value
and yaSSL was used instead. Now CMake exits with an error so the user
knows that the option value must be changed.
[27 Apr 2015 12:57] Laurynas Biveinis
commit f3b1f1fb083eba2f91a74407efae704f4c063ae6
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Mar 24 10:15:29 2015 +0100

    Patch for Bug#17162055: SSL.CMAKE SILENTLY CHOOSES BUNDLED YASSL INSTEAD OF
    ERRORING FOR OLD OPENSSL VER
    
    The problem was that if the user specified incorrect path to SSL installation,
    or if the user specified unsupported (too old) SSL installation using WITH_SSL,
    it's implicitly changed to the 'bundled' value, meaning bundled YaSSL will be
    used instead of user-specified SSL.
    
    The fix is to do not change WITH_SSL to the 'bundled' value, but rather
    exit with an error message and let the user to correct the WITH_SSL value.
    
    (cherry picked from commit c4fcbf13b6cd3f075490dc80bfd7546c5504c74f)
    
    Conflicts:
        cmake/ssl.cmake
    
    (cherry picked from commit e858eb9b5722520f3aaa445e284bba7b5882a249)