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. qt.network.ssl: QSslSocket cannot resolve...
Forum Update on Monday, May 27th 2025

qt.network.ssl: QSslSocket cannot resolve...

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 4 Posters 10.0k 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.
  • S Offline
    S Offline
    SPlatten
    wrote on 22 Jul 2020, 10:37 last edited by
    #1

    I'm getting a bunch of these messages displayed in the Application Output during startup:

    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_client_callback
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_psk_server_callback
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_use_psk_identity_hint
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
    qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
    qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
    qt.network.ssl: QSslSocket: cannot resolve SSL_set_alpn_protos
    qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_alpn_select_cb
    qt.network.ssl: QSslSocket: cannot resolve SSL_get0_alpn_selected
    
    

    I'm not sure whats causing these, it seems to occur as soon as a QML file is set-up.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • S Online
      S Online
      sierdzio
      Moderators
      wrote on 22 Jul 2020, 10:45 last edited by
      #2

      You are not linking OpenSSL or using outdated OpenSSL (v1.0x) - these are messages about missing OSSL libs.

      If your application is communicating with web servers via HTTPS, you need to fix this urgently!

      But if you are not using HTTPS, you can ignore them.

      (Z(:^

      1 Reply Last reply
      3
      • S Offline
        S Offline
        SPlatten
        wrote on 22 Jul 2020, 11:03 last edited by
        #3

        ok, thank you, how do I fix, what do I need to do?

        Kind Regards,
        Sy

        1 Reply Last reply
        0
        • S Online
          S Online
          sierdzio
          Moderators
          wrote on 22 Jul 2020, 11:19 last edited by
          #4

          Compile OpenSSL and link it to your project, separately for each platform.

          On Android you can use KDAB's scripts: https://github.com/KDAB/android_openssl

          There is also some documentation about it https://doc.qt.io/qt-5/android-openssl-support.html

          (Z(:^

          S 1 Reply Last reply 22 Jul 2020, 11:22
          1
          • S sierdzio
            22 Jul 2020, 11:19

            Compile OpenSSL and link it to your project, separately for each platform.

            On Android you can use KDAB's scripts: https://github.com/KDAB/android_openssl

            There is also some documentation about it https://doc.qt.io/qt-5/android-openssl-support.html

            S Offline
            S Offline
            SPlatten
            wrote on 22 Jul 2020, 11:22 last edited by
            #5

            @sierdzio , thank you, is this likely to be an option in the software somewhere as I don't see any openSSL references in the source, could it just be a Qt setting somewhere?

            Kind Regards,
            Sy

            1 Reply Last reply
            0
            • J Offline
              J Offline
              J.Hilk
              Moderators
              wrote on 22 Jul 2020, 11:27 last edited by
              #6

              On the node of OpenSSL I would like to mention, that the QtOnlineInstaller now comes with the option to download the correct/needed openssl dll's no need to search for/compile the correct versions yourself anymore 🎉


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              S 1 Reply Last reply 22 Jul 2020, 11:31
              3
              • J J.Hilk
                22 Jul 2020, 11:27

                On the node of OpenSSL I would like to mention, that the QtOnlineInstaller now comes with the option to download the correct/needed openssl dll's no need to search for/compile the correct versions yourself anymore 🎉

                S Offline
                S Offline
                SPlatten
                wrote on 22 Jul 2020, 11:31 last edited by
                #7

                @J-Hilk , its very odd, I have two projects, one is a newer version of the original project and that does not come up with these messages. The project I'm working on is the original version and my task is to port it to Qt 5.8.

                I've compared the .pro files and the libraries included are the same, I've also single stepped the source, these messages do not appear until the QML is opened.

                Kind Regards,
                Sy

                J 1 Reply Last reply 22 Jul 2020, 11:35
                0
                • S SPlatten
                  22 Jul 2020, 11:31

                  @J-Hilk , its very odd, I have two projects, one is a newer version of the original project and that does not come up with these messages. The project I'm working on is the original version and my task is to port it to Qt 5.8.

                  I've compared the .pro files and the libraries included are the same, I've also single stepped the source, these messages do not appear until the QML is opened.

                  J Offline
                  J Offline
                  J.Hilk
                  Moderators
                  wrote on 22 Jul 2020, 11:35 last edited by
                  #8

                  @SPlatten well QML allows for network access (its well integrated)

                  This for example:

                  Window {
                      id: window
                  
                      width: 800
                      height: 600
                  
                      visible: true
                  
                      Image {
                          anchors.fill: parent
                          source: "https://www.extremetech.com/wp-content/uploads/2020/01/NASA-Sun.jpg"
                          fillMode: Image.PreserveAspectFit
                      }
                  }
                  

                  works fine and should require openssl support


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  S 1 Reply Last reply 22 Jul 2020, 11:38
                  1
                  • J J.Hilk
                    22 Jul 2020, 11:35

                    @SPlatten well QML allows for network access (its well integrated)

                    This for example:

                    Window {
                        id: window
                    
                        width: 800
                        height: 600
                    
                        visible: true
                    
                        Image {
                            anchors.fill: parent
                            source: "https://www.extremetech.com/wp-content/uploads/2020/01/NASA-Sun.jpg"
                            fillMode: Image.PreserveAspectFit
                        }
                    }
                    

                    works fine and should require openssl support

                    S Offline
                    S Offline
                    SPlatten
                    wrote on 22 Jul 2020, 11:38 last edited by
                    #9

                    @J-Hilk , there are no http references in the project, images are all from the resource file.

                    Kind Regards,
                    Sy

                    1 Reply Last reply
                    0
                    • S Online
                      S Online
                      sierdzio
                      Moderators
                      wrote on 22 Jul 2020, 11:48 last edited by
                      #10

                      @SPlatten said in qt.network.ssl: QSslSocket cannot resolve...:

                      SSL_set_psk_client_callback

                      The missing symbols were added in OpenSSL 1.1.1. Most likely you are still linking OpenSSL 1.1.0 or something.

                      (Z(:^

                      S 1 Reply Last reply 22 Jul 2020, 11:52
                      2
                      • S sierdzio
                        22 Jul 2020, 11:48

                        @SPlatten said in qt.network.ssl: QSslSocket cannot resolve...:

                        SSL_set_psk_client_callback

                        The missing symbols were added in OpenSSL 1.1.1. Most likely you are still linking OpenSSL 1.1.0 or something.

                        S Offline
                        S Offline
                        SPlatten
                        wrote on 22 Jul 2020, 11:52 last edited by
                        #11

                        @sierdzio , thank you, how or where does that go in the .pro file ?

                        Kind Regards,
                        Sy

                        1 Reply Last reply
                        0
                        • S Online
                          S Online
                          sierdzio
                          Moderators
                          wrote on 22 Jul 2020, 12:16 last edited by
                          #12

                          Just the regular linking:

                          INCLUDEPATH+=/path/to/openssl
                          LIBS+=/path/to/openssl
                          

                          I don't see any openSSL references in the source

                          Then, as I mention, you can just ignore these messages. Or disable them using categorizable logging config.

                          (Z(:^

                          S 1 Reply Last reply 22 Jul 2020, 12:32
                          2
                          • S sierdzio
                            22 Jul 2020, 12:16

                            Just the regular linking:

                            INCLUDEPATH+=/path/to/openssl
                            LIBS+=/path/to/openssl
                            

                            I don't see any openSSL references in the source

                            Then, as I mention, you can just ignore these messages. Or disable them using categorizable logging config.

                            S Offline
                            S Offline
                            SPlatten
                            wrote on 22 Jul 2020, 12:32 last edited by
                            #13

                            @sierdzio can this actually disable runtime messages?

                            Kind Regards,
                            Sy

                            S 1 Reply Last reply 22 Jul 2020, 12:33
                            0
                            • S SPlatten
                              22 Jul 2020, 12:32

                              @sierdzio can this actually disable runtime messages?

                              S Online
                              S Online
                              sierdzio
                              Moderators
                              wrote on 22 Jul 2020, 12:33 last edited by
                              #14

                              @SPlatten said in qt.network.ssl: QSslSocket cannot resolve...:

                              @sierdzio can this actually disable runtime messages?

                              Yes that's exactly what it's for :-)

                              (Z(:^

                              S 1 Reply Last reply 22 Jul 2020, 12:34
                              0
                              • S sierdzio
                                22 Jul 2020, 12:33

                                @SPlatten said in qt.network.ssl: QSslSocket cannot resolve...:

                                @sierdzio can this actually disable runtime messages?

                                Yes that's exactly what it's for :-)

                                S Offline
                                S Offline
                                SPlatten
                                wrote on 22 Jul 2020, 12:34 last edited by
                                #15

                                @sierdzio, thanks, I'll have to read up on how to do it.

                                Kind Regards,
                                Sy

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  shaan7
                                  wrote on 23 Jul 2020, 03:33 last edited by
                                  #16

                                  @SPlatten if you are on Windows then simply copying libcrypto-1_1.dll and libssl-1_1.dll from the OpenSSL binaries (install them via the Qt Installer) to the path that contains your .exe should fix this as well (without needing to explicitly link at compile time).

                                  1 Reply Last reply
                                  0

                                  5/16

                                  22 Jul 2020, 11:22

                                  11 unread
                                  • Login

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