Bug 1130413 - Remove unused nsITokenPasswordDialogs::GetPassword() function. r=jjones

This commit is contained in:
Cykesiopka 2015-02-26 13:05:00 +01:00
parent 3143ac9875
commit 427f94114a
6 changed files with 1 additions and 86 deletions

View File

@ -15,11 +15,6 @@
<!ENTITY resetPassword.title "Reset Master Password">
<!ENTITY resetPassword.text "If you reset your master password, all your stored web and e-mail passwords, form data, personal certificates, and private keys will be forgotten. Are you sure you want to reset your master password?">
<!-- Values for getpassword.xul -->
<!ENTITY getPassword.title "Enter Master Password">
<!ENTITY getPassword.tokenName2.label "Security Device:">
<!ENTITY getPassword.password.label "Password:">
<!-- Downloading a cert -->
<!ENTITY downloadCert.title "Downloading Certificate">
<!ENTITY downloadCert.message1 "You have been asked to trust a new Certificate Authority (CA).">

View File

@ -1,31 +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="getpassword" title="&getPassword.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: 30em;"
buttons="accept,cancel"
ondialogaccept="return getPassword();"
onload="onLoad();">
<stringbundle id="pippki_bundle" src="chrome://pippki/locale/pippki.properties"/>
<script type="application/javascript" src="chrome://pippki/content/password.js"/>
<hbox>
<label value="&getPassword.tokenName2.label;"/>
<label id="tokenName"/>
</hbox>
<separator/>
<hbox align="center">
<label value="&getPassword.password.label;"/>
<textbox id="pw1" type="password"/>
</hbox>
</dialog>

View File

@ -211,16 +211,6 @@ function setPassword()
return success;
}
function getPassword()
{
// grab what was entered
params.SetString(2, pw1.value);
// Return value
params.SetInt(1, 1);
// Terminate dialog
return true;
}
function setP12Password()
{
// grab what was entered

View File

@ -5,7 +5,6 @@
pippki.jar:
% content pippki %content/pippki/
content/pippki/changepassword.xul (content/changepassword.xul)
content/pippki/getpassword.xul (content/getpassword.xul)
content/pippki/password.js (content/password.js)
content/pippki/resetpassword.xul (content/resetpassword.xul)
content/pippki/resetpassword.js (content/resetpassword.js)

View File

@ -104,39 +104,6 @@ nsNSSDialogs::SetPassword(nsIInterfaceRequestor *ctx,
return rv;
}
nsresult
nsNSSDialogs::GetPassword(nsIInterfaceRequestor *ctx,
const char16_t *tokenName,
char16_t **_password,
bool* _canceled)
{
nsresult rv;
*_canceled = false;
// Get the parent window for the dialog
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
nsCOMPtr<nsIDialogParamBlock> block =
do_CreateInstance(NS_DIALOGPARAMBLOCK_CONTRACTID);
if (!block) return NS_ERROR_FAILURE;
// Set the token name in the window
rv = block->SetString(1, tokenName);
if (NS_FAILED(rv)) return rv;
// open up the window
rv = nsNSSDialogHelper::openDialog(parent,
"chrome://pippki/content/getpassword.xul",
block);
if (NS_FAILED(rv)) return rv;
// see if user canceled
int32_t status;
rv = block->GetInt(1, &status);
if (NS_FAILED(rv)) return rv;
*_canceled = (status == 0) ? true : false;
if (!*_canceled) {
// retrieve the password
rv = block->GetString(2, _password);
}
return rv;
}
NS_IMETHODIMP
nsNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
nsIX509Cert *cert,

View File

@ -12,7 +12,7 @@ interface nsIInterfaceRequestor;
* This is the interface for setting and changing password
* on a PKCS11 token.
*/
[scriptable, uuid(be26b580-1dd1-11b2-9946-c598d0d07727)]
[scriptable, uuid(87dbd64a-4466-474e-95f5-1ad1cee5702c)]
interface nsITokenPasswordDialogs : nsISupports
{
/**
@ -22,11 +22,6 @@ interface nsITokenPasswordDialogs : nsISupports
*/
void setPassword(in nsIInterfaceRequestor ctx, in wstring tokenName,
out boolean canceled);
void getPassword(in nsIInterfaceRequestor ctx,
in wstring tokenName,
out wstring password,
out boolean canceled);
};
%{C++