Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QWebsocketServer + ssl
Forum Updated to NodeBB v4.3 + New Features

QWebsocketServer + ssl

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 2 Posters 1.1k 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.
  • KutyusK Offline
    KutyusK Offline
    Kutyus
    wrote on last edited by
    #1

    Hi!

    I updated the operating system (raspbian) and the previously running wss server is not working. There are no error messages, the socketError or sslError signals are not called. If I try without ssl, it works.
    Any idea how to look for a bug?

    Thanks in advance.

    KutyusK Pablo J. RoginaP 2 Replies Last reply
    0
    • KutyusK Kutyus

      Hi!

      I updated the operating system (raspbian) and the previously running wss server is not working. There are no error messages, the socketError or sslError signals are not called. If I try without ssl, it works.
      Any idea how to look for a bug?

      Thanks in advance.

      KutyusK Offline
      KutyusK Offline
      Kutyus
      wrote on last edited by
      #2

      I monitored network traffic to see if it helps:

      14 714.367372097 94.21.243.180 ? 192.168.1.101 TCP 66 60866 ? 9001 [SYN] Seq=0 Win=64240 Len=0 MSS=1452 WS=256 SACK_PERM=1
         15 714.367530959 192.168.1.101 ? 94.21.243.180 TCP 66 9001 ? 60866 [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1460 SACK_PERM=1 WS=128
         16 714.450674924 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [ACK] Seq=1 Ack=1 Win=262656 Len=0
         17 714.452441675 94.21.243.180 ? 192.168.1.101 TLSv1 571 Client Hello
         18 714.452544180 192.168.1.101 ? 94.21.243.180 TCP 54 9001 ? 60866 [ACK] Seq=1 Ack=518 Win=64128 Len=0
         19 744.455007817 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [FIN, ACK] Seq=518 Ack=1 Win=47872 Len=0
         20 744.455321998 192.168.1.101 ? 94.21.243.180 TCP 54 9001 ? 60866 [FIN, ACK] Seq=1 Ack=519 Win=64128 Len=0
         21 744.523576679 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [ACK] Seq=519 Ack=2 Win=52224 Len=0
      
      
      Pablo J. RoginaP 1 Reply Last reply
      0
      • KutyusK Kutyus

        I monitored network traffic to see if it helps:

        14 714.367372097 94.21.243.180 ? 192.168.1.101 TCP 66 60866 ? 9001 [SYN] Seq=0 Win=64240 Len=0 MSS=1452 WS=256 SACK_PERM=1
           15 714.367530959 192.168.1.101 ? 94.21.243.180 TCP 66 9001 ? 60866 [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1460 SACK_PERM=1 WS=128
           16 714.450674924 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [ACK] Seq=1 Ack=1 Win=262656 Len=0
           17 714.452441675 94.21.243.180 ? 192.168.1.101 TLSv1 571 Client Hello
           18 714.452544180 192.168.1.101 ? 94.21.243.180 TCP 54 9001 ? 60866 [ACK] Seq=1 Ack=518 Win=64128 Len=0
           19 744.455007817 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [FIN, ACK] Seq=518 Ack=1 Win=47872 Len=0
           20 744.455321998 192.168.1.101 ? 94.21.243.180 TCP 54 9001 ? 60866 [FIN, ACK] Seq=1 Ack=519 Win=64128 Len=0
           21 744.523576679 94.21.243.180 ? 192.168.1.101 TCP 54 60866 ? 9001 [ACK] Seq=519 Ack=2 Win=52224 Len=0
        
        
        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by Pablo J. Rogina
        #3

        @Kutyus Not an information security expert, but it looks like the TLS handshake capture you posted is somehow incomplete...

        From this article, after the client sending a hello message, next thing is the server replying with its SSL certificate and then more steps (message exchange back and forth)

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        KutyusK 1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @Kutyus Not an information security expert, but it looks like the TLS handshake capture you posted is somehow incomplete...

          From this article, after the client sending a hello message, next thing is the server replying with its SSL certificate and then more steps (message exchange back and forth)

          KutyusK Offline
          KutyusK Offline
          Kutyus
          wrote on last edited by
          #4

          @Pablo-J-Rogina
          This is obvious, I do not know the reason. I compiled 5.15.0, but there is the same error.

          1 Reply Last reply
          0
          • KutyusK Offline
            KutyusK Offline
            Kutyus
            wrote on last edited by
            #5

            I also tried qt 5.11.3 built into the operating system, but the same result.

            1 Reply Last reply
            0
            • KutyusK Offline
              KutyusK Offline
              Kutyus
              wrote on last edited by
              #6

              I got the error, I tried the sslwebsocketserver example, it worked because the code matched mine, I used the key pair in the sample code in my own program, and it worked with it.
              How to generate the correct key for qwebsocketserver?

              1 Reply Last reply
              0
              • KutyusK Kutyus

                Hi!

                I updated the operating system (raspbian) and the previously running wss server is not working. There are no error messages, the socketError or sslError signals are not called. If I try without ssl, it works.
                Any idea how to look for a bug?

                Thanks in advance.

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @Kutyus said in QWebsocketServer + ssl:

                I updated the operating system (raspbian) and the previously running wss server is not working

                How to generate the correct key for qwebsocketserver?

                It looks like those things are contradictory. If you had a running server before updating the OS, you should have created the "correct key" before, right?

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                KutyusK 1 Reply Last reply
                0
                • Pablo J. RoginaP Pablo J. Rogina

                  @Kutyus said in QWebsocketServer + ssl:

                  I updated the operating system (raspbian) and the previously running wss server is not working

                  How to generate the correct key for qwebsocketserver?

                  It looks like those things are contradictory. If you had a running server before updating the OS, you should have created the "correct key" before, right?

                  KutyusK Offline
                  KutyusK Offline
                  Kutyus
                  wrote on last edited by
                  #8

                  @Pablo-J-Rogina
                  Debian strech had a version of openssl of 1.1.0, buster has a version of 1.1.1. I think this is causing the error, but the point is still how to generate a working key pair for Qt?

                  Pablo J. RoginaP 1 Reply Last reply
                  0
                  • KutyusK Kutyus

                    @Pablo-J-Rogina
                    Debian strech had a version of openssl of 1.1.0, buster has a version of 1.1.1. I think this is causing the error, but the point is still how to generate a working key pair for Qt?

                    Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by Pablo J. Rogina
                    #9

                    @Kutyus said in QWebsocketServer + ssl:

                    the point is still how to generate a working key pair for Qt?

                    There are lots of articles describing how to use OpenSSL to create key pairs, ie. article from Google cloud...

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    0
                    • KutyusK Offline
                      KutyusK Offline
                      Kutyus
                      wrote on last edited by
                      #10

                      I got the error, I mixed up the filenames, the certificate extension was crt and cert were given back.

                      1 Reply Last reply
                      2

                      • Login

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