security/manager/ssl/src/nsPKCS11Slot.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/src/nsPKCS11Slot.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,74 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef __NS_PKCS11SLOT_H__
    1.11 +#define __NS_PKCS11SLOT_H__
    1.12 +
    1.13 +#include "nsISupports.h"
    1.14 +#include "nsIPKCS11Slot.h"
    1.15 +#include "nsIPKCS11Module.h"
    1.16 +#include "nsIPKCS11ModuleDB.h"
    1.17 +#include "nsICryptoFIPSInfo.h"
    1.18 +#include "nsString.h"
    1.19 +#include "pk11func.h"
    1.20 +#include "nsNSSShutDown.h"
    1.21 +
    1.22 +class nsPKCS11Slot : public nsIPKCS11Slot,
    1.23 +                     public nsNSSShutDownObject
    1.24 +{
    1.25 +public:
    1.26 +  NS_DECL_ISUPPORTS
    1.27 +  NS_DECL_NSIPKCS11SLOT
    1.28 +
    1.29 +  nsPKCS11Slot(PK11SlotInfo *slot);
    1.30 +  virtual ~nsPKCS11Slot();
    1.31 +
    1.32 +private:
    1.33 +
    1.34 +  PK11SlotInfo *mSlot;
    1.35 +  nsString mSlotDesc, mSlotManID, mSlotHWVersion, mSlotFWVersion;
    1.36 +  int mSeries;
    1.37 +
    1.38 +  virtual void virtualDestroyNSSReference();
    1.39 +  void destructorSafeDestroyNSSReference();
    1.40 +  void refreshSlotInfo();
    1.41 +};
    1.42 +
    1.43 +class nsPKCS11Module : public nsIPKCS11Module,
    1.44 +                       public nsNSSShutDownObject
    1.45 +{
    1.46 +public:
    1.47 +  NS_DECL_ISUPPORTS
    1.48 +  NS_DECL_NSIPKCS11MODULE
    1.49 +
    1.50 +  nsPKCS11Module(SECMODModule *module);
    1.51 +  virtual ~nsPKCS11Module();
    1.52 +
    1.53 +private:
    1.54 +  SECMODModule *mModule;
    1.55 +
    1.56 +  virtual void virtualDestroyNSSReference();
    1.57 +  void destructorSafeDestroyNSSReference();
    1.58 +};
    1.59 +
    1.60 +class nsPKCS11ModuleDB : public nsIPKCS11ModuleDB,
    1.61 +                         public nsICryptoFIPSInfo
    1.62 +{
    1.63 +public:
    1.64 +  NS_DECL_ISUPPORTS
    1.65 +  NS_DECL_NSIPKCS11MODULEDB
    1.66 +  NS_DECL_NSICRYPTOFIPSINFO
    1.67 +
    1.68 +  nsPKCS11ModuleDB();
    1.69 +  virtual ~nsPKCS11ModuleDB();
    1.70 +  /* additional members */
    1.71 +};
    1.72 +
    1.73 +#define NS_PKCS11MODULEDB_CID \
    1.74 +{ 0xff9fbcd7, 0x9517, 0x4334, \
    1.75 +  { 0xb9, 0x7a, 0xce, 0xed, 0x78, 0x90, 0x99, 0x74 }}
    1.76 +
    1.77 +#endif

mercurial