Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59010

Fix SSL off build, OCSPManager shouldn't be used when ssl = off

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.10
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • Security 2021-08-23, Security 2021-09-06, Security 2021-09-20, Security 2021-10-04

      When building with SSL=off, latest 4.4.4 release doesn't compile with the following error:

      src/mongo/db/db.cpp:340: error: undefined reference to 'mongo::OCSPManager::startThreadPool()'
      src/mongo/util/net/ocsp/ocsp_manager.h:49: error: undefined reference to 'mongo::OCSPManager::OCSPManager()'
      collect2: error: ld returned 1 exit status
      scons: *** [build/opt/mongo/mongod] Error 1
      scons: building terminated because of errors.
      build/opt/mongo/mongod failed: Error 1

      OCSPManager thread pool probably shouldn't be started when SSL is off, as this class is not compiled in the presence of such an option.

      Also some info here: https://developer.mongodb.com/community/forums/t/failure-to-build-mongodb-4-4-4/100231

      This is blocking Meteor build of MongoDB, as we do use a small binary without SSL for development easiness.

      The last version it was working is : MONGODB_VERSION='4.2.8'

      Original Summary

      Ssl off build fails

      Original Description

      A build of MongoDB of install-core with --ssl=off does not work due to missing ifdefs to exclude SSL related code.

            spencer.jackson@mongodb.com Spencer Jackson
            renanccastro@gmail.com Renan Castro
            0 Vote for this issue
            6 Start watching this issue