mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1141815 - Remove nsIDOMCryptoDialogs interface and associated implementation; r=keeler
This commit is contained in:
parent
10ced0676b
commit
5814296e8c
@ -45,13 +45,6 @@
|
||||
<!ENTITY chooseToken.title "Choose Token Dialog">
|
||||
<!ENTITY chooseToken.message1 "Please choose a token.">
|
||||
|
||||
<!ENTITY escrowWarn.title "Encryption Key Copy">
|
||||
<!ENTITY escrowWarn.message1 "Important: This certificate authority has asked to make a backup of your encryption private key.">
|
||||
<!ENTITY escrowWarn.benefit1 "The benefit is that if you lose access to your encryption private key, you can request a copy from this certificate authority.">
|
||||
<!ENTITY escrowWarn.message2 "However, your encryption private key will be stored by the certificate authority, and could be used to read your encrypted email or documents without your permission.">
|
||||
<!ENTITY examineCert.label "View Certificate">
|
||||
<!ENTITY examineCert.accesskey "V">
|
||||
|
||||
<!-- Strings for the CreateCertInfo dialog -->
|
||||
<!ENTITY createCertInfo.title "Generating A Private Key">
|
||||
<!ENTITY createCertInfo.msg1 "Key Generation in progress… This may take a few minutes….">
|
||||
|
@ -75,8 +75,6 @@ pageInfo_Privacy_Broken1=Parts of the page you are viewing were not encrypted or
|
||||
certDetails=Certificate Viewer:
|
||||
notPresent=<Not Part Of Certificate>
|
||||
|
||||
escrowFinalMessage=You should click OK only if you trust "%S" to protect your encryption private key.
|
||||
|
||||
#Token Manager
|
||||
password_not_set=(not set)
|
||||
failed_pw_change=Unable to change Master Password.
|
||||
|
@ -1,47 +0,0 @@
|
||||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
|
||||
const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock;
|
||||
const nsIX509Cert = Components.interfaces.nsIX509Cert;
|
||||
|
||||
var dialogParams;
|
||||
var pkiParams;
|
||||
var cert=null;
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock);
|
||||
dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock);
|
||||
|
||||
var isupports = pkiParams.getISupportAtIndex(1);
|
||||
cert = isupports.QueryInterface(nsIX509Cert);
|
||||
var bundle = document.getElementById("pippki_bundle");
|
||||
var dispName = cert.commonName;
|
||||
if (dispName == null)
|
||||
dispName = cert.windowTitle;
|
||||
|
||||
var msg = bundle.getFormattedString("escrowFinalMessage", [dispName]);
|
||||
setText("message1",msg);
|
||||
}
|
||||
|
||||
function doOK()
|
||||
{
|
||||
dialogParams.SetInt(1,1);
|
||||
return true;
|
||||
}
|
||||
|
||||
function doCancel()
|
||||
{
|
||||
dialogParams.SetInt(1,0);
|
||||
return true;
|
||||
}
|
||||
|
||||
function viewCert()
|
||||
{
|
||||
viewCertHelper(window, cert);
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://pippki/locale/pippki.dtd">
|
||||
|
||||
<dialog id="escrowWarnDialog" title="&escrowWarn.title;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="width: 40em;"
|
||||
buttons="accept,cancel,extra2"
|
||||
buttonlabelextra2="&examineCert.label;"
|
||||
buttonaccesskeyextra2="&examineCert.accesskey;"
|
||||
ondialogaccept="return doOK();"
|
||||
ondialogcancel="return doCancel();"
|
||||
ondialogextra2="viewCert();"
|
||||
onload="onLoad();">
|
||||
|
||||
<stringbundle id="pippki_bundle" src="chrome://pippki/locale/pippki.properties"/>
|
||||
|
||||
<script type="application/javascript" src="chrome://pippki/content/pippki.js"/>
|
||||
<script type="application/javascript" src="chrome://pippki/content/escrowWarn.js"/>
|
||||
|
||||
<description>&escrowWarn.message1;</description>
|
||||
<separator/>
|
||||
<description>&escrowWarn.benefit1;</description>
|
||||
<separator/>
|
||||
<description>&escrowWarn.message2;</description>
|
||||
<separator/>
|
||||
<description id="message1"/>
|
||||
|
||||
</dialog>
|
@ -38,8 +38,6 @@ pippki.jar:
|
||||
content/pippki/load_device.xul (content/load_device.xul)
|
||||
content/pippki/choosetoken.xul (content/choosetoken.xul)
|
||||
content/pippki/choosetoken.js (content/choosetoken.js)
|
||||
content/pippki/escrowWarn.xul (content/escrowWarn.xul)
|
||||
content/pippki/escrowWarn.js (content/escrowWarn.js)
|
||||
content/pippki/createCertInfo.xul (content/createCertInfo.xul)
|
||||
content/pippki/createCertInfo.js (content/createCertInfo.js)
|
||||
content/pippki/protectedAuth.xul (content/protectedAuth.xul)
|
||||
|
@ -52,7 +52,6 @@ NS_IMPL_ISUPPORTS(nsNSSDialogs, nsITokenPasswordDialogs,
|
||||
nsIClientAuthDialogs,
|
||||
nsICertPickDialogs,
|
||||
nsITokenDialogs,
|
||||
nsIDOMCryptoDialogs,
|
||||
nsIGeneratingKeypairInfoDialogs)
|
||||
|
||||
nsresult
|
||||
@ -460,41 +459,6 @@ nsNSSDialogs::ChooseToken(nsIInterfaceRequestor *aCtx, const char16_t **aTokenLi
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* boolean ConfirmKeyEscrow (in nsIX509Cert escrowAuthority); */
|
||||
NS_IMETHODIMP
|
||||
nsNSSDialogs::ConfirmKeyEscrow(nsIX509Cert *escrowAuthority, bool *_retval)
|
||||
|
||||
{
|
||||
*_retval = false;
|
||||
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIPKIParamBlock> block =
|
||||
do_CreateInstance(NS_PKIPARAMBLOCK_CONTRACTID);
|
||||
if (!block)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
rv = block->SetISupportAtIndex(1, escrowAuthority);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = nsNSSDialogHelper::openDialog(nullptr,
|
||||
"chrome://pippki/content/escrowWarn.xul",
|
||||
block);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
int32_t status=0;
|
||||
nsCOMPtr<nsIDialogParamBlock> dlgParamBlock = do_QueryInterface(block);
|
||||
rv = dlgParamBlock->GetInt(1, &status);
|
||||
|
||||
if (status) {
|
||||
*_retval = true;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNSSDialogs::DisplayProtectedAuth(nsIInterfaceRequestor *aCtx, nsIProtectedAuthThread *runnable)
|
||||
{
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsIClientAuthDialogs.h"
|
||||
#include "nsICertPickDialogs.h"
|
||||
#include "nsITokenDialogs.h"
|
||||
#include "nsIDOMCryptoDialogs.h"
|
||||
#include "nsIGenKeypairInfoDlg.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
@ -28,7 +27,6 @@ class nsNSSDialogs
|
||||
public nsIClientAuthDialogs,
|
||||
public nsICertPickDialogs,
|
||||
public nsITokenDialogs,
|
||||
public nsIDOMCryptoDialogs,
|
||||
public nsIGeneratingKeypairInfoDialogs
|
||||
{
|
||||
public:
|
||||
@ -38,7 +36,6 @@ public:
|
||||
NS_DECL_NSICLIENTAUTHDIALOGS
|
||||
NS_DECL_NSICERTPICKDIALOGS
|
||||
NS_DECL_NSITOKENDIALOGS
|
||||
NS_DECL_NSIDOMCRYPTODIALOGS
|
||||
NS_DECL_NSIGENERATINGKEYPAIRINFODIALOGS
|
||||
nsNSSDialogs();
|
||||
|
||||
|
@ -32,7 +32,6 @@ static const mozilla::Module::ContractIDEntry kPKIContracts[] = {
|
||||
{ NS_CLIENTAUTHDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID },
|
||||
{ NS_CERTPICKDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID },
|
||||
{ NS_TOKENDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID },
|
||||
{ NS_DOMCRYPTODIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID },
|
||||
{ NS_GENERATINGKEYPAIRINFODIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID },
|
||||
{ NS_ASN1TREE_CONTRACTID, &kNS_NSSASN1OUTINER_CID },
|
||||
{ NS_PKIPARAMBLOCK_CONTRACTID, &kNS_PKIPARAMBLOCK_CID },
|
||||
|
@ -15,7 +15,6 @@ XPIDL_SOURCES += [
|
||||
'nsICertPickDialogs.idl',
|
||||
'nsIClientAuthDialogs.idl',
|
||||
'nsIDataSignatureVerifier.idl',
|
||||
'nsIDOMCryptoDialogs.idl',
|
||||
'nsIGenKeypairInfoDlg.idl',
|
||||
'nsIKeygenThread.idl',
|
||||
'nsIKeyModule.idl',
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIX509Cert;
|
||||
|
||||
[scriptable, uuid(1f8fe77e-1dd2-11b2-8dd2-e55f8d3465b8)]
|
||||
interface nsIDOMCryptoDialogs : nsISupports
|
||||
{
|
||||
/**
|
||||
* This method is used to warn the user the web site is
|
||||
* trying to escrow the generated private key. This
|
||||
* method should return true if the user wants to proceed
|
||||
* and false if the user cancels the action.
|
||||
*/
|
||||
boolean ConfirmKeyEscrow(in nsIX509Cert escrowAuthority);
|
||||
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define NS_DOMCRYPTODIALOGS_CONTRACTID "@mozilla.org/nsDOMCryptoDialogs;1"
|
||||
%}
|
Loading…
Reference in New Issue
Block a user