[evolution] Remove unused e_cert_db_import_user_cert().



commit 958b80584f717430391a1d38adf4c8eaba4d8c86
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Sep 24 21:47:03 2013 -0400

    Remove unused e_cert_db_import_user_cert().

 smime/lib/e-cert-db.c |   80 -------------------------------------------------
 smime/lib/e-cert-db.h |    4 --
 2 files changed, 0 insertions(+), 84 deletions(-)
---
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index c67ac7b..1039f4f 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -1139,86 +1139,6 @@ default_nickname (CERTCertificate *cert)
 }
 
 gboolean
-e_cert_db_import_user_cert (ECertDB *certdb,
-                            gchar *data,
-                            guint32 length,
-                            GError **error)
-{
-       /*  nsNSSShutDownPreventionLock locker;*/
-       PK11SlotInfo *slot;
-       gchar * nickname = NULL;
-       gboolean rv = FALSE;
-       gint numCACerts;
-       SECItem *CACerts;
-       CERTDERCerts * collectArgs;
-       PRArenaPool *arena;
-       CERTCertificate * cert = NULL;
-
-       arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
-       if (arena == NULL) {
-               set_nss_error (error);
-               goto loser;
-       }
-
-       collectArgs = e_cert_db_get_certs_from_package (arena, data, length);
-       if (!collectArgs) {
-               set_nss_error (error);
-               goto loser;
-       }
-
-       cert = CERT_NewTempCertificate (
-               CERT_GetDefaultCertDB (), collectArgs->rawCerts,
-               (gchar *) NULL, PR_FALSE, PR_TRUE);
-       if (!cert) {
-               set_nss_error (error);
-               goto loser;
-       }
-
-       slot = PK11_KeyForCertExists (cert, NULL, NULL);
-       if (slot == NULL) {
-               set_nss_error (error);
-               goto loser;
-       }
-       PK11_FreeSlot (slot);
-
-       /* pick a nickname for the cert */
-       if (cert->nickname) {
-               /* sigh, we need a call to look up other certs with this subject and
-                * identify nicknames from them. We can no longer walk down internal
-                * database structures  rjr */
-               nickname = cert->nickname;
-       }
-       else {
-               nickname = default_nickname (cert);
-       }
-
-       /* user wants to import the cert */
-       slot = PK11_ImportCertForKey (cert, nickname, NULL);
-       if (!slot) {
-               set_nss_error (error);
-               goto loser;
-       }
-       PK11_FreeSlot (slot);
-       numCACerts = collectArgs->numcerts - 1;
-
-       if (numCACerts) {
-               CACerts = collectArgs->rawCerts + 1;
-               if (!CERT_ImportCAChain (CACerts, numCACerts, certUsageUserCertImport)) {
-                       rv = TRUE;
-               }
-       }
-
- loser:
-       if (arena) {
-               PORT_FreeArena (arena, PR_FALSE);
-       }
-       if (cert) {
-               CERT_DestroyCertificate (cert);
-       }
-       return rv;
-}
-
-gboolean
 e_cert_db_import_server_cert (ECertDB *certdb,
                               gchar *data,
                               guint32 length,
diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h
index 0ea2023..6b0d6ea 100644
--- a/smime/lib/e-cert-db.h
+++ b/smime/lib/e-cert-db.h
@@ -86,10 +86,6 @@ gboolean             e_cert_db_import_email_cert (ECertDB *certdb,
                                                  GSList **imported_certs,
                                                  GError **error);
 
-gboolean             e_cert_db_import_user_cert (ECertDB *certdb,
-                                                gchar *data, guint32 length,
-                                                GError **error);
-
 gboolean             e_cert_db_import_server_cert (ECertDB *certdb,
                                                   gchar *data, guint32 length,
                                                   GSList **imported_certs,


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