Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » loading a private key into the embedded browser widget
loading a private key into the embedded browser widget [message #1012554] Thu, 21 February 2013 19:33
Mark Fishman is currently offline Mark FishmanFriend
Messages: 27
Registered: March 2011
Junior Member
This is a rather esoteric question but I figured I would see if anyone has any suggestions.

This problem is yet another one that I have run into since I upgraded from Eclipse 3.7.2/Xulrunner 3.6 to Eclipse 3.8.1/Xulrunner 10.0.4. My application does a browser.execute() call to run some javascript to configure my browser. As part of that configuration, my javascript looks up the nsIX509CertDB service and calls the importPKCS12File method on it. This allows me to load the user's private key into xulrunner's certificate store. This call works fine in my older code but ever since I upgraded it has no longer worked. The behavior that I see is that the prompt requesting the password for the certificate file comes up but when I click OK in it, nothing happens. The dialog does not disappear and no error is displayed. The only way I can make the password dialog go away is by clicking the cancel button.

My javascript code looks like:

// lookup xpcom components
var certDB = Components.classes[";1"].
var aFile = Components.classes[";1"].

var tokenDB = Components.classes[";1"].

// make sure that the certificate store will not require a master password

// initialize the file to the path for the cert

// load the cert
certDB.importPKCS12File(null, aFile);

Has anyone seen anything similar? Additionally, does anyone either have any good suggestions on how to debug this from within my SWT application or else any other ways to load a user certificate into xulrunner's store?


-- Mark
Previous Topic:Extending or increaing horizontal scrollbar width
Next Topic:How put an OleControlSite in read-only
Goto Forum:

Current Time: Fri Jun 22 13:39:19 GMT 2018

Powered by FUDForum. Page generated in 0.02076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top