Notary: Difference between revisions

Jump to navigation Jump to search
1,406 bytes added ,  25 May 2007
No edit summary
 
Line 17: Line 17:
==Notes==
==Notes==


This is stuff that I write down because it took me many wasted hours to get it.
==Regarding importing/loading Certificates into XULRunner==
<table width="100%" border="1">
<table width="100%" border="1">
<tr>
<th>File</th>
<th>What is this</th>
</tr>
<tr>
<tr>
<td>secmod.db</td>
<td>secmod.db</td>
Line 35: Line 42:
* It is also good to note that cert8.db, key3.db, and secmod.db do not exist until you use the function for the first time.  XULRunner does not create these files when creating a profile.
* It is also good to note that cert8.db, key3.db, and secmod.db do not exist until you use the function for the first time.  XULRunner does not create these files when creating a profile.
* Importing saves automatically.
* Importing saves automatically.
* I may be able just to copy over certificates from firefox, and use them.
* The best solution (IMO) is to copy over certificates from firefox, and use them.
 
==Regarding Certificates in trees==
I thought I could get away with empty &lt;tree&gt;&lt;/tree&gt; and loading it similar to [http://mxr.mozilla.org/mozilla1.8/source/security/manager/pki/resources/content/certManager.js#64 how the browser does it]. But this needs more work.
 
The process goes something like this :
# Cache your certificates using nsscertcache
# Create an nsCertTree and loadCertsFromCache (In my situation, I passed nsIX509Cert.CA_CERT for Certificate Authorities)
# Take the XUL tree object, grab treeBoxObject.view, and set it to your nsCertTree that you created above.
 
This, at minimum requires tree, treecol, and an empty treechildren. It will fill up with 100+ rows of Certificate authorities. Which is correct, but there all blank.
 
Once again, [http://mxr.mozilla.org mxr] to the rescue. It seems that your treecol need very specific ID's for this to work, which isn't documented as far as I know. These are :
<table width="100%" border="1">
<tr>
<th>ID</th>
<th>What is this</th>
</tr>
<tr>
<td>certcol</td>
<td>Certificate Name</td>
</tr>
<tr>
<td>tokencol</td>
<td>Security Device</td>
</tr>
</table>
 
I think those are the only two. So there should be two cols, with those ids.
78

edits

Navigation menu