After calling this function - SECMOD_OpenUserDB getting error like "No Error"
here the source code-
/* samp.cpp */
//------------------------------------------------------
PK11SlotInfo *sltinf = NULL;
char *libname = "";
char *modspec =
"configdir='.\\AppData\\Roaming\\Thunderbird\\Profiles' secmod=secmod.db
tokenDescription='PKCS11 Module' flags= readOnly"
HRESULT hr = S_OK;
hr = NSS_Initialize( moduleSpec, "", "", NULL , NSS_INIT_READONLY );
if (hr != S_OK)
{
printf("initialization failed due to %s \n",moduleSpec);
__leave;
}
sltinf = SECMOD_OpenUserDB( modspec );
if ( NULL == sltinf )
{
perror("::SECMOD_OpenUserDB::");
__leave;
} // if
libname = sltinf->module->dllName;
printf( "Obtained lib name: %s\n", libname );
SECMOD_CloseUserDB( sltinf );
//------------------------------------------------------
Here i am getting nothing in "sltinf"
Included all nss specific headers which are required for code.
--
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto