Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / security / manager / ssl / nsPKCS11Slot.h
blob3f532d7064479a92b58433ce28a92e29b187e154
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/. */
7 #ifndef nsPKCS11Slot_h
8 #define nsPKCS11Slot_h
10 #include "ScopedNSSTypes.h"
11 #include "nsIPKCS11Module.h"
12 #include "nsIPKCS11Slot.h"
13 #include "nsISupports.h"
14 #include "nsString.h"
15 #include "pk11func.h"
17 class nsPKCS11Slot : public nsIPKCS11Slot {
18 public:
19 NS_DECL_ISUPPORTS
20 NS_DECL_NSIPKCS11SLOT
22 explicit nsPKCS11Slot(PK11SlotInfo* slot);
24 protected:
25 virtual ~nsPKCS11Slot() = default;
27 private:
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;
33 nsCString mSlotDesc;
34 nsCString mSlotManufacturerID;
35 nsCString mSlotHWVersion;
36 nsCString mSlotFWVersion;
37 int mSeries;
39 nsresult refreshSlotInfo();
40 nsresult GetAttributeHelper(const nsACString& attribute,
41 /*out*/ nsACString& xpcomOutParam);
44 class nsPKCS11Module : public nsIPKCS11Module {
45 public:
46 NS_DECL_ISUPPORTS
47 NS_DECL_NSIPKCS11MODULE
49 explicit nsPKCS11Module(SECMODModule* module);
51 protected:
52 virtual ~nsPKCS11Module() = default;
54 private:
55 mozilla::UniqueSECMODModule mModule;
58 #endif // nsPKCS11Slot_h