summaryrefslogtreecommitdiffstats
path: root/security/manager
diff options
context:
space:
mode:
Diffstat (limited to 'security/manager')
-rw-r--r--security/manager/ssl/TransportSecurityInfo.cpp6
-rw-r--r--security/manager/ssl/nsKeygenHandler.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp
index 3f4bf4a90..6badceb88 100644
--- a/security/manager/ssl/TransportSecurityInfo.cpp
+++ b/security/manager/ssl/TransportSecurityInfo.cpp
@@ -74,6 +74,7 @@ NS_IMPL_ISUPPORTS(TransportSecurityInfo,
nsresult
TransportSecurityInfo::SetHostName(const char* host)
{
+ MutexAutoLock lock(mMutex);
mHostName.Adopt(host ? NS_strdup(host) : 0);
return NS_OK;
}
@@ -103,6 +104,7 @@ nsresult
TransportSecurityInfo::SetOriginAttributes(
const NeckoOriginAttributes& aOriginAttributes)
{
+ MutexAutoLock lock(mMutex);
mOriginAttributes = aOriginAttributes;
return NS_OK;
}
@@ -136,6 +138,7 @@ TransportSecurityInfo::GetSecurityState(uint32_t* state)
nsresult
TransportSecurityInfo::SetSecurityState(uint32_t aState)
{
+ MutexAutoLock lock(mMutex);
mSecurityState = aState;
return NS_OK;
}
@@ -152,6 +155,7 @@ NS_IMETHODIMP
TransportSecurityInfo::SetCountSubRequestsBrokenSecurity(
int32_t aSubRequestsBrokenSecurity)
{
+ MutexAutoLock lock(mMutex);
mSubRequestsBrokenSecurity = aSubRequestsBrokenSecurity;
return NS_OK;
}
@@ -168,6 +172,7 @@ NS_IMETHODIMP
TransportSecurityInfo::SetCountSubRequestsNoSecurity(
int32_t aSubRequestsNoSecurity)
{
+ MutexAutoLock lock(mMutex);
mSubRequestsNoSecurity = aSubRequestsNoSecurity;
return NS_OK;
}
@@ -515,6 +520,7 @@ TransportSecurityInfo::GetSSLStatus(nsISSLStatus** _result)
nsresult
TransportSecurityInfo::SetSSLStatus(nsSSLStatus *aSSLStatus)
{
+ MutexAutoLock lock(mMutex);
mSSLStatus = aSSLStatus;
return NS_OK;
diff --git a/security/manager/ssl/nsKeygenHandler.cpp b/security/manager/ssl/nsKeygenHandler.cpp
index 0af761d7e..8d8a98e73 100644
--- a/security/manager/ssl/nsKeygenHandler.cpp
+++ b/security/manager/ssl/nsKeygenHandler.cpp
@@ -26,10 +26,6 @@
#include "secder.h"
#include "secdert.h"
-//These defines are taken from the PKCS#11 spec
-#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000
-#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020
-
DERTemplate SECAlgorithmIDTemplate[] = {
{ DER_SEQUENCE,
0, nullptr, sizeof(SECAlgorithmID) },