/* Windows pre-defined entry */ #ifdefined(XP_WIN) && !defined(NSS_NO_INIT_SUPPORT) #include <windows.h>
BOOL WINAPI
DllMain(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpReserved) // reserved
{ // Perform actions based on the reason for calling. switch (fdwReason) { case DLL_PROCESS_ATTACH: // Initialize once for each new process. // Return FALSE to fail DLL load.
lg_startup_tests(); break;
case DLL_THREAD_ATTACH: // Do thread-specific initialization. break;
case DLL_THREAD_DETACH: // Do thread-specific cleanup. break;
case DLL_PROCESS_DETACH: // Perform any necessary cleanup. break;
} returnTRUE; // Successful DLL_PROCESS_ATTACH.
} #endif
PORT_Assert(!lg_self_tests_ran);
PORT_Assert(!lg_self_tests_success);
lg_self_tests_ran = PR_TRUE;
lg_self_tests_success = PR_FALSE; /* just in case */
/* no self tests required for the legacy db, only the integrity check */ /* check the integrity of our shared library */ if (!BLAPI_SHVerify(libraryName, (PRFuncPtr)&lg_local_function)) { /* something is wrong with the library, fail without enabling
* the fips token */ return;
} /* FIPS product has been installed and is functioning, allow
* the module to operate in fips mode */
lg_self_tests_success = PR_TRUE;
}
PRBool
lg_FIPSEntryOK()
{ #ifdef NSS_NO_INIT_SUPPORT /* this should only be set on platforms that can't handle one of the INIT *schemes.Thiscodeallowsthoseplatformstocontinuetofunction, *thoughtheydon'tmeetthestrictNISTrequirements.IfNO_INIT_SUPPORT *isnotset,andinitsupporthasnotbeenproperlyenabled,softken
* will always fail because of the test below */ if (!lg_self_tests_ran) {
lg_startup_tests();
} #endif return lg_self_tests_success;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.