diff --git a/mobile/android/components/NSSDialogService.js b/mobile/android/components/NSSDialogService.js index b67322afcf39..47ff408d106e 100644 --- a/mobile/android/components/NSSDialogService.js +++ b/mobile/android/components/NSSDialogService.js @@ -81,9 +81,17 @@ NSSDialogs.prototype = { }, getPKCS12FilePassword: function(aCtx, aPassword) { - // this dialog is never shown in Fennec; in Desktop it is shown while backing up a personal - // certificate to a file via Preferences->Advanced->Encryption->View Certificates->Your Certificates - throw "Unimplemented"; + let response = this.showPrompt(this.getString("pkcs12.getpassword.title"), + this.getString("pkcs12.getpassword.message"), + [ this.getString("nssdialogs.ok.label"), + this.getString("nssdialogs.cancel.label") + ], + [ { type: "password", id: "pw" } ]); + if (response.button != 0) { + return false; + } + aPassword.value = response.pw; + return true; }, certInfoSection: function(aHeading, aDataPairs, aTrailingNewline = true) { diff --git a/mobile/android/locales/en-US/chrome/pippki.properties b/mobile/android/locales/en-US/chrome/pippki.properties index e54b9027d533..2d64bd274831 100644 --- a/mobile/android/locales/en-US/chrome/pippki.properties +++ b/mobile/android/locales/en-US/chrome/pippki.properties @@ -14,6 +14,8 @@ downloadCert.trustEmail=Trust to identify email users. downloadCert.trustObjSign=Trust to identify software developers. caCertExists.title=Certificate Exists caCertExists.message=The Certificate already exists. +pkcs12.getpassword.title=Password Entry Dialog +pkcs12.getpassword.message=Please enter the password that was used to encrypt this certificate backup. certmgr.title=Certificate Details # These strings are stolen from security/manager/locales/en-US/chrome/pippki/certManager.dtd