diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml
index 3926da6b0c7..5722143c046 100644
--- a/.github/workflows/build_cmake.yml
+++ b/.github/workflows/build_cmake.yml
@@ -168,6 +168,47 @@ jobs:
string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}")
file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}")
+ - name: Download OpenSSL
+ shell: cmake -P {0}
+ run: |
+ if ("${{ runner.os }}" STREQUAL "Windows")
+ set(url_os "windows_x86")
+ set(openssl_localdir "Tools/OpenSSL/Win_x64/bin")
+ set(openssl_dest_dir "instdir/bin")
+ set(shared_suffix ".dll")
+ elseif ("${{ runner.os }}" STREQUAL "Linux")
+ set(url_os "linux_x64")
+ set(openssl_localdir "Tools/OpenSSL/binary/lib")
+ set(openssl_dest_dir "instdir/lib/Qt/lib")
+ set(shared_suffix ".so*")
+ elseif ("${{ runner.os }}" STREQUAL "macOS")
+ # Not needed on macOS
+ return()
+ endif()
+
+ set(openssl_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/tools_openssl_x64")
+ file(DOWNLOAD "${openssl_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS)
+
+ file(READ ./Updates.xml updates_xml)
+ string(REGEX MATCH
+ "(qt.tools.openssl.*).*([0-9+-.]+).*(.*)" updates_xml_output "${updates_xml}")
+
+ set(openssl_directory ${CMAKE_MATCH_1})
+ set(openssl_version ${CMAKE_MATCH_2})
+ set(openssl_archive ${CMAKE_MATCH_3})
+
+ set(url "${openssl_base_url}/${openssl_directory}/${openssl_version}${openssl_archive}")
+
+ file(MAKE_DIRECTORY openssl)
+ file(MAKE_DIRECTORY ${openssl_dest_dir})
+
+ message("Downloading ${url}")
+ file(DOWNLOAD "${url}" ./openssl.7z SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../openssl.7z WORKING_DIRECTORY openssl)
+
+ file(GLOB openssl_shared_objects "openssl/${openssl_localdir}/*${shared_suffix}")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy ${openssl_shared_objects} ${openssl_dest_dir})
- name: Download libclang
id: libclang