1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #include "ScopedNSSTypes.h"
11 #include "nsIPKCS11Module.h"
12 #include "nsIPKCS11Slot.h"
13 #include "nsISupports.h"
17 class nsPKCS11Slot
: public nsIPKCS11Slot
{
22 explicit nsPKCS11Slot(PK11SlotInfo
* slot
);
25 virtual ~nsPKCS11Slot() = default;
28 mozilla::UniquePK11SlotInfo mSlot
;
29 // True if this is the "PKCS#11 slot" that provides cryptographic functions.
30 bool mIsInternalCryptoSlot
;
31 // True if this is the "PKCS#11 slot" where private keys are stored.
32 bool mIsInternalKeySlot
;
34 nsCString mSlotManufacturerID
;
35 nsCString mSlotHWVersion
;
36 nsCString mSlotFWVersion
;
39 nsresult
refreshSlotInfo();
40 nsresult
GetAttributeHelper(const nsACString
& attribute
,
41 /*out*/ nsACString
& xpcomOutParam
);
44 class nsPKCS11Module
: public nsIPKCS11Module
{
47 NS_DECL_NSIPKCS11MODULE
49 explicit nsPKCS11Module(SECMODModule
* module
);
52 virtual ~nsPKCS11Module() = default;
55 mozilla::UniqueSECMODModule mModule
;
58 #endif // nsPKCS11Slot_h