From 5a67a065d6edc9cbb1a99918384c0dace5e6b3ae Mon Sep 17 00:00:00 2001 From: Nicholas Bennett Date: Wed, 3 May 2023 15:01:00 +0300 Subject: Docs: Update Versions on OpenSSL Support for Android Documentation Qt 6.5 and beyond will use OpenSSL 3, the documentation should reflect this. Also removed, if unhelpful, or updated NDK and API levels as part of this change. Pick-to: 6.5 Fixes: QTBUG-111586 Change-Id: I91e7598e9a48cd5b5e2f93f7763edccea71deb8e Reviewed-by: Assam Boudjelthia --- .../platforms/android/android-openssl-support.qdoc | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/src/platforms/android/android-openssl-support.qdoc b/doc/src/platforms/android/android-openssl-support.qdoc index 96b5124b..4b900c4a 100644 --- a/doc/src/platforms/android/android-openssl-support.qdoc +++ b/doc/src/platforms/android/android-openssl-support.qdoc @@ -38,14 +38,14 @@ to \l {Using OpenSSL Libraries with Qt for Android}. The following instructions guide you to build the OpenSSL libraries manually: \list 1 - \li Download \l{OpenSSL Source}{OpenSSL} 1.1.x sources. + \li Download \l{OpenSSL Source}{OpenSSL} sources. \li Extract the sources to a folder and navigate to that folder using the CLI. \note If your development platform is Windows, you need \c msys with \c perl v5.14 or later to build OpenSSL. - \li Add the Android LLVM toolchain (NDK r20b or r21) to your path: + \li Add the Android LLVM toolchain to your path: \badcode export PATH="/toolchains/llvm/prebuilt//bin":$PATH @@ -55,10 +55,15 @@ The following instructions guide you to build the OpenSSL libraries manually: the following command: \badcode - ./Configure shared android- -D__ANDROID_API__=21 + ./Configure shared android- -D__ANDROID_API__=XX \endcode - Where can take a value of: \c arm, \c arm64, \c x86, \c x86_64. + Where: + \list + \li can take a value of: \c arm, \c arm64, \c x86, \c x86_64. + \li \c XX is a two-digit number equal to the minimum API level for + this Qt version: see \l {Supported Configurations}{Qt for Android support}. + \endlist \note You must consider enabling or disabling the SSL features based on the legal restrictions in the region where your application is available. @@ -66,20 +71,19 @@ The following instructions guide you to build the OpenSSL libraries manually: \l{OpenSSL Configure Options}. \li To build \c libcrypto and \c libssl shared libraries that are not versioned, - but with an \e _1_1 suffix, run: + but with an \e _3 suffix, run: \code - make -j$(nproc) SHLIB_VERSION_NUMBER= SHLIB_EXT=_1_1.so build_libs + make -j$(nproc) SHLIB_VERSION_NUMBER= SHLIB_EXT=_3.so build_libs \endcode - Without a suffix, Android 5 (API 21) will load the system libraries - \e {libcrypto.so} and \e {libssl.so}, which are OpenSSL 1.0, rather than - your libraries. - If you want to use a different suffix, you must change \c SHLIB_EXT in the previous command, and set the \c ANDROID_OPENSSL_SUFFIX environment variable before you access the Qt Network API. + \note Without a suffix, Android loads the system libraries \c {libcrypto.so} and + \c {libssl.so}. These may be different versions from your libraries or from what Qt expects. + \badcode make -j$(nproc) SHLIB_VERSION_NUMBER= SHLIB_EXT=.so build_libs \endcode @@ -123,16 +127,16 @@ the following step to include those libraries in your project: \badcode ANDROID_EXTRA_LIBS += \ - /libcrypto_1_1.so \ - /libssl_1_1.so + /libcrypto_3.so \ + /libssl_3.so \endcode For CMake: \badcode set_property(TARGET PROPERTY QT_ANDROID_EXTRA_LIBS - /libcrypto_1_1.so - /libssl_1_1.so) + /libcrypto_3.so + /libssl_3.so) \endcode \note When targeting multiple architectures, include OpenSSL libraries -- cgit v1.2.1