Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. TLS initialization failed

TLS initialization failed

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 2 Posters 641 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.
  • E Offline
    E Offline
    emircanacardev
    wrote on 19 Aug 2024, 14:01 last edited by
    #1
    qDebug() << QSslSocket::supportsSsl() << QSslSocket::sslLibraryBuildVersionString() << QSslSocket::sslLibraryVersionString();
    

    Output is:

    false "OpenSSL 1.1.1g  21 Apr 2020" ""
    

    I cant find the openssl 1.1.1g for download.
    i downloaded opensslv3 but it didnt work for me.

    Win 11
    QT 5.15.2

    1 Reply Last reply
    0
    • E Offline
      E Offline
      emircanacardev
      wrote on 20 Aug 2024, 10:58 last edited by
      #6

      Doing this work for me.
      I downloaded 1.1.1w here:
      Fire Deamon
      i copied all files from here:
      ...\openssl-1.1.1w.zip\openssl-1.1\x64\bin
      to here:
      ...\Qt\5.15.2\msvc2019_64\bin

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 19 Aug 2024, 18:40 last edited by
        #2

        Hi,

        You don't need the g version, use the latest one of that OpenSSL series.

        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
        0
        • E Offline
          E Offline
          emircanacardev
          wrote on 19 Aug 2024, 20:48 last edited by
          #3

          i already try latest version of openssl but i got same output

          x.pro file

          LIBS += -LC:\Qt\Tools\OpenSSL-Win64\lib\VC\x64\MTd -llibcrypto -llibssl
          INCLUDEPATH += C:\Qt\Tools\OpenSSL-Win64\include
          

          when i try to include .h like #include <openssl/aes.h> it is not give error for header file but i am getting this error:

          false "OpenSSL 1.1.1g  21 Apr 2020" ""
          qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
          
          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 20 Aug 2024, 06:45 last edited by
            #4

            There's no use trying to use OpenSSL v3 with Qt 5.15.2 as it was not available at this time. As I wrote, use the latest version of the series that is mentioned in the message.

            Even better: use a more recent version of Qt which supports OpenSSL v3.

            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
            • E Offline
              E Offline
              emircanacardev
              wrote on 20 Aug 2024, 09:47 last edited by
              #5

              Thanks for your time.
              I tried Opensslv3 (i installed in Qt Maintool) didnt work.
              I tried openssl latest version from (OpenSSL) and i tried other version in this site but didnt work.
              I cannot use qt latest version because of my company is using qt 5.15.2.

              1 Reply Last reply
              0
              • E Offline
                E Offline
                emircanacardev
                wrote on 20 Aug 2024, 10:58 last edited by
                #6

                Doing this work for me.
                I downloaded 1.1.1w here:
                Fire Deamon
                i copied all files from here:
                ...\openssl-1.1.1w.zip\openssl-1.1\x64\bin
                to here:
                ...\Qt\5.15.2\msvc2019_64\bin

                1 Reply Last reply
                0
                • E emircanacardev has marked this topic as solved on 20 Aug 2024, 10:59
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 20 Aug 2024, 11:43 last edited by
                  #7

                  OpenSSL v3 is not compatible with 1.1 hence you cannot just dump it there and use it.

                  Please note that 1.1 has reached end of life so you should really consider updating your setup for security reasons.

                  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
                  0
                  • E Offline
                    E Offline
                    emircanacardev
                    wrote on 20 Aug 2024, 12:43 last edited by
                    #8

                    Yes you are right. I am not getting error but

                    YouTubeAPI::YouTubeAPI(QObject *parent)
                        : QObject(parent)
                    {
                        connect(&manager, &QNetworkAccessManager::finished, this, &YouTubeAPI::onResult);
                    }
                    
                    void YouTubeAPI::onResult(QNetworkReply *reply)
                    {
                        qDebug() << "replied";
                    }
                    

                    the onResult function didnt called i guess, i can not see the replied message as a output.

                    in linux it is work with qt5.15.2, i can see the replied message as a output but i have another problem with linux that the web engine not work in there.

                    how can i solve properly this problem in windows and qt 5.15.2?

                    i am new in qt and i am getting so different errors :/

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 20 Aug 2024, 18:44 last edited by
                      #9

                      You should start by connecting the error related signals. That should provide more information about what is going on.

                      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
                      0
                      • E Offline
                        E Offline
                        emircanacardev
                        wrote on 20 Aug 2024, 19:17 last edited by
                        #10

                        i didnt change anything but it is working right now. thanks anyway.

                        1 Reply Last reply
                        0

                        1/10

                        19 Aug 2024, 14:01

                        • Login

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