Wan-Teh Chang wrote:
So, if the app has already initialized NSS,
you just go ahead and use NSS functions. Else,
you have to initialize NSS (in the "no database"
mode) first, and have to shut down NSS.
This sample code assumes that this thread is
the only thread that may initialize NSS in the
app.
This assumption is false.
As he is trying to do a Firefox extension, his code will live in the
same process as the rest of NSS, therefore I think he should not go that
path.
Only if you can be *absolutely* sure that your own code will run prior
to any other PSM/NSS code, and only if you can be *absolutely* sure that
your "special ealy code" will be completed prior to any other PSM/NSS
code, you could try the approach illustrated by Wan-Teh.
If you have doubts, it's likely that there will be a race between your
own code and the global PSM code, and things will fail.
Kai
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto