Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / security / manager / ssl / nsPK11TokenDB.h
blob36f54354ada0b0ea28d05bff3d1077ab7a4b8b54
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 nsPK11TokenDB_h
8 #define nsPK11TokenDB_h
10 #include "nsCOMPtr.h"
11 #include "nsIPK11Token.h"
12 #include "nsIPK11TokenDB.h"
13 #include "nsISupports.h"
14 #include "nsNSSHelper.h"
15 #include "nsString.h"
16 #include "pk11func.h"
17 #include "ScopedNSSTypes.h"
19 class nsPK11Token : public nsIPK11Token {
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_NSIPK11TOKEN
24 explicit nsPK11Token(PK11SlotInfo* slot);
26 protected:
27 virtual ~nsPK11Token() = default;
29 private:
30 friend class nsPK11TokenDB;
31 nsresult refreshTokenInfo();
33 nsCString mTokenName;
34 nsCString mTokenManufacturerID;
35 nsCString mTokenHWVersion;
36 nsCString mTokenFWVersion;
37 nsCString mTokenSerialNum;
38 mozilla::UniquePK11SlotInfo mSlot;
39 // True if this is the "PKCS#11 token" that provides cryptographic functions.
40 bool mIsInternalCryptoToken;
41 // True if this is the "PKCS#11 token" where private keys are stored.
42 bool mIsInternalKeyToken;
43 int mSeries;
44 nsCOMPtr<nsIInterfaceRequestor> mUIContext;
45 nsresult GetAttributeHelper(const nsACString& attribute,
46 /*out*/ nsACString& xpcomOutParam);
49 class nsPK11TokenDB : public nsIPK11TokenDB {
50 public:
51 NS_DECL_ISUPPORTS
52 NS_DECL_NSIPK11TOKENDB
54 nsPK11TokenDB() = default;
56 protected:
57 virtual ~nsPK11TokenDB() = default;
60 #define NS_PK11TOKENDB_CID \
61 { \
62 0xb084a2ce, 0x1dd1, 0x11b2, { \
63 0xbf, 0x10, 0x83, 0x24, 0xf8, 0xe0, 0x65, 0xcc \
64 } \
67 #endif // nsPK11TokenDB_h