unable to get pkcs11 module dll from thunderbird profiles

Sai Srujan <[email protected]>
Newsgroups gmane.comp.mozilla.crypto
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.