diff options
author | Chris Toshok <toshok@ximian.com> | 2003-12-04 04:48:05 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-12-04 04:48:05 +0800 |
commit | 2831ada5a5554a4a3c1920d73b43343d618f0e02 (patch) | |
tree | 718b56037a2e87c36f6c1fa9c9cdb8a62cf825d3 /smime/lib/e-cert.c | |
parent | d5cf06d5c681e540a545ccc11dfb9f1413ee02d6 (diff) | |
download | gsoc2013-evolution-2831ada5a5554a4a3c1920d73b43343d618f0e02.tar.gz gsoc2013-evolution-2831ada5a5554a4a3c1920d73b43343d618f0e02.tar.zst gsoc2013-evolution-2831ada5a5554a4a3c1920d73b43343d618f0e02.zip |
add e-asn1-object.[ch]
2003-12-03 Chris Toshok <toshok@ximian.com>
* lib/Makefile.am (libessmime_la_SOURCES): add e-asn1-object.[ch]
* gui/smime-ui.glade: rename the ca trust dialog, and give it a
proper id.
* gui/certificate-manager.c (yourcerts_selection_changed): just
use @selection.
(contactcerts_selection_changed): same.
(authoritycerts_selection_changed): same.
* gui/certificate-viewer.c (free_data): free the cert chain.
(fill_in_general): move all the general tab stuff here.
(hierarchy_selection_changed): new function. not finished.
(fields_selection_changed): new function, unimplemented.
(fill_in_details): new function, fill in the heirarchy and hook up
signals and stuff.
(certificate_viewer_show): call fill_in_general/fill_in_details.
* lib/e-cert.c (e_cert_get_chain): new function.
* lib/e-cert.h: add prototype for e_cert_get_chain.
svn path=/trunk/; revision=23622
Diffstat (limited to 'smime/lib/e-cert.c')
-rw-r--r-- | smime/lib/e-cert.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index a8fa5879c2..2389cc29c8 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -409,6 +409,31 @@ e_cert_get_md5_fingerprint (ECert *cert) return cert->priv->md5_fingerprint; } +GList* +e_cert_get_chain (ECert *ecert) +{ + GList *l = NULL; + + g_object_ref (ecert); + + while (ecert) { + CERTCertificate *cert = e_cert_get_internal_cert (ecert); + CERTCertificate *next_cert; + + l = g_list_append (l, ecert); + + if (SECITEM_CompareItem(&cert->derIssuer, &cert->derSubject) == SECEqual) + break; + + next_cert = CERT_FindCertIssuer (cert, PR_Now(), certUsageSSLClient); + if (!next_cert) + break; + ecert = e_cert_new (next_cert); + } + + return l; +} + gboolean e_cert_mark_for_deletion (ECert *cert) { |