aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,