summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mailnews/mime/src/nsCMS.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mailnews/mime/src/nsCMS.cpp b/mailnews/mime/src/nsCMS.cpp
index 6717c0840..dd9d31c28 100644
--- a/mailnews/mime/src/nsCMS.cpp
+++ b/mailnews/mime/src/nsCMS.cpp
@@ -24,6 +24,7 @@
#include "pkix/Result.h"
#include "pkix/pkixtypes.h"
#include "smime.h"
+#include "mozilla/StaticMutex.h"
using namespace mozilla;
using namespace mozilla::psm;
@@ -430,6 +431,7 @@ private:
{
MOZ_ASSERT(!NS_IsMainThread());
+ mozilla::StaticMutexAutoLock lock(sMutex);
nsresult rv;
if (!mDigestData.IsEmpty()) {
rv = mMessage->VerifyDetachedSignature(
@@ -453,8 +455,12 @@ private:
nsCOMPtr<nsISMimeVerificationListener> mListener;
nsCString mDigestData;
int16_t mDigestType;
+
+ static mozilla::StaticMutex sMutex;
};
+mozilla::StaticMutex SMimeVerificationTask::sMutex;
+
nsresult nsCMSMessage::CommonAsyncVerifySignature(nsISMimeVerificationListener *aListener,
unsigned char* aDigestData, uint32_t aDigestDataLen,
int16_t aDigestType)