Hello again,

First off, thanks for the help on the previous issue Nelson.

I'm playing around here just trying to do some simple things to ramp up my knowledge of NSS and C in general. I have read through as much of the docs that are on the mozilla.org site as seem applicable (http://www.mozilla.org/projects/security/pki/nss/#Documentation). I have the whole concept of the internal PKCS11 module down in my head and understand it's much better not to try to work with keys/certs in the raw from filesystem.

Basically at this point I'm a bit lost/confused as to what methods to use. I started with some simple PK11_Sign and PK11_Verify using an RSA private key gleaned using PK11_FindKeyByAnyCert method and the public key grabbed from the certificate using CERT_ExtractPublicKey. The sign appears ok, but the verify segfaults. I looking into SEC_SignData which appears to be a little more flexible and lets you specify an algorithm (which I will need to do) but couldn't find a method that appeared to be the corresponding verify.

I also looked into the P7* methods but while looking through the newsgroups I found a message from Nelson saying the P7* methods are deprecated and to use the NSS_CMS methods.
(http://groups.google.com/group/netscape.public.mozilla.crypto/browse_thread/thread/cee36c26a8da63e8/5506dd92390196f0?rnum=2#5506dd92390196f0)
So of course I go scouring through header files and such for that and it looks like those interfaces are geared more towards S/MIME. I'm only interested in producing the actual signature bytes and not a full PKCS7 block with certs and all. I *assume* I'm just in the wrong place all over again.

Is there a place on the web somewhere where the deprecated/recommended stuff is listed to some extent? Anything out there that you guys would recommend reading to assist me with this and NSS in general?

Thanks,
Dave


On a somewhat related note, a tip for people looking to snag code from the command line utils or anywhere else. LXR is great for finding stuff, but I also use koders.com and they put the line #'s and code in 2 separate columns of a table so you can copy/paste without getting the line #s.

Compare:
http://www.koders.com/c/fid0A35197002C68FE761EABA6992E84BC7A7828B0E.aspx
http://lxr.mozilla.org/security/source/security/nss/lib/smime/cmsutil.c
_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to