Chuck Lee wrote:
> I am studying how to support import CA on WIFI WPA-EAP mode, and
> I seems best way is use NSS.
> I use nsIX509CertDB.importPKCS12File(), it works fine on desktop
> Firefox in my test code.

> But the same code crashes gecko when it shows a dialog asking for
> password. it seems that b2g can't handle XUL dialogs in NSS
> correctly.

> I am taught to override functions triggering XUL dialogs with a
> system message and an app in gaia to do the same work.
> It do work, but I think it makes things much complex, also
> against what XUL is designed for.
> 
> Anyway, is it possible possible to make XUL dialogs of NSS work on
> b2g platform?

It is a bad idea to try to reuse any of the PSM UI on B2G or Android. In fact, 
some of us are even trying to get rid of it for desktop too. The best thing to 
do is to create a variant of importPKCS12File() that doesn't have a UI, and 
then create something that uses it from a Gaia-based UI. If you create such a 
variant of importPKCS12File() then ask me for the review. (I am the module 
owner of security/manager.)

Also, do you really need to import a PKCS12 file, or do you really need to be 
able to import just plain X.509 certs? If you just need the ability to import 
plain certs, then see nsIx509Cert.addCert().

Cheers,
Brian
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to