On 2009-08-13 17:58 PDT, Aditya Ivaturi wrote:
> I am writing an xulrunner application, which would take a website's
> address, download the cert & import it in to the current firefox
> profile database. This is my first xulrunner application & as such
> there are few things I am confused about. So please bear with me.
> 
> I am trying to use the XPCOM APIs 
> http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/public/
> & seems like nsIX509CertDB2.addCertFromBase64() (
> http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/public/nsIX509CertDB2.idl
> ) might be the right function call to use. But I am
> not sure about the second parameter for that method. The doc says:
> 
>  * @param aTrust decoded by CERT_DecodeTrustString. 3 comma separated
> characters, indicating SSL, Email, and Obj signing trust

That's not quite right.  They are 3 strings of zero or more alphabetic
characters, separated by commas.

> What are these 3 comma separated characters and where can I find more
> info about them? 

An explanation of the alphabetic characters may be found on mozilla's web
site at

http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html#1034193

or at

http://blogs.sun.com/meena/entry/notes_about_trust_flags

> Also, does this method add the certificate to the database of the current
> firefox profile (I am using firefox.exe -app to launch my app)?

The cert is added to the cert DB in whatever profile is open by the process
in which the XPCOM function is invoked.
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to