Brian,
Brian Ryner wrote:
I'll do some profiling to make sure it's the DB initialization that's
causing the performance hit.
I guess maybe I should have mentioned that I'm currently using these
methods through the nsICryptoHash XPCOM wrapper. So we'd either need to
change that object to know that it can do a NoDB_Init if full
initialization hasn't happened yet, or I could switch over to using the
NSS functions directly. Are there any problems with a Firefox extension
linking directly to NSS?
There should be no problem linking to NSS in a Firefox extension, but
you definitely want to let the browser/PSM do the NSS initialization, as
opposed to your own code. If you call NSS_NoDB_Init before PSM
initializes NSS, then no NSS databases will be available to Firefox, eg.
all SSL connections will fail due to the lack of trusted CA certs.
I can't help you with which PSM functions you need to call to ensure
that PSM is initialized unfortunately, but Kai Engert should know the
answer.
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto