[Solution] QSslSocket: cannot call unresolved function SSLv3_client_method

Problem

When you try to open a HTTPS URL with QSslSocket or QNetworkAccessManager class, you get the following errors:

QSslSocket: cannot call unresolved function SSLv3_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_error_string

Solution

You need to install OpenSSL Win32 or Win64 binaries.

  1. Open Win32 OpenSSL Installation Project page.
  2. Download the latest “light” Win32 or Win64 installation package, for example “Win32 OpenSSL v0.9.8l Light”.
  3. Install it to any location. Ignore “Microsoft Visual C++ 2008 Redistributables” warning (click OK) and select copying OpenSSL DLLs to “The OpenSSL binaries (bin) directory”.
  4. Copy libeay32.dll and ssleay32.dll from the bin folder to the same place where your QtNetwork4.dll or QtNetworkd4.dll is located.
    原文:传送门