qtopensslqsslsocket

QSslSocket: build vs runtime versions


There is two versions of opelSsl in QT:

  1. QSslSocket::sslLibraryVersionString()
  2. QSslSocket::sslLibraryBuildVersionString()

First one show runtime used library, second show build library version... Ok, but not clearly.

  1. So, witch library (built-in or runtime) is nessesary for application?
  2. If qt have built-in openssl library, then why runtime library need?
  3. How can I determine, whitch library is used in binary file? (objdump?)

Thank you for answers.

https://doc.qt.io/qt-5/qsslsocket.html QT 5.13.0 Open ssl notworking mingw 7.3.0


Solution

  • The runtime version of OpenSSL is the version loaded at runtime. The build version of OpenSSL is the version of OpenSSL present during the build.

    Qt can be built in three ways:

    If you are using the build of Qt provided by the online installer, then OpenSSL is not included, but is searched runtime by the framework. So provide it when the app starts, and provide a version that is compatible with the version of Qt you are using. If the OpenSSL library is found, QSslSocket::sslLibraryVersionString() should print its version. To answer the questions:

    1. It depends on the version of Qt: you'll find this info in the Qt docs. For example, for Qt 5.12: https://doc.qt.io/archives/qt-5.12/ssl.html.
    2. It depends on the specific Qt build, which is why you have all the info.
    3. With the two methods you quoted. Refer to the docs to interprete the results.