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>