Akkshayaa Venkatram wrote:

Hi

I am developing a Firefox extension that calls PKCS 11 functions like C_Encrypt, C_Sign, C_Decrypt and others..
We don't expose the direct C_ calls in NSS. NSS typically has the token open during the entire time, so applications making calls and changing states could cause some issues.

You can still access the functionality through the PK11 wrapper functions, but not many of those are exposed in javascript.

I am not sure how to call these functions from the javascript file. I have an idea that i must wrap these C functions in XPCOM-IDL. But not sure of how to do it..and what XPCOM IDL to use.
Yes, The actual "C" functions you need to wrap are defined in pk11pub.h. I usually look at some of the mozilla extensions built into the mozilla tree for examples on how to build an XPCOM file. This is a generic question which you can get a better answer on how to create xpcom objects in C and call it from javascript in the xpcom mailing lists.

bob

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

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to