OpenSSL scripts and bins for Android (useful for Qt on Android apps)
Find a file
2025-10-10 14:02:17 +03:00
no-asm Update 16KB page size binaries for OpenSSL 3.1.8 and 1.1.1w 2025-10-10 14:02:17 +03:00
ssl_1.1 Update 16KB page size binaries for OpenSSL 3.1.8 and 1.1.1w 2025-10-10 14:02:17 +03:00
ssl_3 Update 16KB page size binaries for OpenSSL 3.1.8 and 1.1.1w 2025-10-10 14:02:17 +03:00
tst_openssl Add test to check the libs are working properly 2025-02-17 15:07:49 +02:00
.gitignore Add test to check the libs are working properly 2025-02-17 15:07:49 +02:00
android_openssl.cmake Automatically link to OpenSSL when calling add_android_openssl_libraries() (#67) 2025-07-02 17:23:40 +03:00
build_ssl.sh Update 16KB page size binaries for OpenSSL 3.1.8 and 1.1.1w 2025-10-10 14:02:17 +03:00
CMakeLists.txt Set OPENSSL_ROOT_DIR for cmake if not set 2023-11-28 11:05:43 +02:00
LICENSE Add LICENSE file 2019-12-16 15:52:27 +02:00
openssl.pri Fix openssl qmake usage 2023-04-19 16:12:22 +03:00
README.md Update README.md 2025-10-09 21:50:47 +03:00

Android OpenSSL support for Qt

OpenSSL scripts and binaries - supports Qt for Android apps.

In this repo you can find the prebuilt OpenSSL libs for Android, a QMake include project .pri file that can be used integrated with Qt projects, and a .cmake file for CMake based projects.

The following directories are available

  • ssl_3: for Qt 6.5.0+.
  • ssl_1_1: for Qt Qt 5.12.5+, 5.13.1+, 5.14.0+, 5.15.0+, Qt 6.x.x up to 6.4.x

How to use it

QMake based projects

To add OpenSSL to your QMake project, append the following to your .pro project file:

android: include(<path/to/android_openssl/openssl.pri)

CMake based projects

To add OpenSSL to your CMake project, append the following to your project's CMakeLists.txt file:

if (ANDROID)
    FetchContent_Declare(
      android_openssl
      DOWNLOAD_EXTRACT_TIMESTAMP true
      URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip
#      URL_HASH MD5=c97d6ad774fab16be63b0ab40f78d945 #optional
    )
    FetchContent_MakeAvailable(android_openssl)
    include(${android_openssl_SOURCE_DIR}/android_openssl.cmake)
endif()

or, if you cloned the repository into a subdirectory:

include(<path/to/android_openssl>/android_openssl.cmake)

Then

qt_add_executable(your_target_name ..)
qt_add_executable(your_second_target_name ..)

if (ANDROID)
    add_android_openssl_libraries(your_target_name your_second_target_name)
endif()

Build Script

You may use build_ssl.sh to rebuild OpenSSL libraries. OpenSSL/NDK version pairs are predefined in the script to ensure compatibility with specific Qt versions. Make sure the NDK paths and versions match your setup before running it.

Build Prerequisites

The build script was tested against bash and zsh on Linux and macOS.