Akkshayaa Venkatram wrote:
Hello,

 From the mozilla tree,
http://mxr.mozilla.org/mozilla/source/security/nss/lib/pk11wrap/pk11pub.h#109
I want to call the PK11 functions for encrypt, decrypt, sign, verify, etc.. from my
Firefox extension that is written in javascript.

Eg:
SECKEYPrivateKey *PK11_GenerateKeyPair(PK11SlotInfo *slot,
    CK_MECHANISM_TYPE type, void *param, SECKEYPublicKey **pubk,
                             PRBool isPerm, PRBool isSensitive, void *wincx);

I looked at the XPCOM IDL's for PKCS11 and only one very few functions are implemented in that to be called from the javascript. If i have to be able to call the other PK11 functions that works with my smart card device, from the javascript file, what is the
best solution ?
Very Little is exported right now, it pretty much happens when someone has a need (like PSM Chrome). That being said, must of the functionality for PK11_GenerateKeyPair is available through either:

1) the keygen tag (I'm not sure how you reach it from XPCOM, but I'm pretty sure it's reachable). --- or --- 2) the crypto.generateCRMFRequest() object off of the window. (see hhttps://developer.mozilla.org/en/GenerateCRMFRequest)

both of these are available to web pages as well as extensions.

bob
Are these functions implemented in any existing IDLs?
Should i write a new XPCOM Interface that links to these PK11 functions?

Please suggest the best method to proceed further.. Also any useful links that i can
refer....


Thanks in advance,
Akkshayaa


_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

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

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to