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

QSslSocket

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.8k Views 1 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.
  • I Offline
    I Offline
    imphero
    wrote on last edited by
    #1

    Hey guys. I am creating a simple SSL socket connection between a server and a client app. One a connection is made using QSslSocket::connectToHostEncrypted() by the client the server issues its public certificate to the client and during the SLL handshake the client can choose to trust this certificate or not. This verifies the identity of the Server to the client, however I would like to request authentication the other way round as well; i.e. I would like the client to then issue its public certificate to the server so the server can decide whether or not to trust it.

    I can see no built in way to do this across a single socket but maybe I am wrong. Does anyone know how this can be done?

    I would rather avoid the following solution as I feel it over complicates the situation:

    • Once the client trusts the server the server tells the client to listen for connections on some port. The server connects to this port and the SSL handshake process is done in reverse. One both connections have been secured and both parties trust each other one of the two connections will be dropped and normal operations will commence.

    Perhaps the ability to perform two-way authentication could be added to the QSslSocket class for convenience if the functionality is not already there. Just a suggestion. Would be terrifically handy. Or maybe I need to stop being so lazy (it's not my fault... Qts ease of use has done this to me!!!) :)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rich
      wrote on last edited by
      #2

      Client authentication as you describe is already possible:

      http://qt-project.org/doc/qt-4.8/qsslsocket.html#setLocalCertificate

      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