Skip to content

Commit

Permalink
Fix auth SSL errors cache
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Nov 15, 2024
1 parent c41be03 commit 25ec551
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/auth/qgsauthmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ bool QgsAuthManager::initPrivate( const QString &pluginPath )
}
}

#ifndef QT_NO_SSL
initSslCaches();
#endif

return true;
}

Expand Down Expand Up @@ -2230,7 +2234,6 @@ const QList<QgsAuthConfigSslServer> QgsAuthManager::sslCertCustomConfigs()
emit messageLog( tr( "SSL custom config already in the list: %1" ).arg( hostPort ), authManTag(), Qgis::MessageLevel::Warning );
}
}
configs.append( storageConfigs );
}

if ( storages.empty() )
Expand Down Expand Up @@ -2441,11 +2444,11 @@ bool QgsAuthManager::rebuildIgnoredSslErrorCache()
ids.append( shaHostPort );
if ( !config.sslIgnoredErrorEnums().isEmpty() )
{
nextcache.insert( config.sslHostPort(), QSet<QSslError::SslError>( config.sslIgnoredErrorEnums().cbegin(), config.sslIgnoredErrorEnums().cend() ) );
nextcache.insert( shaHostPort, QSet<QSslError::SslError>( config.sslIgnoredErrorEnums().cbegin(), config.sslIgnoredErrorEnums().cend() ) );
}
if ( prevcache.contains( config.sslHostPort() ) )
if ( prevcache.contains( shaHostPort ) )
{
prevcache.remove( config.sslHostPort() );
prevcache.remove( shaHostPort );
}
}
else
Expand Down

0 comments on commit 25ec551

Please sign in to comment.