• Andrew Hutchings's avatar
    MDEV-20329 Fix S3 engine OpenSSL race · 0181384a
    Andrew Hutchings authored
    With OpenSSL < 1.1 there is a potential for a race condition to occur.
    This can cause the S3 engine to crash. The workaround is to add locking
    callbacks to OpenSSL so that this doesn't happen.
    
    https://curl.haxx.se/libcurl/c/threadsafe.html
    
    There is a fix in libMariaS3 for this which when a certain flag is set
    (HAVE_CURL_OPENSSL_UNSAFE) will add the required locks.
    
    This patch adds CMake support so that the flag is set if it is found
    that Curl is compiled with an unsafe OpenSSL version. For example Ubuntu
    16.04 with libcurl4-openssl-dev.
    0181384a
CMakeLists.txt 5.46 KB