Bug 1747959 - Take module list lock in FindRootsWithSubject. r=keeler

Differential Revision: https://phabricator.services.mozilla.com/D138061
This commit is contained in:
John Schanck 2022-02-07 21:39:20 +00:00
parent b111fc0b0a
commit 3fa9218df2

View File

@ -111,6 +111,7 @@ static void FindRootsWithSubject(UniqueSECMODModule& rootsModule,
SECItem subject,
/*out*/ nsTArray<nsTArray<uint8_t>>& roots) {
MOZ_ASSERT(rootsModule);
AutoSECMODListReadLock lock;
for (int slotIndex = 0; slotIndex < rootsModule->slotCount; slotIndex++) {
CERTCertificateList* rawResults = nullptr;
if (PK11_FindRawCertsWithSubject(rootsModule->slots[slotIndex], &subject,