mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 04:05:49 +00:00
63f7ce5155
- Merge in test changes from Bug 1255784. - Remove the unnecessary mutex - Stop doing direct memory work in NSS Token - Clean up direct memory work in ContentParent - In order to store persistent crypto parameters, the NSSToken had to move onto the main thread and be interfaced with via IDL/IPDL. - Support Register/Sign via NSS using a long-lived secret key - Rename the softtoken/usbtoken "enable" prefs, because of hierarchy issues with the WebIDL Pref shadowing. - Also orders the includes on nsNSSModule.cpp - Attestation Certificates are in Part 2. Updates per keeler review comments: - Use //-style comments everywhere - Refactor the PrivateKeyFromKeyHandle method - Rename the logging and fix extraneous NS_WARN_IF/logging combinations - Other updates from review April 11-12: - Correct usage of the "usageCount" flag for PK11_UnwrapPrivKey - Rebase up to latest April 15: - Rebase to latest MozReview-Commit-ID: 6T8jNmwFvHJ --HG-- extra : transplant_source : w%26%CES%2Cu%04%3EAl%04%2Cb%E2v%C9%08%3A%CC%F4
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef nsNSSU2FToken_h
|
|
#define nsNSSU2FToken_h
|
|
|
|
#include "nsINSSU2FToken.h"
|
|
|
|
#include "nsNSSShutDown.h"
|
|
#include "ScopedNSSTypes.h"
|
|
|
|
#define NS_NSSU2FTOKEN_CID \
|
|
{0x79f95a6c, 0xd0f7, 0x4d7d, {0xae, 0xaa, 0xcd, 0x0a, 0x04, 0xb6, 0x50, 0x89}}
|
|
|
|
class nsNSSU2FToken : public nsINSSU2FToken,
|
|
public nsNSSShutDownObject
|
|
{
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSINSSU2FTOKEN
|
|
|
|
nsNSSU2FToken();
|
|
|
|
// For nsNSSShutDownObject
|
|
virtual void virtualDestroyNSSReference() override;
|
|
void destructorSafeDestroyNSSReference();
|
|
|
|
private:
|
|
bool mInitialized;
|
|
mozilla::ScopedPK11SymKey mWrappingKey;
|
|
|
|
static const nsCString mSecretNickname;
|
|
static const nsString mVersion;
|
|
|
|
~nsNSSU2FToken();
|
|
nsresult GetOrCreateWrappingKey(PK11SlotInfo* aSlot,
|
|
const nsNSSShutDownPreventionLock&);
|
|
};
|
|
|
|
#endif // nsNSSU2FToken_h
|