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. What is the correct way to use OpenSSL with Qt 6 and CMake for cross platform application?
Forum Updated to NodeBB v4.3 + New Features

What is the correct way to use OpenSSL with Qt 6 and CMake for cross platform application?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 255 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.
  • B Offline
    B Offline
    bogong
    wrote last edited by bogong
    #1

    Hello all!

    What is the correct way to use OpenSSL with Qt 6 and CMake for cross platform application? Is there any examples or manuals? My application is for Desktop (Linux/MacOS) and for mobile (iOS/Android). A lot of manuals contain info about how to add to Android but nothing about other platforms.

    Should it be added like static precompiled libs? Or it from Qt-inbox?

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #2

      See https://doc.qt.io/qt-6/ssl.html#enabling-and-disabling-ssl-support-when-building-qt-from-source

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SamiV123
        wrote last edited by
        #3

        The part about Qt using OpenSSL is a HUGE clusterfuck where Qt "gives you hints" about not being able to use OpenSSL.

        You'll see an error like
        "qt.network.ssl: QSslSocket::startServerEncryption: TLS initialization failed"

        On Windows you have to yourself figure out what is the OpenSSL version that Qt might work with, whee to get the binaries (building it is a HUGE PITA and requires tools such as NASM, and half the sources don't even build) and where to place the crypto and openssl DLL files.

        On Linux if you're using system packaged Qt it might just work out of the box (at least it has worked for me).

        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