Hi,all:
I'm programming for an XPCOM, It would call CERT_XXX prototypes for the 
certificate handle.
First of my thought, I called:
     PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);
     NSS_Init(strCertPath);//strCertPath is Cert's db pathname.
    //Here, I do not check NSS_Init return value.
so, CERT_XXX would run normally, such as:CERT_GetDefaultCertDB would 
retrieve an effectively DB handle.
     while end of my handling, I called NSS_Shutdown, and Mozilla crashed.

Second, if my program do not call PR_Init and NSS_Init, CERT_XXX would not 
run, that means, CERT_GetDefaultCertDB would return NULL.

Now, I have caught that, when  Mozilla starts, it will call PR_Init and 
NSS_Init, XPCOM internal of Mozilla, they were holded in a common process, 
so XPCOM should not call PR_Init and NSS_Init once again.

Could I call PR_Init and NSS_Init in XPCOM? Otherwise, what should I do?

Anyone can give me any hints? Thanks very much in advance! 


_______________________________________________
mozilla-crypto mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-crypto

Reply via email to