prodizy wrote:
Hi,

Is it possible to access NSS methods from an XPCOM DLL(of my
extension)? I mean, methods that are used by Firefox for hashing the
master password, encrypting the private key that is used to encrypt the
data etc(HashPassword(),  SHA1_Update() etc). Or should I look for a
third party library or implement my own?
You have 2 means of accessing NSS from withing an XPCOM.DLL:

1) you can access the public XPCOM objects generated by PSM. (see mozilla/security/manager/src/
2) you can access the NSS public functions directly.

If you choose, 2, you will still want PSM to initialize NSS, or you will cause all sorts of weirdness withing Firefox. This is easily accomplished by requestion access to a PSM XPCOM object. PSM will automatically initialize NSS in this case. You also must keep track of your own references in case 2. Ideally you will only hold references to NSS objects for a short time (the space of a call in your DLL). If you hold them longer you could prevent things like user profile switching form happening. If youneed to hold objects longer, try to hold the PSM XPCOM version of the objects.

bob
Any help is much appreciated.

Thanks & Regards,
--
Rajendra Prasad Murakonda
http://prodizy.livejournal.com/

_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to