Bug #292776 --> Need Ability to Import CRLs from the web for apps like Thunderbird that aren't web browsers.

Add an import button which can import a CRL based on a URL.

moa/r=rrelyea
sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2005-05-03 23:56:18 +00:00
Родитель 28c4b69529
Коммит a160122f33
3 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -184,6 +184,8 @@ crlAutoupdateEnabled=Enabled
crlAutoupdateNotEnabled=Not Enabled
crlAutoupdateOk=OK
crlAutoupdateFailed=Failed
crlImportNewCRLTitle=Import Certificate Revocation List
crlImportNewCRLLabel=Import the CRL from:
#Import certificate(s) file dialog
importEmailCertPrompt=Select File containing somebody's Email certificate to import

Просмотреть файл

@ -238,3 +238,18 @@ function UpdateCRL()
crlEntry = crls.queryElementAt(i, nsICRLInfo);
crlManager.updateCRLFromURL(crlEntry.lastFetchURL, crlEntry.nameInDb);
}
function ImportCRL()
{
// prompt for the URL to import from
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var CRLLocation = {value:null};
var dummy = { value: 0 };
var strBundle = document.getElementById('pippki_bundle');
var addCRL = promptService.prompt(window, strBundle.getString('crlImportNewCRLTitle'),
strBundle.getString('crlImportNewCRLLabel'), CRLLocation, null, dummy);
if (addCRL)
crlManager.updateCRLFromURL(CRLLocation.value, "");
}

Просмотреть файл

@ -59,6 +59,7 @@
ondialoghelp="openHelp('validation-crl-manage');"
persist="screenX screenY width height">
<stringbundle id="pippki_bundle" src="chrome://pippki/locale/pippki.properties"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://pippki/content/crlManager.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js" />
@ -95,6 +96,8 @@
<button id="updateCRL" class="push" disabled="true"
label="&validation.updatecrl.label;"
oncommand="UpdateCRL();"/>
<button id="importCRL" class="push" label="&certmgr.restore.label;" oncommand="ImportCRL();"/>
<spacer flex="2" />
<button dlgtype="help"/>
</hbox>