Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Variables
secmodt.h File Reference
#include "nssrwlkt.h"
#include "nssilckt.h"
#include "secoid.h"
#include "secasn1.h"
#include "pkcs11t.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SECMODModuleStr
struct  SECMODModuleListStr
struct  PK11SlotListStr
struct  PK11SlotListElementStr
struct  PK11RSAGenParamsStr
struct  PK11DefaultArrayEntryStr
struct  SECKEYAttributeStr
struct  SECKEYPrivateKeyInfoStr
struct  SECKEYEncryptedPrivateKeyInfoStr

Defines

#define SECMOD_END_WAIT   0x01
#define SECMOD_WAIT_SIMULATED_EVENT   0x02
#define SECMOD_WAIT_PKCS11_EVENT   0x04
#define SECMOD_RSA_FLAG   0x00000001L
#define SECMOD_DSA_FLAG   0x00000002L
#define SECMOD_RC2_FLAG   0x00000004L
#define SECMOD_RC4_FLAG   0x00000008L
#define SECMOD_DES_FLAG   0x00000010L
#define SECMOD_DH_FLAG   0x00000020L
#define SECMOD_FORTEZZA_FLAG   0x00000040L
#define SECMOD_RC5_FLAG   0x00000080L
#define SECMOD_SHA1_FLAG   0x00000100L
#define SECMOD_MD5_FLAG   0x00000200L
#define SECMOD_MD2_FLAG   0x00000400L
#define SECMOD_SSL_FLAG   0x00000800L
#define SECMOD_TLS_FLAG   0x00001000L
#define SECMOD_AES_FLAG   0x00002000L
#define SECMOD_SHA256_FLAG   0x00004000L
#define SECMOD_SHA512_FLAG   0x00008000L /* also for SHA384 */
#define SECMOD_RESERVED_FLAG   0X08000000L
#define SECMOD_FRIENDLY_FLAG   0x10000000L
#define SECMOD_RANDOM_FLAG   0x80000000L
#define PK11_OWN_PW_DEFAULTS   0x20000000L
#define PK11_DISABLE_FLAG   0x40000000L
#define CKM_FAKE_RANDOM   0x80000efeL
#define CKM_INVALID_MECHANISM   0xffffffffL
#define CKA_DIGEST   0x81000000L
#define CKA_FLAGS_ONLY   0 /* CKA_CLASS */
#define PK11_ATTR_TOKEN   0x00000001L
#define PK11_ATTR_SESSION   0x00000002L
#define PK11_ATTR_PRIVATE   0x00000004L
#define PK11_ATTR_PUBLIC   0x00000008L
#define PK11_ATTR_MODIFIABLE   0x00000010L
#define PK11_ATTR_UNMODIFIABLE   0x00000020L
#define PK11_ATTR_SENSITIVE   0x00000040L
#define PK11_ATTR_INSENSITIVE   0x00000080L
#define PK11_ATTR_EXTRACTABLE   0x00000100L
#define PK11_ATTR_UNEXTRACTABLE   0x00000200L
#define SECMOD_EXTERNAL   0 /* external module */
#define SECMOD_INTERNAL   1 /* internal default module */
#define SECMOD_FIPS   2 /* internal fips module */
#define SECMOD_SLOT_FLAGS   "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,SHA256,SHA512]"
#define SECMOD_MAKE_NSS_FLAGS(fips, slot)   "Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})"
#define SECMOD_INT_NAME   "NSS Internal PKCS #11 Module"
#define SECMOD_INT_FLAGS   SECMOD_MAKE_NSS_FLAGS("",1)
#define SECMOD_FIPS_NAME   "NSS Internal FIPS PKCS #11 Module"
#define SECMOD_FIPS_FLAGS   SECMOD_MAKE_NSS_FLAGS(",fips",3)
#define PK11_PW_RETRY
#define PK11_PW_AUTHENTICATED
#define PK11_PW_TRY
#define CRL_IMPORT_DEFAULT_OPTIONS   0x00000000
#define CRL_IMPORT_BYPASS_CHECKS   0x00000001

Typedefs

typedef struct SECMODModuleStr
typedef struct SECMODModuleListStr
typedef NSSRWLock SECMODListLock
typedef struct PK11SlotInfoStr
typedef struct PK11PreSlotInfoStr
typedef struct PK11SymKeyStr
typedef struct PK11ContextStr
typedef struct PK11SlotListStr
typedef struct PK11SlotListElementStr
typedef struct PK11RSAGenParamsStr
typedef unsigned long SECMODModuleID
typedef struct PK11DefaultArrayEntryStr
typedef struct PK11GenericObjectStr
typedef void(* PK11FreeDataFunc )(void *)
typedef PRUint32 PK11AttrFlags
typedef char *(PR_CALLBACKPK11PasswordFunc )(PK11SlotInfo *slot, PRBool retry, void *arg)
typedef PRBool(PR_CALLBACKPK11VerifyPasswordFunc )(PK11SlotInfo *slot, void *arg)
typedef PRBool(PR_CALLBACKPK11IsLoggedInFunc )(PK11SlotInfo *slot, void *arg)
typedef struct SECKEYAttributeStr
typedef struct SECKEYPrivateKeyInfoStr
typedef struct SECKEYEncryptedPrivateKeyInfoStr

Enumerations

enum  PK11CertListType {
  PK11CertListUnique = 0, PK11CertListUser = 1, PK11CertListRootUnique = 2, PK11CertListCA = 3,
  PK11CertListCAUnique = 4, PK11CertListUserUnique = 5, PK11CertListAll = 6, PK11CertListUnique = 0,
  PK11CertListUser = 1, PK11CertListRootUnique = 2, PK11CertListCA = 3, PK11CertListCAUnique = 4,
  PK11CertListUserUnique = 5, PK11CertListAll = 6
}
enum  PK11Origin {
  PK11_OriginNULL = 0, PK11_OriginDerive = 1, PK11_OriginGenerated = 2, PK11_OriginFortezzaHack = 3,
  PK11_OriginUnwrap = 4, PK11_OriginNULL = 0, PK11_OriginDerive = 1, PK11_OriginGenerated = 2,
  PK11_OriginFortezzaHack = 3, PK11_OriginUnwrap = 4
}
enum  PK11DisableReasons {
  PK11_DIS_NONE = 0, PK11_DIS_USER_SELECTED = 1, PK11_DIS_COULD_NOT_INIT_TOKEN = 2, PK11_DIS_TOKEN_VERIFY_FAILED = 3,
  PK11_DIS_TOKEN_NOT_PRESENT = 4, PK11_DIS_NONE = 0, PK11_DIS_USER_SELECTED = 1, PK11_DIS_COULD_NOT_INIT_TOKEN = 2,
  PK11_DIS_TOKEN_VERIFY_FAILED = 3, PK11_DIS_TOKEN_NOT_PRESENT = 4
}
enum  PK11ObjectType {
  PK11_TypeGeneric = 0, PK11_TypePrivKey = 1, PK11_TypePubKey = 2, PK11_TypeCert = 3,
  PK11_TypeSymKey = 4, PK11_TypeGeneric = 0, PK11_TypePrivKey = 1, PK11_TypePubKey = 2,
  PK11_TypeCert = 3, PK11_TypeSymKey = 4
}
enum  PK11TokenStatus {
  PK11TokenNotRemovable = 0, PK11TokenPresent = 1, PK11TokenChanged = 2, PK11TokenRemoved = 3,
  PK11TokenNotRemovable = 0, PK11TokenPresent = 1, PK11TokenChanged = 2, PK11TokenRemoved = 3
}
enum  PK11TokenEvent { PK11TokenRemovedOrChangedEvent = 0, PK11TokenPresentEvent = 1, PK11TokenRemovedOrChangedEvent = 0, PK11TokenPresentEvent = 1 }

Variables

const SEC_ASN1Template SECKEY_PointerToEncryptedPrivateKeyInfoTemplate []
SEC_ASN1TemplateChooser NSS_Get_SECKEY_PointerToEncryptedPrivateKeyInfoTemplate
const SEC_ASN1Template SECKEY_EncryptedPrivateKeyInfoTemplate []
SEC_ASN1TemplateChooser NSS_Get_SECKEY_EncryptedPrivateKeyInfoTemplate
const SEC_ASN1Template SECKEY_PrivateKeyInfoTemplate []
SEC_ASN1TemplateChooser NSS_Get_SECKEY_PrivateKeyInfoTemplate
const SEC_ASN1Template SECKEY_PointerToPrivateKeyInfoTemplate []
SEC_ASN1TemplateChooser NSS_Get_SECKEY_PointerToPrivateKeyInfoTemplate

Class Documentation

struct SECMODModuleStr

Definition at line 71 of file secmodt.h.

Collaboration diagram for SECMODModuleStr:
Class Members
PRArenaPool * arena
int cipherOrder
char * commonName
CK_VERSION cryptokiVersion
char * dllName
unsigned long evControlMask
void * functionList
PRBool internal
PRBool isCritical
PRBool isFIPS
PRBool isModuleDB
PRBool isThreadSafe
void * library
char * libraryParams
PRBool loaded
void * moduleDBFunc
PRBool moduleDBOnly
SECMODModuleID moduleID
SECMODModule * parent
int refCount
PZLock * refLock
int slotCount
PK11PreSlotInfo * slotInfo
int slotInfoCount
PK11SlotInfo ** slots
unsigned long ssl
int trustOrder
struct SECMODModuleListStr

Definition at line 121 of file secmodt.h.

Class Members
SECMODModule * module
SECMODModuleList * next
struct PK11SlotListStr

Definition at line 126 of file secmodt.h.

Class Members
PK11SlotListElement * head
PZLock * lock
PK11SlotListElement * tail
struct PK11SlotListElementStr

Definition at line 132 of file secmodt.h.

Collaboration diagram for PK11SlotListElementStr:
Class Members
PK11SlotListElement * next
PK11SlotListElement * prev
int refCount
PK11SlotInfo * slot
struct PK11RSAGenParamsStr

Definition at line 139 of file secmodt.h.

Collaboration diagram for PK11RSAGenParamsStr:
Class Members
int keySizeInBits
unsigned long pe
struct PK11DefaultArrayEntryStr

Definition at line 161 of file secmodt.h.

Class Members
unsigned long flag
unsigned long mechanism
char * name
struct SECKEYAttributeStr

Definition at line 410 of file secmodt.h.

Class Members
SECItem attrType
SECItem ** attrValue
struct SECKEYPrivateKeyInfoStr

Definition at line 419 of file secmodt.h.

Collaboration diagram for SECKEYPrivateKeyInfoStr:
Class Members
SECAlgorithmID algorithm
PLArenaPool * arena
SECKEYAttribute ** attributes
SECItem privateKey
SECItem version
struct SECKEYEncryptedPrivateKeyInfoStr

Definition at line 431 of file secmodt.h.

Collaboration diagram for SECKEYEncryptedPrivateKeyInfoStr:
Class Members
SECAlgorithmID algorithm
PLArenaPool * arena
SECItem encryptedData

Define Documentation

#define CKA_DIGEST   0x81000000L

Definition at line 197 of file secmodt.h.

Definition at line 198 of file secmodt.h.

#define CKM_FAKE_RANDOM   0x80000efeL

Definition at line 195 of file secmodt.h.

#define CKM_INVALID_MECHANISM   0xffffffffL

Definition at line 196 of file secmodt.h.

#define CRL_IMPORT_BYPASS_CHECKS   0x00000001

Definition at line 457 of file secmodt.h.

Definition at line 456 of file secmodt.h.

#define PK11_ATTR_EXTRACTABLE   0x00000100L

Definition at line 333 of file secmodt.h.

#define PK11_ATTR_INSENSITIVE   0x00000080L

Definition at line 316 of file secmodt.h.

#define PK11_ATTR_MODIFIABLE   0x00000010L

Definition at line 290 of file secmodt.h.

#define PK11_ATTR_PRIVATE   0x00000004L

Definition at line 271 of file secmodt.h.

#define PK11_ATTR_PUBLIC   0x00000008L

Definition at line 272 of file secmodt.h.

#define PK11_ATTR_SENSITIVE   0x00000040L

Definition at line 315 of file secmodt.h.

#define PK11_ATTR_SESSION   0x00000002L

Definition at line 250 of file secmodt.h.

#define PK11_ATTR_TOKEN   0x00000001L

Definition at line 249 of file secmodt.h.

#define PK11_ATTR_UNEXTRACTABLE   0x00000200L

Definition at line 334 of file secmodt.h.

#define PK11_ATTR_UNMODIFIABLE   0x00000020L

Definition at line 291 of file secmodt.h.

#define PK11_DISABLE_FLAG   0x40000000L

Definition at line 192 of file secmodt.h.

#define PK11_OWN_PW_DEFAULTS   0x20000000L

Definition at line 191 of file secmodt.h.

Value:
"AUTH"  /* a successful attempt to authenticate
                                    * has completed. Continue without
                                    * another call to C_Login */

Definition at line 397 of file secmodt.h.

Value:
"RETRY"       /* an failed attempt to authenticate
                                    * has already been made, just retry
                                    * the operation */

Definition at line 396 of file secmodt.h.

Value:
"TRY"   /* Default: a prompt has been presented
                                    * to the user, initiate a C_Login
                                    * to authenticate the token */

Definition at line 401 of file secmodt.h.

#define SECMOD_AES_FLAG   0x00002000L

Definition at line 182 of file secmodt.h.

#define SECMOD_DES_FLAG   0x00000010L

Definition at line 173 of file secmodt.h.

#define SECMOD_DH_FLAG   0x00000020L

Definition at line 174 of file secmodt.h.

#define SECMOD_DSA_FLAG   0x00000002L

Definition at line 170 of file secmodt.h.

#define SECMOD_END_WAIT   0x01

Definition at line 117 of file secmodt.h.

#define SECMOD_EXTERNAL   0 /* external module */

Definition at line 337 of file secmodt.h.

#define SECMOD_FIPS   2 /* internal fips module */

Definition at line 339 of file secmodt.h.

Definition at line 350 of file secmodt.h.

#define SECMOD_FIPS_NAME   "NSS Internal FIPS PKCS #11 Module"

Definition at line 349 of file secmodt.h.

#define SECMOD_FORTEZZA_FLAG   0x00000040L

Definition at line 175 of file secmodt.h.

#define SECMOD_FRIENDLY_FLAG   0x10000000L

Definition at line 187 of file secmodt.h.

Definition at line 348 of file secmodt.h.

#define SECMOD_INT_NAME   "NSS Internal PKCS #11 Module"

Definition at line 347 of file secmodt.h.

#define SECMOD_INTERNAL   1 /* internal default module */

Definition at line 338 of file secmodt.h.

#define SECMOD_MAKE_NSS_FLAGS (   fips,
  slot 
)    "Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})"

Definition at line 344 of file secmodt.h.

#define SECMOD_MD2_FLAG   0x00000400L

Definition at line 179 of file secmodt.h.

#define SECMOD_MD5_FLAG   0x00000200L

Definition at line 178 of file secmodt.h.

#define SECMOD_RANDOM_FLAG   0x80000000L

Definition at line 188 of file secmodt.h.

#define SECMOD_RC2_FLAG   0x00000004L

Definition at line 171 of file secmodt.h.

#define SECMOD_RC4_FLAG   0x00000008L

Definition at line 172 of file secmodt.h.

#define SECMOD_RC5_FLAG   0x00000080L

Definition at line 176 of file secmodt.h.

#define SECMOD_RESERVED_FLAG   0X08000000L

Definition at line 186 of file secmodt.h.

#define SECMOD_RSA_FLAG   0x00000001L

Definition at line 169 of file secmodt.h.

#define SECMOD_SHA1_FLAG   0x00000100L

Definition at line 177 of file secmodt.h.

#define SECMOD_SHA256_FLAG   0x00004000L

Definition at line 183 of file secmodt.h.

#define SECMOD_SHA512_FLAG   0x00008000L /* also for SHA384 */

Definition at line 184 of file secmodt.h.

#define SECMOD_SLOT_FLAGS   "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,SHA256,SHA512]"

Definition at line 342 of file secmodt.h.

#define SECMOD_SSL_FLAG   0x00000800L

Definition at line 180 of file secmodt.h.

#define SECMOD_TLS_FLAG   0x00001000L

Definition at line 181 of file secmodt.h.

Definition at line 119 of file secmodt.h.

Definition at line 118 of file secmodt.h.


Typedef Documentation

Definition at line 205 of file secmodt.h.

typedef struct PK11ContextStr

Definition at line 62 of file secmodt.h.

typedef struct PK11DefaultArrayEntryStr

Definition at line 67 of file secmodt.h.

typedef void(* PK11FreeDataFunc)(void *)

Definition at line 69 of file secmodt.h.

typedef struct PK11GenericObjectStr

Definition at line 68 of file secmodt.h.

typedef PRBool(PR_CALLBACK * PK11IsLoggedInFunc)(PK11SlotInfo *slot, void *arg)

Definition at line 390 of file secmodt.h.

typedef char*(PR_CALLBACK * PK11PasswordFunc)(PK11SlotInfo *slot, PRBool retry, void *arg)

Definition at line 388 of file secmodt.h.

typedef struct PK11PreSlotInfoStr

Definition at line 60 of file secmodt.h.

typedef struct PK11RSAGenParamsStr

Definition at line 65 of file secmodt.h.

typedef struct PK11SlotInfoStr

Definition at line 59 of file secmodt.h.

typedef struct PK11SlotListElementStr

Definition at line 64 of file secmodt.h.

typedef struct PK11SlotListStr

Definition at line 63 of file secmodt.h.

typedef struct PK11SymKeyStr

Definition at line 61 of file secmodt.h.

typedef PRBool(PR_CALLBACK * PK11VerifyPasswordFunc)(PK11SlotInfo *slot, void *arg)

Definition at line 389 of file secmodt.h.

typedef struct SECKEYAttributeStr

Definition at line 414 of file secmodt.h.

Definition at line 436 of file secmodt.h.

typedef struct SECKEYPrivateKeyInfoStr

Definition at line 426 of file secmodt.h.

typedef NSSRWLock SECMODListLock

Definition at line 58 of file secmodt.h.

typedef unsigned long SECMODModuleID

Definition at line 66 of file secmodt.h.

typedef struct SECMODModuleListStr

Definition at line 57 of file secmodt.h.

typedef struct SECMODModuleStr

Definition at line 56 of file secmodt.h.


Enumeration Type Documentation

Enumerator:
PK11CertListUnique 
PK11CertListUser 
PK11CertListRootUnique 
PK11CertListCA 
PK11CertListCAUnique 
PK11CertListUserUnique 
PK11CertListAll 
PK11CertListUnique 
PK11CertListUser 
PK11CertListRootUnique 
PK11CertListCA 
PK11CertListCAUnique 
PK11CertListUserUnique 
PK11CertListAll 

Definition at line 144 of file secmodt.h.

             {
     PK11CertListUnique = 0,     /* get one instance of all certs */
     PK11CertListUser = 1,       /* get all instances of user certs */
     PK11CertListRootUnique = 2, /* get one instance of CA certs without a private key.
                                  * deprecated. Use PK11CertListCAUnique
                                  */
     PK11CertListCA = 3,         /* get all instances of CA certs */
     PK11CertListCAUnique = 4,   /* get one instance of CA certs */
     PK11CertListUserUnique = 5, /* get one instance of user certs */
     PK11CertListAll = 6         /* get all instances of all certs */
} PK11CertListType;
Enumerator:
PK11_DIS_NONE 
PK11_DIS_USER_SELECTED 
PK11_DIS_COULD_NOT_INIT_TOKEN 
PK11_DIS_TOKEN_VERIFY_FAILED 
PK11_DIS_TOKEN_NOT_PRESENT 
PK11_DIS_NONE 
PK11_DIS_USER_SELECTED 
PK11_DIS_COULD_NOT_INIT_TOKEN 
PK11_DIS_TOKEN_VERIFY_FAILED 
PK11_DIS_TOKEN_NOT_PRESENT 

Definition at line 366 of file secmodt.h.

Enumerator:
PK11_TypeGeneric 
PK11_TypePrivKey 
PK11_TypePubKey 
PK11_TypeCert 
PK11_TypeSymKey 
PK11_TypeGeneric 
PK11_TypePrivKey 
PK11_TypePubKey 
PK11_TypeCert 
PK11_TypeSymKey 

Definition at line 375 of file secmodt.h.

enum PK11Origin
Enumerator:
PK11_OriginNULL 
PK11_OriginDerive 
PK11_OriginGenerated 
PK11_OriginFortezzaHack 
PK11_OriginUnwrap 
PK11_OriginNULL 
PK11_OriginDerive 
PK11_OriginGenerated 
PK11_OriginFortezzaHack 
PK11_OriginUnwrap 

Definition at line 357 of file secmodt.h.

             {
    PK11_OriginNULL = 0,    /* There is not key, it's a null SymKey */
    PK11_OriginDerive = 1,  /* Key was derived from some other key */
    PK11_OriginGenerated = 2,      /* Key was generated (also PBE keys) */
    PK11_OriginFortezzaHack = 3,/* Key was marked for fortezza hack */
    PK11_OriginUnwrap = 4   /* Key was unwrapped or decrypted */
} PK11Origin;
Enumerator:
PK11TokenRemovedOrChangedEvent 
PK11TokenPresentEvent 
PK11TokenRemovedOrChangedEvent 
PK11TokenPresentEvent 

Definition at line 448 of file secmodt.h.

             {
Enumerator:
PK11TokenNotRemovable 
PK11TokenPresent 
PK11TokenChanged 
PK11TokenRemoved 
PK11TokenNotRemovable 
PK11TokenPresent 
PK11TokenChanged 
PK11TokenRemoved 

Definition at line 441 of file secmodt.h.

             {

Variable Documentation

Definition at line 173 of file pk11pk12.c.

Definition at line 184 of file pk11pk12.c.

Definition at line 145 of file pk11pk12.c.

Definition at line 133 of file pk11pk12.c.