b=96018 r=ddrinan sr=blake

New "Reset Master Password" functionality, for users who have forgotten their password.
This commit is contained in:
kaie%netscape.com 2001-09-08 00:44:39 +00:00
parent 0c703bc57c
commit 7ad5645929
8 changed files with 48 additions and 0 deletions

View File

@ -99,3 +99,10 @@ function ChangePW()
internal_token.tokenName,
"chrome,resizable=1,modal=1,dialog=1");
}
function ResetPW()
{
window.open("chrome://pippki/content/resetpassword.xul",
internal_token.tokenName,
"centerscreen,chrome,resizable=1,modal=1,dialog=1");
}

View File

@ -97,4 +97,18 @@
</hbox>
</groupbox>
<!-- Reset Password -->
<groupbox orient="vertical">
<label value="&resetpassword.label;"/>
<html>&resetpassword.text1;</html>
<html>&resetpassword.text2;</html>
<hbox halign="left" autostretch="never">
<button class="dialog" label="&resetpassword.button;" disabled="false"
oncommand="ResetPW();"
id="resetPasswordButton"
pref="true" preftype="bool" prefattribute="disabled"
prefstring="security.disable_button.resetPassword"/>
</hbox>
</groupbox>
</window>

View File

@ -3,6 +3,8 @@ pippki.jar:
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)
content/pippki/PrefOverlay.xul (content/PrefOverlay.xul)
content/pippki/pref-security.js (content/pref-security.js)
content/pippki/pref-ssl.xul (content/pref-ssl.xul)

View File

@ -29,6 +29,10 @@
<!ENTITY setPassword.meter.label "Password quality meter">
<!ENTITY setPassword.meter.loading "Loading">
<!-- Values for resetpassword.xul -->
<!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.tokenName.label "Security Device">

View File

@ -146,3 +146,7 @@ certmgr.verifiedNoOCSP=Verified (No OCSP)
# CRL next update.
crlNextUpdateMsg1=%S cannot establish an encrypted connection with "%S".
crlNextUpdateMsg2=The certificate revocation list (CRL) from "%S" needs to be updated.
resetPasswordButtonLabel=Reset
resetPasswordConfirmationTitle=Reset Master Password
resetPasswordConfirmationMessage=Your password has been reset.

View File

@ -32,3 +32,8 @@
<!ENTITY changepassword.label "Change Master Password">
<!ENTITY changepassword.text "Your master password protects sensitive information such as web passwords and certificates.">
<!ENTITY changepassword.button "Change Password">
<!ENTITY resetpassword.label "Reset Master Password">
<!ENTITY resetpassword.text1 "If you have forgotten your master password, you can reset it.">
<!ENTITY resetpassword.text2 "All your stored web and e-mail passwords, form data, personal certificates, and private keys will be erased.">
<!ENTITY resetpassword.button "Reset Password">

View File

@ -59,6 +59,11 @@ interface nsIPK11Token : nsISupports
void login(in boolean force);
void logout();
/*
* Reset password
*/
void reset();
/*
* Password information
*/

View File

@ -165,6 +165,13 @@ NS_IMETHODIMP nsPK11Token::Logout()
return NS_OK;
}
/* void reset (); */
NS_IMETHODIMP nsPK11Token::Reset()
{
PK11_ResetToken(mSlot, 0);
return NS_OK;
}
/* readonly attribute long minimumPasswordLength; */
NS_IMETHODIMP nsPK11Token::GetMinimumPasswordLength(PRInt32 *aMinimumPasswordLength)
{