4#include <QtCore/qlibrary.h>
8#include <QtCore/qglobal.h>
11#include <openssl/bio.h>
12#include <openssl/ssl.h>
13#include <openssl/bn.h>
14#include <openssl/err.h>
15#include <openssl/rand.h>
24 libs[0] = std::make_unique<QLibrary>();
25 libs[1] = std::make_unique<QLibrary>();
27 const auto majorVersion = OPENSSL_VERSION_NUMBER >> 28;
29 auto tryLoad = [&](
QString sslName,
QString cryptoName,
auto version) {
30 libs[0]->setFileNameAndVersion(sslName, version);
31 libs[1]->setFileNameAndVersion(cryptoName, version);
36#if defined(SHLIB_VERSION_NUMBER)
37 if (majorVersion <= 1 && tryLoad(
"ssl"_L1,
"crypto"_L1, SHLIB_VERSION_NUMBER
""_L1))
42#if defined(Q_OS_ANDROID)
48 if (tryLoad(
"ssl"_L1 + suffix,
"crypto"_L1 + suffix, -1))
53 if (tryLoad(
"ssl"_L1,
"crypto"_L1, majorVersion))
63 resolver()->resolve();
static bool tryLoad(const Libs &libs)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.
static char ErrorString[]
#define DEFINE_FUNC(F, ArgsCount,...)
std::vector< std::unique_ptr< QLibrary > > Libs
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
QString qEnvironmentVariable(const char *varName, const QString &defaultValue)