Skip to content

Commit

Permalink
[auth system] Fix warnings and add compatibility with QCA 2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Sep 21, 2015
1 parent f58bd1a commit 16ac248
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/core/auth/qgsauthcertutils.cpp
Expand Up @@ -481,6 +481,7 @@ const QString QgsAuthCertUtils::qcaSignatureAlgorithm( QCA::SignatureAlgorithm a
return QObject::tr( "RIPEMD160, with EMSA3" );
case QCA::EMSA3_Raw:
return QObject::tr( "EMSA3, without digest" );
#if QCA_VERSION >= 0x020100
case QCA::EMSA3_SHA224:
return QObject::tr( "SHA224, with EMSA3" );
case QCA::EMSA3_SHA256:
Expand All @@ -489,6 +490,7 @@ const QString QgsAuthCertUtils::qcaSignatureAlgorithm( QCA::SignatureAlgorithm a
return QObject::tr( "SHA384, with EMSA3" );
case QCA::EMSA3_SHA512:
return QObject::tr( "SHA512, with EMSA3" );
#endif
default:
return QObject::tr( "Unknown (possibly Elliptic Curve)" );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/qgsauthmanager.cpp
Expand Up @@ -2721,7 +2721,7 @@ QgsAuthManager::QgsAuthManager()
, mScheduledDbEraseRequestEmitted( false )
, mScheduledDbEraseRequestCount( 0 )
, mMutex( 0 )
, mIgnoredSslErrorsCache( QHash<QString, QSet<QSslError::SslError>>() )
, mIgnoredSslErrorsCache( QHash<QString, QSet<QSslError::SslError> >() )
{
mMutex = new QMutex( QMutex::Recursive );
connect( this, SIGNAL( messageOut( const QString&, const QString&, QgsAuthManager::MessageLevel ) ),
Expand Down
4 changes: 2 additions & 2 deletions src/core/auth/qgsauthmanager.h
Expand Up @@ -378,7 +378,7 @@ class CORE_EXPORT QgsAuthManager : public QObject


/** Get ignored SSL error cache, keyed with cert/connection's sha:host:port */
QHash<QString, QSet<QSslError::SslError>> getIgnoredSslErrorCache() { return mIgnoredSslErrorsCache; }
QHash<QString, QSet<QSslError::SslError> > getIgnoredSslErrorCache() { return mIgnoredSslErrorsCache; }

void dumpIgnoredSslErrorsCache_();

Expand Down Expand Up @@ -613,7 +613,7 @@ class CORE_EXPORT QgsAuthManager : public QObject
// cache of certs ready to be utilized in network connections
QList<QSslCertificate> mTrustedCaCertsCache;
// cache of SSL errors to be ignored in network connections, per sha-hostport
QHash<QString, QSet<QSslError::SslError>> mIgnoredSslErrorsCache;
QHash<QString, QSet<QSslError::SslError> > mIgnoredSslErrorsCache;
#endif
};

Expand Down
3 changes: 2 additions & 1 deletion src/gui/auth/qgsauthcertificateinfo.cpp
Expand Up @@ -741,11 +741,12 @@ void QgsAuthCertInfo::populateInfoDetailsSection()
{
usage.append( tr( "Encrypt" ) );
}
#if QCA_VERSION >= 0x020100
if ( pubakey.canDecrypt() )
{
usage.append( tr( "Decrypt" ) );
}

#endif
if ( pubakey.canKeyAgree() )
{
usage.append( tr( "Key agreement" ) );
Expand Down

0 comments on commit 16ac248

Please sign in to comment.