Fix loading certificates on Android with OpenSSL
Fixes: QTBUG-96606 Change-Id: Ic2a55fa65c5dc3c057a4da25c218af5a9861410e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 504df6b135d4ac17aa2290e1aa943d216fb7ef55)bb10
parent
ab4fb3ffd4
commit
8910a01c72
|
|
@ -367,7 +367,6 @@ QTlsPrivate::X509Certificate *QTlsBackendOpenSSL::createCertificate() const
|
|||
|
||||
namespace QTlsPrivate {
|
||||
|
||||
// TLSTODO: remove.
|
||||
#ifdef Q_OS_ANDROID
|
||||
QList<QByteArray> fetchSslCertificateData();
|
||||
#endif
|
||||
|
|
@ -399,7 +398,9 @@ QList<QSslCertificate> systemCaCertificates()
|
|||
CertCloseStore(hSystemStore, 0);
|
||||
}
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
// TODO: find where it hides its system certs !
|
||||
const QList<QByteArray> certData = fetchSslCertificateData();
|
||||
for (auto certDatum : certData)
|
||||
systemCerts.append(QSslCertificate::fromData(certDatum, QSsl::Der));
|
||||
#elif defined(Q_OS_UNIX)
|
||||
{
|
||||
const QList<QByteArray> directories = QSslSocketPrivate::unixRootCertDirectories();
|
||||
|
|
|
|||
Loading…
Reference in New Issue