Skip to content
Permalink
Browse files

[auth] Return immediate errors for null cert/key when validating bundle

  • Loading branch information
dakcarto committed Oct 27, 2017
1 parent 671ce63 commit 4b9898b6629e9a43d63e2e2f3b3db977b18a78fc
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/core/auth/qgsauthcertutils.cpp
@@ -1331,6 +1331,16 @@ QList<QSslError> QgsAuthCertUtils::validateCertChain( const QList<QSslCertificat
QStringList QgsAuthCertUtils::validatePKIBundle( QgsPkiBundle &bundle, bool useIntermediates, bool trustRootCa )
{
QStringList errors;
if ( bundle.clientCert().isNull() )
errors << QObject::tr( "Client certificate is NULL." );

if ( bundle.clientKey().isNull() )
errors << QObject::tr( "Client certificate key is NULL." );

// immediately bail out if cert or key is NULL
if ( !errors.isEmpty() )
return errors;

QList<QSslError> sslErrors;
if ( useIntermediates )
{

0 comments on commit 4b9898b

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