Skip to content
Permalink
Browse files

[auth] fix detection of root CAs on Linux (fixes #13640)

  • Loading branch information
jef-n committed Nov 16, 2015
1 parent 5e7291e commit 08ec25bedde5d35ffe050d419cee4fcdae734683
Showing with 7 additions and 4 deletions.
  1. +2 −2 src/core/auth/qgsauthcertutils.h
  2. +5 −2 src/core/auth/qgsauthmanager.cpp
@@ -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
@@ -2360,8 +2360,11 @@ bool QgsAuthManager::removeCertAuthority( const QSslCertificate& cert )

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

const QList<QSslCertificate> QgsAuthManager::getExtraFileCAs()

0 comments on commit 08ec25b

Please sign in to comment.
You can’t perform that action at this time.