@@ -304,6 +304,7 @@ bool QgsAuthManager::init( const QString &pluginPath, const QString &authDatabas
304
304
305
305
bool QgsAuthManager::createConfigTables ()
306
306
{
307
+ QMutexLocker locker ( mMutex );
307
308
// create and open the db
308
309
if ( !authDbOpen () )
309
310
{
@@ -356,6 +357,7 @@ bool QgsAuthManager::createConfigTables()
356
357
357
358
bool QgsAuthManager::createCertTables ()
358
359
{
360
+ QMutexLocker locker ( mMutex );
359
361
// NOTE: these tables were added later, so IF NOT EXISTS is used
360
362
QgsDebugMsg ( " Creating cert tables in auth db" );
361
363
@@ -863,6 +865,7 @@ bool QgsAuthManager::hasConfigId( const QString &txt ) const
863
865
864
866
QgsAuthMethodConfigsMap QgsAuthManager::availableAuthMethodConfigs ( const QString &dataprovider )
865
867
{
868
+ QMutexLocker locker ( mMutex );
866
869
QStringList providerAuthMethodsKeys;
867
870
if ( !dataprovider.isEmpty () )
868
871
{
@@ -907,6 +910,7 @@ QgsAuthMethodConfigsMap QgsAuthManager::availableAuthMethodConfigs( const QStrin
907
910
908
911
void QgsAuthManager::updateConfigAuthMethods ()
909
912
{
913
+ QMutexLocker locker ( mMutex );
910
914
if ( isDisabled () )
911
915
return ;
912
916
@@ -1016,6 +1020,7 @@ QgsAuthMethod::Expansions QgsAuthManager::supportedAuthMethodExpansions( const Q
1016
1020
1017
1021
bool QgsAuthManager::storeAuthenticationConfig ( QgsAuthMethodConfig &mconfig )
1018
1022
{
1023
+ QMutexLocker locker ( mMutex );
1019
1024
if ( !setMasterPassword ( true ) )
1020
1025
return false ;
1021
1026
@@ -1092,6 +1097,7 @@ bool QgsAuthManager::storeAuthenticationConfig( QgsAuthMethodConfig &mconfig )
1092
1097
1093
1098
bool QgsAuthManager::updateAuthenticationConfig ( const QgsAuthMethodConfig &config )
1094
1099
{
1100
+ QMutexLocker locker ( mMutex );
1095
1101
if ( !setMasterPassword ( true ) )
1096
1102
return false ;
1097
1103
@@ -1162,6 +1168,7 @@ bool QgsAuthManager::updateAuthenticationConfig( const QgsAuthMethodConfig &conf
1162
1168
1163
1169
bool QgsAuthManager::loadAuthenticationConfig ( const QString &authcfg, QgsAuthMethodConfig &mconfig, bool full )
1164
1170
{
1171
+ QMutexLocker locker ( mMutex );
1165
1172
if ( isDisabled () )
1166
1173
return false ;
1167
1174
@@ -1228,6 +1235,7 @@ bool QgsAuthManager::loadAuthenticationConfig( const QString &authcfg, QgsAuthMe
1228
1235
1229
1236
bool QgsAuthManager::removeAuthenticationConfig ( const QString &authcfg )
1230
1237
{
1238
+ QMutexLocker locker ( mMutex );
1231
1239
if ( isDisabled () )
1232
1240
return false ;
1233
1241
@@ -1260,6 +1268,7 @@ bool QgsAuthManager::removeAuthenticationConfig( const QString &authcfg )
1260
1268
1261
1269
bool QgsAuthManager::removeAllAuthenticationConfigs ()
1262
1270
{
1271
+ QMutexLocker locker ( mMutex );
1263
1272
if ( isDisabled () )
1264
1273
return false ;
1265
1274
@@ -1280,6 +1289,7 @@ bool QgsAuthManager::removeAllAuthenticationConfigs()
1280
1289
1281
1290
bool QgsAuthManager::backupAuthenticationDatabase ( QString *backuppath )
1282
1291
{
1292
+ QMutexLocker locker ( mMutex );
1283
1293
if ( !QFile::exists ( authenticationDatabasePath () ) )
1284
1294
{
1285
1295
const char *err = QT_TR_NOOP ( " No authentication database found" );
@@ -1315,6 +1325,7 @@ bool QgsAuthManager::backupAuthenticationDatabase( QString *backuppath )
1315
1325
1316
1326
bool QgsAuthManager::eraseAuthenticationDatabase ( bool backup, QString *backuppath )
1317
1327
{
1328
+ QMutexLocker locker ( mMutex );
1318
1329
if ( isDisabled () )
1319
1330
return false ;
1320
1331
@@ -1497,6 +1508,7 @@ bool QgsAuthManager::updateNetworkProxy( QNetworkProxy &proxy, const QString &au
1497
1508
1498
1509
bool QgsAuthManager::storeAuthSetting ( const QString &key, const QVariant &value, bool encrypt )
1499
1510
{
1511
+ QMutexLocker locker ( mMutex );
1500
1512
if ( key.isEmpty () )
1501
1513
return false ;
1502
1514
@@ -1537,6 +1549,7 @@ bool QgsAuthManager::storeAuthSetting( const QString &key, const QVariant &value
1537
1549
1538
1550
QVariant QgsAuthManager::authSetting ( const QString &key, const QVariant &defaultValue, bool decrypt )
1539
1551
{
1552
+ QMutexLocker locker ( mMutex );
1540
1553
if ( key.isEmpty () )
1541
1554
return QVariant ();
1542
1555
@@ -1579,6 +1592,7 @@ QVariant QgsAuthManager::authSetting( const QString &key, const QVariant &defaul
1579
1592
1580
1593
bool QgsAuthManager::existsAuthSetting ( const QString &key )
1581
1594
{
1595
+ QMutexLocker locker ( mMutex );
1582
1596
if ( key.isEmpty () )
1583
1597
return false ;
1584
1598
@@ -1611,6 +1625,7 @@ bool QgsAuthManager::existsAuthSetting( const QString &key )
1611
1625
1612
1626
bool QgsAuthManager::removeAuthSetting ( const QString &key )
1613
1627
{
1628
+ QMutexLocker locker ( mMutex );
1614
1629
if ( key.isEmpty () )
1615
1630
return false ;
1616
1631
@@ -1641,6 +1656,7 @@ bool QgsAuthManager::removeAuthSetting( const QString &key )
1641
1656
1642
1657
bool QgsAuthManager::initSslCaches ()
1643
1658
{
1659
+ QMutexLocker locker ( mMutex );
1644
1660
bool res = true ;
1645
1661
res = res && rebuildCaCertsCache ();
1646
1662
res = res && rebuildCertTrustCache ();
@@ -1653,6 +1669,7 @@ bool QgsAuthManager::initSslCaches()
1653
1669
1654
1670
bool QgsAuthManager::storeCertIdentity ( const QSslCertificate &cert, const QSslKey &key )
1655
1671
{
1672
+ QMutexLocker locker ( mMutex );
1656
1673
if ( cert.isNull () )
1657
1674
{
1658
1675
QgsDebugMsg ( " Passed certificate is null" );
@@ -1696,6 +1713,7 @@ bool QgsAuthManager::storeCertIdentity( const QSslCertificate &cert, const QSslK
1696
1713
1697
1714
const QSslCertificate QgsAuthManager::certIdentity ( const QString &id )
1698
1715
{
1716
+ QMutexLocker locker ( mMutex );
1699
1717
QSslCertificate emptycert;
1700
1718
QSslCertificate cert;
1701
1719
if ( id.isEmpty () )
@@ -1729,6 +1747,7 @@ const QSslCertificate QgsAuthManager::certIdentity( const QString &id )
1729
1747
1730
1748
const QPair<QSslCertificate, QSslKey> QgsAuthManager::certIdentityBundle ( const QString &id )
1731
1749
{
1750
+ QMutexLocker locker ( mMutex );
1732
1751
QPair<QSslCertificate, QSslKey> bundle;
1733
1752
if ( id.isEmpty () )
1734
1753
return bundle;
@@ -1783,6 +1802,7 @@ const QPair<QSslCertificate, QSslKey> QgsAuthManager::certIdentityBundle( const
1783
1802
1784
1803
const QStringList QgsAuthManager::certIdentityBundleToPem ( const QString &id )
1785
1804
{
1805
+ QMutexLocker locker ( mMutex );
1786
1806
QPair<QSslCertificate, QSslKey> bundle ( certIdentityBundle ( id ) );
1787
1807
if ( QgsAuthCertUtils::certIsViable ( bundle.first ) && !bundle.second .isNull () )
1788
1808
{
@@ -1793,6 +1813,7 @@ const QStringList QgsAuthManager::certIdentityBundleToPem( const QString &id )
1793
1813
1794
1814
const QList<QSslCertificate> QgsAuthManager::certIdentities ()
1795
1815
{
1816
+ QMutexLocker locker ( mMutex );
1796
1817
QList<QSslCertificate> certs;
1797
1818
1798
1819
QSqlQuery query ( authDatabaseConnection () );
@@ -1814,6 +1835,7 @@ const QList<QSslCertificate> QgsAuthManager::certIdentities()
1814
1835
1815
1836
QStringList QgsAuthManager::certIdentityIds () const
1816
1837
{
1838
+ QMutexLocker locker ( mMutex );
1817
1839
QStringList identityids = QStringList ();
1818
1840
1819
1841
if ( isDisabled () )
@@ -1839,6 +1861,7 @@ QStringList QgsAuthManager::certIdentityIds() const
1839
1861
1840
1862
bool QgsAuthManager::existsCertIdentity ( const QString &id )
1841
1863
{
1864
+ QMutexLocker locker ( mMutex );
1842
1865
if ( id.isEmpty () )
1843
1866
return false ;
1844
1867
@@ -1871,6 +1894,7 @@ bool QgsAuthManager::existsCertIdentity( const QString &id )
1871
1894
1872
1895
bool QgsAuthManager::removeCertIdentity ( const QString &id )
1873
1896
{
1897
+ QMutexLocker locker ( mMutex );
1874
1898
if ( id.isEmpty () )
1875
1899
{
1876
1900
QgsDebugMsg ( " Passed bundle ID is empty" );
@@ -1898,6 +1922,7 @@ bool QgsAuthManager::removeCertIdentity( const QString &id )
1898
1922
1899
1923
bool QgsAuthManager::storeSslCertCustomConfig ( const QgsAuthConfigSslServer &config )
1900
1924
{
1925
+ QMutexLocker locker ( mMutex );
1901
1926
if ( config.isNull () )
1902
1927
{
1903
1928
QgsDebugMsg ( " Passed config is null" );
@@ -1939,6 +1964,7 @@ bool QgsAuthManager::storeSslCertCustomConfig( const QgsAuthConfigSslServer &con
1939
1964
1940
1965
const QgsAuthConfigSslServer QgsAuthManager::sslCertCustomConfig ( const QString &id, const QString &hostport )
1941
1966
{
1967
+ QMutexLocker locker ( mMutex );
1942
1968
QgsAuthConfigSslServer config;
1943
1969
1944
1970
if ( id.isEmpty () || hostport.isEmpty () )
@@ -1980,6 +2006,7 @@ const QgsAuthConfigSslServer QgsAuthManager::sslCertCustomConfig( const QString
1980
2006
1981
2007
const QgsAuthConfigSslServer QgsAuthManager::sslCertCustomConfigByHost ( const QString &hostport )
1982
2008
{
2009
+ QMutexLocker locker ( mMutex );
1983
2010
QgsAuthConfigSslServer config;
1984
2011
1985
2012
if ( hostport.isEmpty () )
@@ -2020,6 +2047,7 @@ const QgsAuthConfigSslServer QgsAuthManager::sslCertCustomConfigByHost( const QS
2020
2047
2021
2048
const QList<QgsAuthConfigSslServer> QgsAuthManager::sslCertCustomConfigs ()
2022
2049
{
2050
+ QMutexLocker locker ( mMutex );
2023
2051
QList<QgsAuthConfigSslServer> configs;
2024
2052
2025
2053
QSqlQuery query ( authDatabaseConnection () );
@@ -2046,6 +2074,7 @@ const QList<QgsAuthConfigSslServer> QgsAuthManager::sslCertCustomConfigs()
2046
2074
2047
2075
bool QgsAuthManager::existsSslCertCustomConfig ( const QString &id, const QString &hostport )
2048
2076
{
2077
+ QMutexLocker locker ( mMutex );
2049
2078
if ( id.isEmpty () || hostport.isEmpty () )
2050
2079
{
2051
2080
QgsDebugMsg ( " Passed config ID or host:port is empty" );
@@ -2083,6 +2112,7 @@ bool QgsAuthManager::existsSslCertCustomConfig( const QString &id, const QString
2083
2112
2084
2113
bool QgsAuthManager::removeSslCertCustomConfig ( const QString &id, const QString &hostport )
2085
2114
{
2115
+ QMutexLocker locker ( mMutex );
2086
2116
if ( id.isEmpty () || hostport.isEmpty () )
2087
2117
{
2088
2118
QgsDebugMsg ( " Passed config ID or host:port is empty" );
@@ -2118,6 +2148,7 @@ bool QgsAuthManager::removeSslCertCustomConfig( const QString &id, const QString
2118
2148
2119
2149
void QgsAuthManager::dumpIgnoredSslErrorsCache_ ()
2120
2150
{
2151
+ QMutexLocker locker ( mMutex );
2121
2152
if ( !mIgnoredSslErrorsCache .isEmpty () )
2122
2153
{
2123
2154
QgsDebugMsg ( " Ignored SSL errors cache items:" );
@@ -2141,6 +2172,7 @@ void QgsAuthManager::dumpIgnoredSslErrorsCache_()
2141
2172
2142
2173
bool QgsAuthManager::updateIgnoredSslErrorsCacheFromConfig ( const QgsAuthConfigSslServer &config )
2143
2174
{
2175
+ QMutexLocker locker ( mMutex );
2144
2176
if ( config.isNull () )
2145
2177
{
2146
2178
QgsDebugMsg ( " Passed config is null" );
@@ -2169,6 +2201,7 @@ bool QgsAuthManager::updateIgnoredSslErrorsCacheFromConfig( const QgsAuthConfigS
2169
2201
2170
2202
bool QgsAuthManager::updateIgnoredSslErrorsCache ( const QString &shahostport, const QList<QSslError> &errors )
2171
2203
{
2204
+ QMutexLocker locker ( mMutex );
2172
2205
QRegExp rx ( " \\ S+:\\ S+:\\ d+" );
2173
2206
if ( !rx.exactMatch ( shahostport ) )
2174
2207
{
@@ -2212,6 +2245,7 @@ bool QgsAuthManager::updateIgnoredSslErrorsCache( const QString &shahostport, co
2212
2245
2213
2246
bool QgsAuthManager::rebuildIgnoredSslErrorCache ()
2214
2247
{
2248
+ QMutexLocker locker ( mMutex );
2215
2249
QHash<QString, QSet<QSslError::SslError> > prevcache ( mIgnoredSslErrorsCache );
2216
2250
QHash<QString, QSet<QSslError::SslError> > nextcache;
2217
2251
@@ -2273,6 +2307,7 @@ bool QgsAuthManager::rebuildIgnoredSslErrorCache()
2273
2307
2274
2308
bool QgsAuthManager::storeCertAuthorities ( const QList<QSslCertificate> &certs )
2275
2309
{
2310
+ QMutexLocker locker ( mMutex );
2276
2311
if ( certs.isEmpty () )
2277
2312
{
2278
2313
QgsDebugMsg ( " Passed certificate list has no certs" );
@@ -2289,6 +2324,7 @@ bool QgsAuthManager::storeCertAuthorities( const QList<QSslCertificate> &certs )
2289
2324
2290
2325
bool QgsAuthManager::storeCertAuthority ( const QSslCertificate &cert )
2291
2326
{
2327
+ QMutexLocker locker ( mMutex );
2292
2328
// don't refuse !cert.isValid() (actually just expired) CAs,
2293
2329
// as user may want to ignore that SSL connection error
2294
2330
if ( cert.isNull () )
@@ -2324,6 +2360,7 @@ bool QgsAuthManager::storeCertAuthority( const QSslCertificate &cert )
2324
2360
2325
2361
const QSslCertificate QgsAuthManager::certAuthority ( const QString &id )
2326
2362
{
2363
+ QMutexLocker locker ( mMutex );
2327
2364
QSslCertificate emptycert;
2328
2365
QSslCertificate cert;
2329
2366
if ( id.isEmpty () )
@@ -2357,6 +2394,7 @@ const QSslCertificate QgsAuthManager::certAuthority( const QString &id )
2357
2394
2358
2395
bool QgsAuthManager::existsCertAuthority ( const QSslCertificate &cert )
2359
2396
{
2397
+ QMutexLocker locker ( mMutex );
2360
2398
if ( cert.isNull () )
2361
2399
{
2362
2400
QgsDebugMsg ( " Passed certificate is null" );
@@ -2394,6 +2432,7 @@ bool QgsAuthManager::existsCertAuthority( const QSslCertificate &cert )
2394
2432
2395
2433
bool QgsAuthManager::removeCertAuthority ( const QSslCertificate &cert )
2396
2434
{
2435
+ QMutexLocker locker ( mMutex );
2397
2436
if ( cert.isNull () )
2398
2437
{
2399
2438
QgsDebugMsg ( " Passed certificate is null" );
@@ -2433,6 +2472,7 @@ const QList<QSslCertificate> QgsAuthManager::systemRootCAs()
2433
2472
2434
2473
const QList<QSslCertificate> QgsAuthManager::extraFileCAs ()
2435
2474
{
2475
+ QMutexLocker locker ( mMutex );
2436
2476
QList<QSslCertificate> certs;
2437
2477
QList<QSslCertificate> filecerts;
2438
2478
QVariant cafileval = QgsAuthManager::instance ()->authSetting ( QStringLiteral ( " cafile" ) );
@@ -2466,6 +2506,7 @@ const QList<QSslCertificate> QgsAuthManager::extraFileCAs()
2466
2506
2467
2507
const QList<QSslCertificate> QgsAuthManager::databaseCAs ()
2468
2508
{
2509
+ QMutexLocker locker ( mMutex );
2469
2510
QList<QSslCertificate> certs;
2470
2511
2471
2512
QSqlQuery query ( authDatabaseConnection () );
@@ -2487,11 +2528,13 @@ const QList<QSslCertificate> QgsAuthManager::databaseCAs()
2487
2528
2488
2529
const QMap<QString, QSslCertificate> QgsAuthManager::mappedDatabaseCAs ()
2489
2530
{
2531
+ QMutexLocker locker ( mMutex );
2490
2532
return QgsAuthCertUtils::mapDigestToCerts ( databaseCAs () );
2491
2533
}
2492
2534
2493
2535
bool QgsAuthManager::rebuildCaCertsCache ()
2494
2536
{
2537
+ QMutexLocker locker ( mMutex );
2495
2538
mCaCertsCache .clear ();
2496
2539
// in reverse order of precedence, with regards to duplicates, so QMap inserts overwrite
2497
2540
insertCaCertInCache ( QgsAuthCertUtils::SystemRoot, systemRootCAs () );
@@ -2505,6 +2548,7 @@ bool QgsAuthManager::rebuildCaCertsCache()
2505
2548
2506
2549
bool QgsAuthManager::storeCertTrustPolicy ( const QSslCertificate &cert, QgsAuthCertUtils::CertTrustPolicy policy )
2507
2550
{
2551
+ QMutexLocker locker ( mMutex );
2508
2552
if ( cert.isNull () )
2509
2553
{
2510
2554
QgsDebugMsg ( " Passed certificate is null" );
@@ -2543,6 +2587,7 @@ bool QgsAuthManager::storeCertTrustPolicy( const QSslCertificate &cert, QgsAuthC
2543
2587
2544
2588
QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::certTrustPolicy ( const QSslCertificate &cert )
2545
2589
{
2590
+ QMutexLocker locker ( mMutex );
2546
2591
if ( cert.isNull () )
2547
2592
{
2548
2593
QgsDebugMsg ( " Passed certificate is null" );
@@ -2580,6 +2625,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::certTrustPolicy( const QSslCer
2580
2625
2581
2626
bool QgsAuthManager::removeCertTrustPolicies ( const QList<QSslCertificate> &certs )
2582
2627
{
2628
+ QMutexLocker locker ( mMutex );
2583
2629
if ( certs.empty () )
2584
2630
{
2585
2631
QgsDebugMsg ( " Passed certificate list has no certs" );
@@ -2596,6 +2642,7 @@ bool QgsAuthManager::removeCertTrustPolicies( const QList<QSslCertificate> &cert
2596
2642
2597
2643
bool QgsAuthManager::removeCertTrustPolicy ( const QSslCertificate &cert )
2598
2644
{
2645
+ QMutexLocker locker ( mMutex );
2599
2646
if ( cert.isNull () )
2600
2647
{
2601
2648
QgsDebugMsg ( " Passed certificate is null" );
@@ -2626,6 +2673,7 @@ bool QgsAuthManager::removeCertTrustPolicy( const QSslCertificate &cert )
2626
2673
2627
2674
QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::certificateTrustPolicy ( const QSslCertificate &cert )
2628
2675
{
2676
+ QMutexLocker locker ( mMutex );
2629
2677
if ( cert.isNull () )
2630
2678
{
2631
2679
return QgsAuthCertUtils::NoPolicy;
@@ -2649,6 +2697,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::certificateTrustPolicy( const
2649
2697
2650
2698
bool QgsAuthManager::setDefaultCertTrustPolicy ( QgsAuthCertUtils::CertTrustPolicy policy )
2651
2699
{
2700
+
2652
2701
if ( policy == QgsAuthCertUtils::DefaultTrust )
2653
2702
{
2654
2703
// set default trust policy to Trusted by removing setting
@@ -2659,6 +2708,7 @@ bool QgsAuthManager::setDefaultCertTrustPolicy( QgsAuthCertUtils::CertTrustPolic
2659
2708
2660
2709
QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy ()
2661
2710
{
2711
+ QMutexLocker locker ( mMutex );
2662
2712
QVariant policy ( authSetting ( QStringLiteral ( " certdefaulttrust" ) ) );
2663
2713
if ( policy.isNull () )
2664
2714
{
@@ -2669,6 +2719,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy()
2669
2719
2670
2720
bool QgsAuthManager::rebuildCertTrustCache ()
2671
2721
{
2722
+ QMutexLocker locker ( mMutex );
2672
2723
mCertTrustCache .clear ();
2673
2724
2674
2725
QSqlQuery query ( authDatabaseConnection () );
@@ -2702,6 +2753,7 @@ bool QgsAuthManager::rebuildCertTrustCache()
2702
2753
2703
2754
const QList<QSslCertificate> QgsAuthManager::trustedCaCerts ( bool includeinvalid )
2704
2755
{
2756
+ QMutexLocker locker ( mMutex );
2705
2757
QgsAuthCertUtils::CertTrustPolicy defaultpolicy ( defaultCertTrustPolicy () );
2706
2758
QStringList trustedids = mCertTrustCache .value ( QgsAuthCertUtils::Trusted );
2707
2759
QStringList untrustedids = mCertTrustCache .value ( QgsAuthCertUtils::Untrusted );
@@ -2735,6 +2787,7 @@ const QList<QSslCertificate> QgsAuthManager::trustedCaCerts( bool includeinvalid
2735
2787
2736
2788
const QList<QSslCertificate> QgsAuthManager::untrustedCaCerts ( QList<QSslCertificate> trustedCAs )
2737
2789
{
2790
+ QMutexLocker locker ( mMutex );
2738
2791
if ( trustedCAs.isEmpty () )
2739
2792
{
2740
2793
if ( mTrustedCaCertsCache .isEmpty () )
@@ -2760,6 +2813,7 @@ const QList<QSslCertificate> QgsAuthManager::untrustedCaCerts( QList<QSslCertifi
2760
2813
2761
2814
bool QgsAuthManager::rebuildTrustedCaCertsCache ()
2762
2815
{
2816
+ QMutexLocker locker ( mMutex );
2763
2817
mTrustedCaCertsCache = trustedCaCerts ();
2764
2818
QgsDebugMsg ( " Rebuilt trusted cert authorities cache" );
2765
2819
// TODO: add some error trapping for the operation
@@ -2768,11 +2822,13 @@ bool QgsAuthManager::rebuildTrustedCaCertsCache()
2768
2822
2769
2823
const QByteArray QgsAuthManager::trustedCaCertsPemText ()
2770
2824
{
2825
+ QMutexLocker locker ( mMutex );
2771
2826
return QgsAuthCertUtils::certsToPemText ( trustedCaCertsCache () );
2772
2827
}
2773
2828
2774
2829
bool QgsAuthManager::passwordHelperSync ()
2775
2830
{
2831
+ QMutexLocker locker ( mMutex );
2776
2832
if ( masterPasswordIsSet () )
2777
2833
{
2778
2834
return passwordHelperWrite ( mMasterPass );
0 commit comments