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. Secure communication with QSslSocket
Forum Updated to NodeBB v4.3 + New Features

Secure communication with QSslSocket

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 667 Views 4 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.
  • A Offline
    A Offline
    Ahimson
    wrote on last edited by
    #1

    Good morning all!
    I am a beginner in the world of Ssl programming.
    I would like to have some explanations on this concept. Thank you in advance.
    Let me explain:

    I want to develop a communication application for an Organization. The application will consist of a server and a client. The server application will be installed on a computer in the headquarters of the organization and the client application will be installed on the computer or telephone of each member of the organization who can communicate from anywhere in the world.
    My questions are:
    -Is it good to use a self signed certificate since the server will be controlled by the organization itself?
    -If not, can you give me some ideas to be able to secure the communication between the server and the client.
    I remind you that I plan to use QSslSocket and QTcpServeur.

    Thank you.

    Pablo J. RoginaP 1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should rather buy a certificate from an official provider, or at least consider Let's Encrypt.

      Using a custom certificate means that you will have to deploy it properly also on your devices which is going to require more work.

      You will also have to ensure a proper update strategy in case you must revoque your certificate.

      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
      • A Ahimson

        Good morning all!
        I am a beginner in the world of Ssl programming.
        I would like to have some explanations on this concept. Thank you in advance.
        Let me explain:

        I want to develop a communication application for an Organization. The application will consist of a server and a client. The server application will be installed on a computer in the headquarters of the organization and the client application will be installed on the computer or telephone of each member of the organization who can communicate from anywhere in the world.
        My questions are:
        -Is it good to use a self signed certificate since the server will be controlled by the organization itself?
        -If not, can you give me some ideas to be able to secure the communication between the server and the client.
        I remind you that I plan to use QSslSocket and QTcpServeur.

        Thank you.

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

        @Ahimson said in Secure communication with QSslSocket:

        -Is it good to use a self signed certificate since the server will be controlled by the organization itself?

        It would be acceptable. Please bear in mind that Qt will still complain about self-signed certificate, so you'll need to import the certificate into Qt's CA certificate database.

        I remind you that I plan to use QSslSocket and QTcpServeur.

        This is a secure socket client example just in case.

        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
        1
        • A Offline
          A Offline
          Ahimson
          wrote on last edited by
          #4

          Hi everyone!
          Thank you for your answers.
          I now see how I will proceed to provide a secure connection between the server and the clients.
          Once again thank you.

          Tell me is there another way to encrypt a communication between a server and a client in C ++ Qt ...
          I just want to know in case it could be interesting.
          Thank you.

          mrjjM 1 Reply Last reply
          0
          • A Ahimson

            Hi everyone!
            Thank you for your answers.
            I now see how I will proceed to provide a secure connection between the server and the clients.
            Once again thank you.

            Tell me is there another way to encrypt a communication between a server and a client in C ++ Qt ...
            I just want to know in case it could be interesting.
            Thank you.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Ahimson
            Hi
            Just as a note:
            To be sure incoming connections from off-site devices is in fact a device you trust,
            a certificate is the way to do it.

            However, you can also encrypt the actual data, which is another story and mostly used
            inside a site to prevent tampering etc but that does not really verify that a given device is who it says it is.
            So if someone broke your encryption then they could make a fake device and talk to server.
            Inside a firewall, its not a big risk, but outside on phones, its another story.

            For your use case, buying an official certificate is so much more fun as self-signed are always treated
            with a bit of suspicion and for external devices, it can be quite a hassle to make them accept it.
            Like we tried with an iPhone and it simply reused to use it. Might be fixable but compared to
            the official one we bought, that it just took with no extra steps whats so ever.

            Im not an encryption expert so i dont know other ways for your use case.

            A 1 Reply Last reply
            2
            • mrjjM mrjj

              @Ahimson
              Hi
              Just as a note:
              To be sure incoming connections from off-site devices is in fact a device you trust,
              a certificate is the way to do it.

              However, you can also encrypt the actual data, which is another story and mostly used
              inside a site to prevent tampering etc but that does not really verify that a given device is who it says it is.
              So if someone broke your encryption then they could make a fake device and talk to server.
              Inside a firewall, its not a big risk, but outside on phones, its another story.

              For your use case, buying an official certificate is so much more fun as self-signed are always treated
              with a bit of suspicion and for external devices, it can be quite a hassle to make them accept it.
              Like we tried with an iPhone and it simply reused to use it. Might be fixable but compared to
              the official one we bought, that it just took with no extra steps whats so ever.

              Im not an encryption expert so i dont know other ways for your use case.

              A Offline
              A Offline
              Ahimson
              wrote on last edited by
              #6

              @mrjj
              thank you very much for your answer .... it helps me a lot.

              mrjjM 1 Reply Last reply
              1
              • A Ahimson

                @mrjj
                thank you very much for your answer .... it helps me a lot.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Ahimson
                You are most welcome.
                if you feel you got an answer please use Topic Tool button to set as solved.

                A 1 Reply Last reply
                0
                • mrjjM mrjj

                  @Ahimson
                  You are most welcome.
                  if you feel you got an answer please use Topic Tool button to set as solved.

                  A Offline
                  A Offline
                  Ahimson
                  wrote on last edited by
                  #8

                  @mrjj

                  thank you. Yes it's good, I'm satisfying ...
                  I will mark the resolved topic.
                  Thank you all.

                  1 Reply Last reply
                  1

                  • Login

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