FFmpeg: Load Android system CA certificates for tls_openssl


Restore proper TLS certificate verification for https:// media
sources on Android by supplying FFmpeg's tls protocol with a real
CA bundle, replacing the tls_verify=0 stopgap from the previous
commit. Other platforms rely on OpenSSL's default verify paths.

Android has no filesystem CA bundle FFmpeg's tls_openssl protocol
can use directly. Fetch the system trust anchors via JNI (mirroring
what Qt Network already does for QSslSocket, reimplemented here to
avoid a new QtNetwork dependency), convert them to a PEM bundle, and
pass it as ca_file. The bundle is fetched once per process and
cached in a file under the app's cache directory on first use in each
process, so a file left by a previous run cannot outlive a system trust
store update.

Only the base-config trust anchors of the app's Network Security
Configuration end up in the bundle. Domain-specific trust anchors,
Certificate Transparency and cleartext restrictions are not applied to
media sources.

Fixes: QTBUG-150720
Pick-to: 6.12 6.12.0
Change-Id: Ia85c540834cbd1fd31b7e43b095cce5f5da94233
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
commitff71fe46f78a1dfe78e0ac058cd58d42fb366488
parent0598f33ec6ed3f4fb05f48af27f8f01afe743c24
authorTim Blechmann <tim.blechmann@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeTue, 29 Sep 2026 13:46:24 +0000