[evolution] Remove unused e_cert_db_find_cert_by_email_address().



commit 3d7a9081a08a9d0964f3673dc742b857e752d48c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Sep 24 21:46:07 2013 -0400

    Remove unused e_cert_db_find_cert_by_email_address().

 smime/lib/e-cert-db.c |   54 -------------------------------------------------
 smime/lib/e-cert-db.h |    4 ---
 2 files changed, 0 insertions(+), 58 deletions(-)
---
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index d8d782b..c67ac7b 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -586,60 +586,6 @@ e_cert_db_shutdown (void)
        /* XXX */
 }
 
-ECert *
-e_cert_db_find_cert_by_email_address (ECertDB *certdb,
-                                      const gchar *email,
-                                      GError **error)
-{
-       /*  nsNSSShutDownPreventionLock locker; */
-       ECert *cert;
-       CERTCertificate *any_cert;
-       CERTCertList *certlist;
-
-       any_cert = CERT_FindCertByNicknameOrEmailAddr (
-               CERT_GetDefaultCertDB (), (gchar *) email);
-
-       if (!any_cert) {
-               set_nss_error (error);
-               return NULL;
-       }
-
-       /* any_cert now contains a cert with the right subject,
-        * but it might not have the correct usage. */
-       certlist = CERT_CreateSubjectCertList (
-               NULL,
-               CERT_GetDefaultCertDB (),
-               &any_cert->derSubject,
-               PR_Now (), PR_TRUE);
-       if (!certlist) {
-               set_nss_error (error);
-               CERT_DestroyCertificate (any_cert);
-               return NULL;
-       }
-
-       if (SECSuccess != CERT_FilterCertListByUsage (
-               certlist, certUsageEmailRecipient, PR_FALSE)) {
-               set_nss_error (error);
-               CERT_DestroyCertificate (any_cert);
-               CERT_DestroyCertList (certlist);
-               return NULL;
-       }
-
-       if (CERT_LIST_END (CERT_LIST_HEAD (certlist), certlist)) {
-               set_nss_error (error);
-               CERT_DestroyCertificate (any_cert);
-               CERT_DestroyCertList (certlist);
-               return NULL;
-       }
-
-       cert = e_cert_new (CERT_DupCertificate (CERT_LIST_HEAD (certlist)->cert));
-
-       CERT_DestroyCertList (certlist);
-       CERT_DestroyCertificate (any_cert);
-
-       return cert;
-}
-
 static gboolean
 confirm_download_ca_cert (ECertDB *cert_db,
                           ECert *cert,
diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h
index 179b79b..0ea2023 100644
--- a/smime/lib/e-cert-db.h
+++ b/smime/lib/e-cert-db.h
@@ -70,10 +70,6 @@ ECertDB *             e_cert_db_peek         (void);
 
 void                 e_cert_db_shutdown     (void);
 
-ECert *               e_cert_db_find_cert_by_email_address (ECertDB *certdb,
-                                                          const gchar *nickname,
-                                                          GError **error);
-
 /* deleting certificates */
 gboolean             e_cert_db_delete_cert (ECertDB *certdb,
                                            ECert   *cert);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]