зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1188750 - CryptoKey::ReadStructuredClone() needs to ensure NSS is initialized before trying to deserialize a key r=keeler
This commit is contained in:
Родитель
9397fd91e0
Коммит
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']
|
||||
|
|
Загрузка…
Ссылка в новой задаче