Bug 1251009 - Remove unused nsICertificateDialogs.notifyCACertExists() method. r=keeler, r=mfinkle
authorCykesiopka <cykesiopka.bmo@gmail.com>
Wed, 16 Mar 2016 12:48:59 -0700
changeset 314822 1aea33a2d87b0aaff041874c72fe4852f5c1b603
parent 314821 38e342dd4d937d3cfe0592d49024d2e16a9d4de2
child 314823 73977dc040ffd25eefd863df069ffab322d574d2
push idunknown
push userunknown
push dateunknown
reviewerskeeler, mfinkle
bugs1251009
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1251009 - Remove unused nsICertificateDialogs.notifyCACertExists() method. r=keeler, r=mfinkle MozReview-Commit-ID: 5CFAsy5e1Cl
mobile/android/components/NSSDialogService.js
mobile/android/locales/en-US/chrome/pippki.properties
security/manager/locales/en-US/chrome/pippki/pippki.properties
security/manager/pki/nsNSSDialogs.cpp
security/manager/ssl/nsICertificateDialogs.idl
--- a/mobile/android/components/NSSDialogService.js
+++ b/mobile/android/components/NSSDialogService.js
@@ -87,21 +87,16 @@ NSSDialogs.prototype = {
       aTrust.value = Ci.nsIX509CertDB.UNTRUSTED;
       if (response.trustSSL) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_SSL;
       if (response.trustEmail) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_EMAIL;
       if (response.trustSign) aTrust.value |= Ci.nsIX509CertDB.TRUSTED_OBJSIGN;
       return true;
     }
   },
 
-  notifyCACertExists: function(aCtx) {
-    let p = this.getPrompt(this.getString("caCertExists.title"), this.getString("caCertExists.message"));
-    this.showPrompt(p);
-  },
-
   setPKCS12FilePassword: 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";
   },
 
   getPKCS12FilePassword: function(aCtx, aPassword) {
     let prompt = this.getPrompt(this.getString("pkcs12.getpassword.title"),
--- a/mobile/android/locales/en-US/chrome/pippki.properties
+++ b/mobile/android/locales/en-US/chrome/pippki.properties
@@ -7,18 +7,16 @@ nssdialogs.cancel.label=Cancel
 
 # These strings are stolen from security/manager/locales/en-US/chrome/pippki/pippki.dtd
 downloadCert.title=Downloading Certificate
 downloadCert.message1=You have been asked to trust a new Certificate Authority (CA).
 downloadCert.viewCert.label=View
 downloadCert.trustSSL=Trust to identify websites.
 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.
 clientAuthAsk.title=User Identification Request
 clientAuthAsk.message1=This site has requested that you identify yourself with a certificate:
 clientAuthAsk.message2=Choose a certificate to present as identification:
 clientAuthAsk.message3=Details of selected certificate:
 clientAuthAsk.remember.label=Remember this decision
 clientAuthAsk.organization=Organization: "%S"
--- a/security/manager/locales/en-US/chrome/pippki/pippki.properties
+++ b/security/manager/locales/en-US/chrome/pippki/pippki.properties
@@ -139,12 +139,8 @@ addExceptionExpiredLong2=The certificate
 addExceptionUnverifiedOrBadSignatureShort=Unknown Identity
 addExceptionUnverifiedOrBadSignatureLong2=The certificate is not trusted because it hasn't been verified as issued by a trusted authority using a secure signature.
 addExceptionValidShort=Valid Certificate
 addExceptionValidLong=This site provides valid, verified identification.  There is no need to add an exception.
 addExceptionCheckingShort=Checking Information
 addExceptionCheckingLong2=Attempting to identify this siteā€¦
 addExceptionNoCertShort=No Information Available
 addExceptionNoCertLong2=Unable to obtain identification status for this site.
-
-#Certificate Exists in database
-caCertExistsTitle=Certificate Exists
-caCertExistsMessage=The Certificate already exists.
--- a/security/manager/pki/nsNSSDialogs.cpp
+++ b/security/manager/pki/nsNSSDialogs.cpp
@@ -153,46 +153,23 @@ nsNSSDialogs::ConfirmDownloadCACert(nsII
   *_trust |= (email) ? nsIX509CertDB::TRUSTED_EMAIL : 0;
   *_trust |= (objsign) ? nsIX509CertDB::TRUSTED_OBJSIGN : 0;
 
   *_retval = (status != 0);
 
   return rv;
 }
 
-NS_IMETHODIMP 
-nsNSSDialogs::NotifyCACertExists(nsIInterfaceRequestor *ctx)
-{
-  nsresult rv;
-
-  nsCOMPtr<nsIPromptService> promptSvc(do_GetService(NS_PROMPTSERVICE_CONTRACTID));
-  if (!promptSvc)
-    return NS_ERROR_FAILURE;
-
-  // Get the parent window for the dialog
-  nsCOMPtr<mozIDOMWindowProxy> parent = do_GetInterface(ctx);
-
-  nsAutoString title;
-  rv = mPIPStringBundle->GetStringFromName(MOZ_UTF16("caCertExistsTitle"),
-                                           getter_Copies(title));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  nsAutoString msg;
-  rv = mPIPStringBundle->GetStringFromName(MOZ_UTF16("caCertExistsMessage"),
-                                           getter_Copies(msg));
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  rv = promptSvc->Alert(parent, title.get(), msg.get());
-
-  return rv;
-}
-
-
 NS_IMETHODIMP
-nsNSSDialogs::ChooseCertificate(nsIInterfaceRequestor *ctx, const char16_t *cn, const char16_t *organization, const char16_t *issuer, const char16_t **certNickList, const char16_t **certDetailsList, uint32_t count, int32_t *selectedIndex, bool *canceled) 
+nsNSSDialogs::ChooseCertificate(nsIInterfaceRequestor* ctx, const char16_t* cn,
+                                const char16_t* organization,
+                                const char16_t* issuer,
+                                const char16_t** certNickList,
+                                const char16_t** certDetailsList, uint32_t count,
+                                int32_t* selectedIndex, bool* canceled)
 {
   nsresult rv;
   uint32_t i;
 
   *canceled = false;
 
   // Get the parent window for the dialog
   nsCOMPtr<nsIDOMWindow> parent = do_GetInterface(ctx);
--- a/security/manager/ssl/nsICertificateDialogs.idl
+++ b/security/manager/ssl/nsICertificateDialogs.idl
@@ -20,28 +20,19 @@ interface nsICertificateDialogs : nsISup
    *
    *  @param ctx A user interface context.
    *  @param cert The certificate that is about to get installed.
    *  @param trust a bit mask of trust flags, 
    *               see nsIX509CertDB for possible values.
    *
    *  @return true if the user allows to import the certificate.
    */
-  boolean confirmDownloadCACert(in nsIInterfaceRequestor ctx, 
-                         in nsIX509Cert cert,
-                         out unsigned long trust);
-
-  /**
-   *  UI shown when a web site has delivered a CA certificate to
-   *  be imported, but the certificate is already contained in the
-   *  user's storage.
-   *
-   *  @param ctx A user interface context.
-   */
-  void notifyCACertExists(in nsIInterfaceRequestor ctx);
+  boolean confirmDownloadCACert(in nsIInterfaceRequestor ctx,
+                                in nsIX509Cert cert,
+                                out unsigned long trust);
 
   /**
    *  UI shown when a user's personal certificate is going to be
    *  exported to a backup file.
    *  The implementation of this dialog should make sure 
    *  to prompt the user to type the password twice in order to
    *  confirm correct input.
    *  The wording in the dialog should also motivate the user