diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-09-25 09:46:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-09-25 10:02:33 +0800 |
commit | 3d7a9081a08a9d0964f3673dc742b857e752d48c (patch) | |
tree | 9776da9f4fd61151ab9d140571c4cf41b61512c8 /smime | |
parent | 5a09348fdbbff55b2bbc0ae9b03b359549662834 (diff) | |
download | gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar.gz gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar.bz2 gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar.lz gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar.xz gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.tar.zst gsoc2013-evolution-3d7a9081a08a9d0964f3673dc742b857e752d48c.zip |
Remove unused e_cert_db_find_cert_by_email_address().
Diffstat (limited to 'smime')
-rw-r--r-- | smime/lib/e-cert-db.c | 54 | ||||
-rw-r--r-- | 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 d8d782b986..c67ac7b095 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 179b79b70d..0ea2023a14 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); |