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. QSslServer - how to ?
Forum Update on Monday, May 27th 2025

QSslServer - how to ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qsslqsslcertificateqsslserverqsslsocketencryption
3 Posts 3 Posters 544 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 1 Jul 2022, 11:49 last edited by
    #1

    Hey

    So I was about to update my Encrypted-qtcSocket system when I noticed that in Qt 6.4 there is QSslServer ? : O
    Now I've never really looked in to ssl encryption/etc. I usually just made my own handshake/message/packet and used that. But now I was wondering if I can skip the "pain" of doing my own handshake & relay on QsslServer/Socket for my security and just use my own packet implementation...

    In any case, I'm reading and digging in trying to wrap my head around it.

    https://doc-snapshots.qt.io/qt6-6.4/qsslserver.html#details
    https://doc.qt.io/qt-6/qsslsocket.html
    https://doc.qt.io/qt-6/qsslcertificate.html#details
    https://doc.qt.io/qt-6/qsslcipher.html#details

    Now I'm not a security expert in Ssl... so I was wondering, does any1 have any experience in it?
    I want to run my own QsslServer and connect to it via my QSslSockets, Have it all secured, etc.
    Do I need to do anything with Certificates/cipher/securityauthority/etc/etc or is Qt handling it all and I'm having a good day ?
    any1?

    As a side note, found this talk from 10y ago about certificated (still trying to find the talk/video> https://github.com/richmoore/qt-examples/blob/master/sslcertmonitor3/sslcertificatemonitor.cpp
    But not sure if that is relevant with qsslServer?

    Regards
    Dariusz

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Jul 2022, 18:33 last edited by
      #2

      Hi,

      No experience yet with that class but from the looks of it, it's drop in replacement for QTcpServer. So I would say that what you will have to take care of is the certificate side. Either use an official provider or if you create your own certificate, be ready to deploy them.

      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
      • T Offline
        T Offline
        ThirdStrand
        wrote on 1 Dec 2024, 14:17 last edited by
        #3

        I have used QSslServer and passed the

        QSslCongifuration::defaultSslConfiguration()

        value to use it as the configuration data. Seems pretty easy in that respect.

        The default SSL configuration consists of:
        
        no local certificate and no private key
        protocol SecureProtocols
        the system's default CA certificate list
        the cipher list equal to the list of the SSL libraries' supported SSL ciphers that are 128 bits or more
        

        Another option is

        QSslConfiguration::defaultDtlsConfiguration()
        

        You have full control over certs, keys, etc. in the QSslConfiguration object. Just depends on how detailed you need to get with it. Usually in my case it's a "same host" sort of deal so I just use the default config.

        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