Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-115146

Qt 5.15.2 and openssl 3 only on Ubuntu 22.04

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.15.2
    • Network: SSL
    • None
    • Linux/X11

    Description

      I'm opening an issue related to Qt 5.15.2 and Linux distros such as Ubuntu 22.04 which do not ship with OpenSSL v1.1.1 but only OpenSSL v3.0.0 causing an https download to fail due to SSL and certificate problems.

       

      I tried to make a minimal example that just downloads a URL passed as the first argument:
      https://github.com/julianoes/qt-ssl-example

       

      The output is:

      ./ssl-example https://example.com
      Buildversion:  "OpenSSL 1.1.1g  21 Apr 2020" 
      qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id
      qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate
      Runversion:  "OpenSSL 3.0.2 15 Mar 2022" 
      Supports SSL:  true 
      qt.network.ssl: QSslSocket: cannot call unresolved function SSL_get_peer_certificate
      SSL error: The peer did not present any certificate
      
      Download of https://example.com failed: SSL handshake failed
      

       

       

      As I understand the workaround is to install openssl 1.1.1, however, that's not straightforward on Ubuntu 22.04. I have seen many reports of people struggling with this problem but no clear statement whether this is something that should be supported/fixed by Qt or whether it is a distribution problem and is only be fixed in Qt 6.

      Sidenote: I'm asking because I'm trying to fix https downloads on a reasonable big open-source application (https://github.com/mavlink/qgroundcontrol/). The project is still on Qt 5.15.2 as it will be a bit of an undertaking to move to Qt 6, and open source projects don't necessarily have the resources to quickly do so. But still, we would like to not break functionality for Ubuntu 22.04 which are considerable share of the users. The application is usually deployed using an AppImage but the ssl libs are not included by default.

      Here is more reading that I have done on the topic:

      https://github.com/kiwix/kiwix-desktop/issues/871#issuecomment-1611272912
      https://github.com/probonopd/linuxdeployqt/issues/422#issuecomment-599032763
      https://stackoverflow.com/questions/71997447/qt-missing-openssl-3-x-support-on-ubuntu-22-04
      https://forum.qt.io/topic/136258/ssl-issues-after-upgrading-ubuntu (Qt 6)
      https://forum.qt.io/topic/136960/does-qt-5-15-support-openssl-3-x
      https://bugreports.qt.io/browse/QTBUG-103820

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            julianoes Julian Oes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes