This problem is connected with Qt5 I believe, starting QGIS from the command line gives, amongst many other messages:

Warning: Incompatible version of OpenSSL
Warning: QSslSocket: cannot call unresolved function d2i_X509
Warning: QSslSocket::connectToHostEncrypted: TLS initialization failed.

The desktop looks like this when trying to connect to a WMS server:

QGIS 3.34.1 can't connect to WMS

  • Please paste the error message as text rather a screenshot.
    – Padmanabha
    Dec 8, 2023 at 14:00
  • OK, sorry, I thought a small screenshot may help, in case anyone else has had a similar problem. Dec 8, 2023 at 15:27
  • 1
    A solution here maybe? stackoverflow.com/questions/58625924/…
    – GBG
    Dec 8, 2023 at 15:35
  • On my machine openssl version gives OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) and I have no WMS issues with QGIS version 3.34.1-Prizren Qt version 5.15.3
    – Ian Turton
    Dec 8, 2023 at 16:47
  • Ian, is yours a Windows machine? I'm using Ubuntu 22.04. I suspect that the Qt5 libraries used for the latest QGIS build can only cope with OpenSSL 1.1, on my setup. But I don't know for sure. Dec 8, 2023 at 17:24

1 Answer 1


As I have spent a long time sorting this out, in my case the problem was fixed by removing an old symlink linking /lib/x86_64-linux-gnu/libssl.so.1.1 to /lib/x86_64-linux-gnu/libssl.so. Removing (deleting) the link /lib/x86_64-linux-gnu/libssl.so fixed it for me (I don't know where the link came from, or if removing it broke anything else). In a separate machine this link is not there and causes no problems (both Debian 11).

(not posted as a comment, as I don't have enough reputation)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.