Skip to content

Commit

Permalink
[auth] fix detection of root CAs on Linux (fixes #13640)
Browse files Browse the repository at this point in the history
(cherry picked from commit 08ec25b and a6a2982)
  • Loading branch information
jef-n committed Nov 16, 2015
1 parent 8da8700 commit 92ce357
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/auth/qgsauthcertutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include "qgsauthconfig.h"

#if QT_VERSION >= 0x050000
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop ).first()
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop ).value(0)
#else
#define SSL_ISSUER_INFO( var, prop ) var.issuerInfo( prop )
#endif

#if QT_VERSION >= 0x050000
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop ).first()
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop ).value(0)
#else
#define SSL_SUBJECT_INFO( var, prop ) var.subjectInfo( prop )
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/core/auth/qgsauthmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2360,8 +2360,12 @@ bool QgsAuthManager::removeCertAuthority( const QSslCertificate& cert )

const QList<QSslCertificate> QgsAuthManager::getSystemRootCAs()
{
#ifndef Q_OS_MAC
return QSslSocket::systemCaCertificates();
#else
QNetworkRequest req;
return req.sslConfiguration().caCertificates();
#endif
}

const QList<QSslCertificate> QgsAuthManager::getExtraFileCAs()
Expand Down

0 comments on commit 92ce357

Please sign in to comment.