Skip to content

Commit 92ce357

Browse files
committed
[auth] fix detection of root CAs on Linux (fixes #13640)
(cherry picked from commit 08ec25b and a6a2982)
1 parent 8da8700 commit 92ce357

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/core/auth/qgsauthcertutils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#include "qgsauthconfig.h"
2626

2727
#if QT_VERSION >= 0x050000
28-
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop ).first()
28+
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop ).value(0)
2929
#else
3030
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop )
3131
#endif
3232

3333
#if QT_VERSION >= 0x050000
34-
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop ).first()
34+
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop ).value(0)
3535
#else
3636
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop )
3737
#endif

src/core/auth/qgsauthmanager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,8 +2360,12 @@ bool QgsAuthManager::removeCertAuthority( const QSslCertificate& cert )
23602360

23612361
const QList<QSslCertificate> QgsAuthManager::getSystemRootCAs()
23622362
{
2363+
#ifndef Q_OS_MAC
2364+
return QSslSocket::systemCaCertificates();
2365+
#else
23632366
QNetworkRequest req;
23642367
return req.sslConfiguration().caCertificates();
2368+
#endif
23652369
}
23662370

23672371
const QList<QSslCertificate> QgsAuthManager::getExtraFileCAs()

0 commit comments

Comments
 (0)