Bug 1188750 - CryptoKey::ReadStructuredClone() needs to ensure NSS is initialized before trying to deserialize a key r=keeler

This commit is contained in:
Tim Taubert 2015-09-01 11:03:02 +02:00
parent aa4630ca3a
commit 08f7ba9712
2 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "pk11pub.h"
#include "cryptohi.h"
#include "nsNSSComponent.h"
#include "ScopedNSSTypes.h"
#include "mozilla/dom/CryptoKey.h"
#include "mozilla/dom/WebCryptoCommon.h"
@ -1249,6 +1250,11 @@ CryptoKey::ReadStructuredClone(JSStructuredCloneReader* aReader)
return false;
}
// Ensure that NSS is initialized.
if (!EnsureNSSInitializedChromeOrContent()) {
return false;
}
uint32_t version;
CryptoBuffer sym, priv, pub;

View File

@ -25,6 +25,7 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/security/manager/ssl',
'/security/pkix/include',
]
MOCHITEST_MANIFESTS += ['test/mochitest.ini']