58
58
extern int secmod_PrivateModuleCount;
60
60
extern void SECMOD_Init(void);
61
SECStatus secmod_ModuleInit(SECMODModule *mod, PRBool* alreadyLoaded);
61
SECStatus secmod_ModuleInit(SECMODModule *mod, SECMODModule **oldModule,
62
PRBool* alreadyLoaded);
63
64
/* list managment */
64
65
extern SECStatus SECMOD_AddModuleToList(SECMODModule *newModule);
74
75
/* Operate on modules by name */
75
76
extern SECMODModule *SECMOD_FindModuleByID(SECMODModuleID);
77
extern SECMODModule *secmod_FindModuleByFuncPtr(void *funcPtr);
77
79
/* database/memory management */
78
80
extern SECMODModuleList *SECMOD_NewModuleListElement(void);
84
86
extern unsigned long SECMOD_InternaltoPubCipherFlags(unsigned long internalFlags);
86
88
/* Library functions */
87
SECStatus SECMOD_LoadPKCS11Module(SECMODModule *);
89
SECStatus secmod_LoadPKCS11Module(SECMODModule *, SECMODModule **oldModule);
88
90
SECStatus SECMOD_UnloadModule(SECMODModule *);
89
91
void SECMOD_SetInternalModule(SECMODModule *);
92
PRBool secmod_IsInternalKeySlot(SECMODModule *);
94
/* tools for checking if we are loading the same database twice */
95
typedef struct SECMODConfigListStr SECMODConfigList;
96
/* collect all the databases in a given spec */
97
SECMODConfigList *secmod_GetConfigList(PRBool isFIPS, char *spec, int *count);
98
/* see is a spec matches a database on the list */
99
PRBool secmod_MatchConfigList(char *spec,
100
SECMODConfigList *conflist, int count);
101
/* free our list of databases */
102
void secmod_FreeConfigList(SECMODConfigList *conflist, int count);
104
/* parsing parameters */
105
/* returned char * must be freed by caller with PORT_Free */
106
/* children and ids are null terminated arrays which must be freed with
107
* secmod_FreeChildren */
108
char *secmod_ParseModuleSpecForTokens(PRBool convert,
113
void secmod_FreeChildren(char **children, CK_SLOT_ID *ids);
114
char *secmod_MkAppendTokensList(PRArenaPool *arena, char *origModuleSpec,
115
char *newModuleSpec, CK_SLOT_ID newID,
116
char **children, CK_SLOT_ID *ids);
117
char *secmod_DoubleEscape(const char *string, char quote1, char quote2);
91
121
void SECMOD_SlotDestroyModule(SECMODModule *module, PRBool fromSlot);
92
122
CK_RV pk11_notify(CK_SESSION_HANDLE session, CK_NOTIFICATION event,