aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-25 09:47:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-25 10:02:33 +0800
commit958b80584f717430391a1d38adf4c8eaba4d8c86 (patch)
tree4bbc14c5ab5e0a0a0d9f7b7e0373ba103c226288
parent3d7a9081a08a9d0964f3673dc742b857e752d48c (diff)
downloadgsoc2013-evolution-958b80584f717430391a1d38adf4c8eaba4d8c86.tar.gz
gsoc2013-evolution-958b80584f717430391a1d38adf4c8eaba4d8c86.tar.zst
gsoc2013-evolution-958b80584f717430391a1d38adf4c8eaba4d8c86.zip
Remove unused e_cert_db_import_user_cert().
-rw-r--r--smime/lib/e-cert-db.c80
-rw-r--r--smime/lib/e-cert-db.h4
2 files changed, 0 insertions, 84 deletions
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index c67ac7b095..1039f4f7ae 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 0ea2023a14..6b0d6ea6b1 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,