Shaun Savage wrote:
> HI
>
>
>
> I am wanting to use the NSS3.2 interface *.so library in a mozilla XPCOM
>
> module that I am writing.
>
>
>
> iasAcert::iasAcert()
>
> {
>
> nsresult rv = NS_OK;
>
> char *aPath = NULL;
>
>
>
> NS_INIT_ISUPPORTS();
>
> /* add more init here */
>
>
>
> nsCOMPtr<nsIFile> aDir;
>
> rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
>
> getter_AddRefs(aDir));
>
> if (NS_FAILED(rv)) return;
>
>
>
> aDir->GetPath(&aPath);
>
>
>
> NSS_InitReadWrite(aPath);
>
> }
>
>
>
> How do I load the nss3.so for this call? I have moved the libnss3.so
>
> and all the other security lib to dist/bin/
On most platforms you link with the shared library or the shared library
stubs (NT). On Unix you make sure that libnss3.so is in your
LD_LIBRARY_PATH (LIBPATH for AIX). The OS should automatically load the
shared library when your program gets launched or plugin gets loaded.
Just a quick question. Are you running under mozilla? If so, is there
some reason you are trying to call NSS directly instead of calling
through PSM. As you can imagine, you could run into difficulty if
multiple pluggins each try to initialize NSS themselves.
bob
>
>
>
> Should I move them to dist/components/?
>
>
>
> Should/How do I do a QueryInterface?
>
>
>
> Thanxs in advance
>
>
>
> Shaun