Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNetwork problems with SSL, any fix or alternatives?

QNetwork problems with SSL, any fix or alternatives?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leon
    wrote on 5 Apr 2023, 12:47 last edited by
    #1

    Hi.

    I am revisiting an old application i was developing, and it seems that QNetwork is broken (code used to work). Now i get a lot of SSL problems. I only need to download the html code of https webpages and also be able fetch images..

    I am not sure whether i should try and fix these problems or search for an alternative lightweight library that i could include and would work with both Linux and WIndows, considering GNU Licence 3

    Windows:
    To fix i had to add libcrypto-1_1-x64.dll and libssl-1_1-x64.dll on the debug folder

    Ubuntu 22:04:
    Qt 5.11.3 (doesn't find OpenSSL installed)

    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
    qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
    qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
    qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
    qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
    qt.network.ssl: QSslSocket: cannot resolve sk_new_null
    qt.network.ssl: QSslSocket: cannot resolve sk_push
    qt.network.ssl: QSslSocket: cannot resolve sk_free
    qt.network.ssl: QSslSocket: cannot resolve sk_num
    qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
    qt.network.ssl: QSslSocket: cannot resolve sk_value
    qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
    qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
    qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
    qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
    qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
    qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
    qt.network.ssl: QSslSocket: cannot resolve SSLeay
    qt.network.ssl: Incompatible version of OpenSSL
    

    Qt 5.15.2 (finds OpenSSL 3.0.2 installed)

    qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
    qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
    
    S 1 Reply Last reply 5 Apr 2023, 19:22
    0
    • L Leon
      5 Apr 2023, 12:47

      Hi.

      I am revisiting an old application i was developing, and it seems that QNetwork is broken (code used to work). Now i get a lot of SSL problems. I only need to download the html code of https webpages and also be able fetch images..

      I am not sure whether i should try and fix these problems or search for an alternative lightweight library that i could include and would work with both Linux and WIndows, considering GNU Licence 3

      Windows:
      To fix i had to add libcrypto-1_1-x64.dll and libssl-1_1-x64.dll on the debug folder

      Ubuntu 22:04:
      Qt 5.11.3 (doesn't find OpenSSL installed)

      qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
      qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
      qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
      qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
      qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
      qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
      qt.network.ssl: QSslSocket: cannot resolve sk_new_null
      qt.network.ssl: QSslSocket: cannot resolve sk_push
      qt.network.ssl: QSslSocket: cannot resolve sk_free
      qt.network.ssl: QSslSocket: cannot resolve sk_num
      qt.network.ssl: QSslSocket: cannot resolve sk_pop_free
      qt.network.ssl: QSslSocket: cannot resolve sk_value
      qt.network.ssl: QSslSocket: cannot resolve SSL_library_init
      qt.network.ssl: QSslSocket: cannot resolve SSL_load_error_strings
      qt.network.ssl: QSslSocket: cannot resolve SSL_get_ex_new_index
      qt.network.ssl: QSslSocket: cannot resolve SSLv3_client_method
      qt.network.ssl: QSslSocket: cannot resolve SSLv23_client_method
      qt.network.ssl: QSslSocket: cannot resolve SSLv3_server_method
      qt.network.ssl: QSslSocket: cannot resolve SSLv23_server_method
      qt.network.ssl: QSslSocket: cannot resolve X509_STORE_CTX_get_chain
      qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
      qt.network.ssl: QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
      qt.network.ssl: QSslSocket: cannot resolve SSLeay
      qt.network.ssl: Incompatible version of OpenSSL
      

      Qt 5.15.2 (finds OpenSSL 3.0.2 installed)

      qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
      qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
      
      S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Apr 2023, 19:22 last edited by
      #2

      Hi,

      5.11 was released before OpenSSL 3 even existed.

      AFAIR, the support for OpenSSL 3 might have been backported to Qt 5.15 but after 5.15.2.

      If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      L S 2 Replies Last reply 5 Apr 2023, 19:37
      1
      • S SGaist
        5 Apr 2023, 19:22

        Hi,

        5.11 was released before OpenSSL 3 even existed.

        AFAIR, the support for OpenSSL 3 might have been backported to Qt 5.15 but after 5.15.2.

        If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.

        L Offline
        L Offline
        Leon
        wrote on 5 Apr 2023, 19:37 last edited by Leon 4 May 2023, 19:43
        #3

        @SGaist

        Thank you very much!
        I see, "Qt6 supports OpenSSL 3 since Qt 6.2.0"

        What to do you suggest me to do, since Ubuntu 22.04 comes with OpenSSL 3? Should i start thinking about migrating to Qt 6.2 or should i build OpenSSL 1?

        1 Reply Last reply
        0
        • S SGaist
          5 Apr 2023, 19:22

          Hi,

          5.11 was released before OpenSSL 3 even existed.

          AFAIR, the support for OpenSSL 3 might have been backported to Qt 5.15 but after 5.15.2.

          If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 5 Apr 2023, 19:44 last edited by
          #4

          @SGaist said in QNetwork problems with SSL, any fix or alternatives?:

          If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply 5 Apr 2023, 19:47
          0
          • S SGaist
            5 Apr 2023, 19:44

            @SGaist said in QNetwork problems with SSL, any fix or alternatives?:

            If you want to use Qt 5, I would recommend you use the version provided with your distribution. It should have everything needed to work with the OpenSSL version distributed.

            L Offline
            L Offline
            Leon
            wrote on 5 Apr 2023, 19:47 last edited by
            #5

            @SGaist

            So you recommend that i build openSSL (since my distribution has openSSL 3). Let me know if i understand something wrong.

            S 1 Reply Last reply 5 Apr 2023, 19:51
            0
            • L Leon
              5 Apr 2023, 19:47

              @SGaist

              So you recommend that i build openSSL (since my distribution has openSSL 3). Let me know if i understand something wrong.

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 5 Apr 2023, 19:51 last edited by
              #6

              I am suggesting that you install the Qt development packages from your distribution and use that version of Qt to build your application.

              You don't have to build anything (beside your application).

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              1/6

              5 Apr 2023, 12:47

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved