mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1188750 - CryptoKey::ReadStructuredClone() needs to ensure NSS is initialized before trying to deserialize a key r=keeler
This commit is contained in:
parent
9397fd91e0
commit
981a809447
@ -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;
|
||||
|
||||
|
@ -27,6 +27,7 @@ FINAL_LIBRARY = 'xul'
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/security/manager/ssl',
|
||||
'/security/pkix/include',
|
||||
]
|
||||
|
||||
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
|
||||
|
Loading…
Reference in New Issue
Block a user