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. qsslSocketCannotResolveSymbolWarning being thrown in Qt 5.5.1 but not in Qt 5.2.1
Forum Updated to NodeBB v4.3 + New Features

qsslSocketCannotResolveSymbolWarning being thrown in Qt 5.5.1 but not in Qt 5.2.1

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 2.7k Views 2 Watching
  • 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on last edited by
    #1

    I am porting my application from Qt 5.2.1 to Qt 5.5.1 in order to support for Windows 10. However there is a new qWarning() being thrown on calls to QNetworkAccessManager::get(), even though the requests are correct.
    Please note that I am making http requests and not https.
    Also, it was running fine without any issues in Qt 5.2.1, but is throwing this warning after running with the latest Qt (same as SDK, not modified anything).
    Here are some details of some of the warnings:

    QSslSocket: cannot resolve TLSv1_1_client_method
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    
    QSslSocket: cannot resolve TLSv1_2_client_method
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    QSslSocket: cannot resolve TLSv1_1_server_method
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    QSslSocket: cannot resolve TLSv1_2_server_method
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    QSslSocket: cannot resolve SSL_select_next_proto
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    
    QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    
    QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    Category: qt.network.ssl
    File: ssl\qsslsocket_openssl_symbols.cpp
    Function: void {anonymous}::qsslSocketCannotResolveSymbolWarning(const char*)
    

    If it helps here is my implementation:

    void MyDownload::getRequest(const QString url)
    {
        if(progressBar)
        {
            connect(progressBar, SIGNAL(killDownloading()), this, SLOT(killDownload()));
            connect(this, SIGNAL(updateProgress(int,int,int)), progressBar, SLOT(updateProgress(int,int,int)));
            connect(this, SIGNAL(downloadComplete(int)), progressBar, SLOT(downloadComplete(int)));
            if(!progressBarID)
                progressBarID = progressBar->getID();
            else
                qWarning() << "ID: " << progressBarID << " already assigned for new request.";
        }
    
        connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileDownloaded(QNetworkReply*)));
        request.setUrl(QUrl(url));
        networkReply = manager.get(request);
        connect(networkReply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(progress(qint64,qint64)));
        if(file)
            connect(networkReply, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
        finished = false;
        success = false;
        while(!finished)
        {
            QApplication::processEvents();
            ThreadSleep::mySleep(QThread::currentThread(), 50);
        }
    
        if(progressBar)
        {
            disconnect(progressBar, 0, this, 0);
            disconnect(this, 0, progressBar, 0);
        }
    }
    
    

    class variables in header file:

    private:
        QNetworkAccessManager manager;
        QNetworkRequest request;
        QNetworkReply *networkReply;
        QString *data;
        QFile *file;
        bool finished;
        bool success;
        QString errorMessage;
        MyProgressBar *progressBar;
        int progressBarID;
    

    What could possibly be going wrong, and how can I correct it?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi,

      That's because you are using a version of OpenSSL that is different (usually more recent) than the one that was used to build Qt. So either use the same version or rebuild Qt to use your version of OpenSSL.

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

      CAD_codingC 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        That's because you are using a version of OpenSSL that is different (usually more recent) than the one that was used to build Qt. So either use the same version or rebuild Qt to use your version of OpenSSL.

        CAD_codingC Offline
        CAD_codingC Offline
        CAD_coding
        wrote on last edited by CAD_coding
        #3

        @SGaist
        Thank you for your reply!
        But I do not understand it.

        1. I am not making https requests, just http.
        2. I am not using openssl explicitly in my code.
        3. I do not want to use openssl at all (read an article about certain additional legal requirements, so won't be using it)

        I am using the Qt 5.5.1 build with same compiler that came with the SDK.
        So can you please tell me where I am using openssl, and how do I stop this warning from showing?
        Please forgive me but this is my first time with networking, so I may not know certain basic concepts..

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4
          1. Your http request might be redirected to a https end point
          2. That doesn't matter, if you have a secured connection then it will be used
          3. Take the time to think twice about that. Would you use an application that sends or gets data over a network knowing that it doesn't provide any level of encryption ?

          How to stop the warnings:

          • option 1: use the same version used to build Qt
          • option 2: rebuild Qt with your current version of OpenSSL
          • option 3: rebuild Qt without any support for OpenSSL

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

          CAD_codingC 1 Reply Last reply
          1
          • SGaistS SGaist
            1. Your http request might be redirected to a https end point
            2. That doesn't matter, if you have a secured connection then it will be used
            3. Take the time to think twice about that. Would you use an application that sends or gets data over a network knowing that it doesn't provide any level of encryption ?

            How to stop the warnings:

            • option 1: use the same version used to build Qt
            • option 2: rebuild Qt with your current version of OpenSSL
            • option 3: rebuild Qt without any support for OpenSSL
            CAD_codingC Offline
            CAD_codingC Offline
            CAD_coding
            wrote on last edited by
            #5

            @SGaist Thank you for your reply.

            I understand that using an encryption is necessary, but I saw on Qt's webpages that certain countries do not allow OpenSSL. Additionally it can only be used on open source applications. As my application is closed source, I do not want to run into any legal issues.

            1. option 1: I am using the same which is available for download from Qt website, I have not rebuilt Qt or any other thing. I am even using the same compiler from SDK.
            2. option 2: How do I know which version of OpenSSL I have? I have never installed it explicitly, only probability of that would be if it comes along with Qt. So it should be the same version by default right?
            3. option 3: I can do this, but is there a way to disable OpenSSL in my current version without having to rebuild it?
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6
              1. Qt is built to load OpenSSL dynamically if available, it's not linked against it. Since as you notice there are restrictions for distributions.

              2. What OS are you running ? If OS X, it's already there although it's an old version. If Linux, then it's a library that's usually installed by default.

              3. No, you have to at least rebuild qtbase.

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

              CAD_codingC 1 Reply Last reply
              1
              • SGaistS SGaist
                1. Qt is built to load OpenSSL dynamically if available, it's not linked against it. Since as you notice there are restrictions for distributions.

                2. What OS are you running ? If OS X, it's already there although it's an old version. If Linux, then it's a library that's usually installed by default.

                3. No, you have to at least rebuild qtbase.

                CAD_codingC Offline
                CAD_codingC Offline
                CAD_coding
                wrote on last edited by
                #7

                @SGaist I am using Windows 7. I think I will just rebuild Qt with OpenSSL disabled.
                Just a side note, I noticed that the MinGW version used for Qt 5.5.1 is an experimental version. If I use the stable version (lower version than the experimental) then Qt should build just fine right?

                jsulmJ 1 Reply Last reply
                0
                • CAD_codingC Offline
                  CAD_codingC Offline
                  CAD_coding
                  wrote on last edited by
                  #8

                  I just now found out the best solution for this problem.
                  You don't need to rebuild Qt nor support OpenSSL.
                  Just add the following line in main.cpp

                  QLoggingCategory::setFilterRules("qt.network.ssl.warning=false");
                  
                  1 Reply Last reply
                  0
                  • CAD_codingC CAD_coding

                    @SGaist I am using Windows 7. I think I will just rebuild Qt with OpenSSL disabled.
                    Just a side note, I noticed that the MinGW version used for Qt 5.5.1 is an experimental version. If I use the stable version (lower version than the experimental) then Qt should build just fine right?

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @CAD_coding Why do you think it is experimental?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    CAD_codingC 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @CAD_coding Why do you think it is experimental?

                      CAD_codingC Offline
                      CAD_codingC Offline
                      CAD_coding
                      wrote on last edited by
                      #10

                      @jsulm I checked the MinGW builds on sourceforge and the Qt version is in the experimental secion, way ahead of the stable version which is more than a year older.

                      1 Reply Last reply
                      0

                      • Login

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