/src/mozilla-central/security/manager/ssl/nsPKCS11Slot.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
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/. */ |
6 | | |
7 | | #ifndef nsPKCS11Slot_h |
8 | | #define nsPKCS11Slot_h |
9 | | |
10 | | #include "ScopedNSSTypes.h" |
11 | | #include "nsIPKCS11Module.h" |
12 | | #include "nsIPKCS11Slot.h" |
13 | | #include "nsISupports.h" |
14 | | #include "nsString.h" |
15 | | #include "pk11func.h" |
16 | | |
17 | | class nsPKCS11Slot : public nsIPKCS11Slot |
18 | | { |
19 | | public: |
20 | | NS_DECL_ISUPPORTS |
21 | | NS_DECL_NSIPKCS11SLOT |
22 | | |
23 | | explicit nsPKCS11Slot(PK11SlotInfo* slot); |
24 | | |
25 | | protected: |
26 | 0 | virtual ~nsPKCS11Slot() {} |
27 | | |
28 | | private: |
29 | | mozilla::UniquePK11SlotInfo mSlot; |
30 | | // True if this is the "PKCS#11 slot" that provides cryptographic functions. |
31 | | bool mIsInternalCryptoSlot; |
32 | | // True if this is the "PKCS#11 slot" where private keys are stored. |
33 | | bool mIsInternalKeySlot; |
34 | | nsCString mSlotDesc; |
35 | | nsCString mSlotManufacturerID; |
36 | | nsCString mSlotHWVersion; |
37 | | nsCString mSlotFWVersion; |
38 | | int mSeries; |
39 | | |
40 | | nsresult refreshSlotInfo(); |
41 | | nsresult GetAttributeHelper(const nsACString& attribute, |
42 | | /*out*/ nsACString& xpcomOutParam); |
43 | | }; |
44 | | |
45 | | class nsPKCS11Module : public nsIPKCS11Module |
46 | | { |
47 | | public: |
48 | | NS_DECL_ISUPPORTS |
49 | | NS_DECL_NSIPKCS11MODULE |
50 | | |
51 | | explicit nsPKCS11Module(SECMODModule* module); |
52 | | |
53 | | protected: |
54 | 0 | virtual ~nsPKCS11Module() {} |
55 | | |
56 | | private: |
57 | | mozilla::UniqueSECMODModule mModule; |
58 | | }; |
59 | | |
60 | | #endif // nsPKCS11Slot_h |