aboutsummaryrefslogtreecommitdiffstats
path: root/smime/lib/e-pkcs12.h
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-11-26 16:54:48 +0800
committerChris Toshok <toshok@src.gnome.org>2003-11-26 16:54:48 +0800
commit4e4c16760abdbc2ab34b159e52c5c027a1b2ad26 (patch)
tree3011e05a12b84f273ae36b6109293a55fe1aec53 /smime/lib/e-pkcs12.h
parent30ff908fcddcf18107d8b0fd39e4504b2a69ef19 (diff)
downloadgsoc2013-evolution-4e4c16760abdbc2ab34b159e52c5c027a1b2ad26.tar.gz
gsoc2013-evolution-4e4c16760abdbc2ab34b159e52c5c027a1b2ad26.tar.zst
gsoc2013-evolution-4e4c16760abdbc2ab34b159e52c5c027a1b2ad26.zip
mostly implement a viewer for certificates.
2003-11-26 Chris Toshok <toshok@ximian.com> * gui/certificate-viewer.[ch]: mostly implement a viewer for certificates. * gui/smime-ui.glade: fingerprints-sh1 -> fingerprints-sha1. * gui/certificate-manager.c (import_your): new function, use e-pkcs12 to implement it. (initialize_yourcerts_ui): hook up the import button. (view_contact): new function, bring up the certificate viewer. (initialize_contactcerts_ui): hook up the view button. (view_ca): new function, bring up the certificate viewer. (initialize_authoritycerts_ui): hook up the view button. * gui/Makefile.am (libevolution_smime_la_SOURCES): add certificate-viewer.[ch] * lib/e-cert.c (e_cert_dispose): free all the new cached foo. (e_cert_populate): populate all the new cached foo. (e_cert_get_issuer_cn): new function. (e_cert_get_issuer_org): same. (e_cert_get_issuer_org_unit): same. (e_cert_get_issued_on_time): same. (e_cert_get_issued_on): same. (e_cert_get_expires_on_time): same. (e_cert_get_expires_on): same. (e_cert_get_serial_number): same. (e_cert_get_sha1_fingerprint): same. (e_cert_get_md5_fingerprint): same. * lib/e-cert.h: add prototypes for lots more accessors. * lib/e-cert-db.c (e_cert_db_find_cert_by_key): fix typo. (e_cert_db_find_cert_by_email_address): call CERT_DestroyCertificate to free the cert. (default_nickname): new function. (e_cert_db_import_user_cert): implement. (e_cert_db_import_server_cert): add blurb. * lib/e-pkcs12.[ch]: new files. * lib/Makefile.am (libessmime_la_SOURCES): add e-pkcs12.[ch] svn path=/trunk/; revision=23486
Diffstat (limited to 'smime/lib/e-pkcs12.h')
-rw-r--r--smime/lib/e-pkcs12.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/smime/lib/e-pkcs12.h b/smime/lib/e-pkcs12.h
new file mode 100644
index 0000000000..e6616aa85c
--- /dev/null
+++ b/smime/lib/e-pkcs12.h
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Chris Toshok <toshok@ximian.com>
+ *
+ * Copyright (C) 2003 Ximian, Inc. (www.ximian.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef _E_PKCS12_H_
+#define _E_PKCS12_H_
+
+#include <glib-object.h>
+
+#define E_TYPE_PKCS12 (e_pkcs12_get_type ())
+#define E_PKCS12(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_PKCS12, EPKCS12))
+#define E_PKCS12_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_PKCS12, EPKCS12Class))
+#define E_IS_PKCS12(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_PKCS12))
+#define E_IS_PKCS12_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_PKCS12))
+#define E_PKCS12_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_PKCS12, EPKCS12Class))
+
+typedef struct _EPKCS12 EPKCS12;
+typedef struct _EPKCS12Class EPKCS12Class;
+typedef struct _EPKCS12Private EPKCS12Private;
+
+struct _EPKCS12 {
+ GObject parent;
+
+ EPKCS12Private *priv;
+};
+
+struct _EPKCS12Class {
+ GObjectClass parent_class;
+
+ /* Padding for future expansion */
+ void (*_epkcs12_reserved0) (void);
+ void (*_epkcs12_reserved1) (void);
+ void (*_epkcs12_reserved2) (void);
+ void (*_epkcs12_reserved3) (void);
+ void (*_epkcs12_reserved4) (void);
+};
+
+GType e_pkcs12_get_type (void);
+
+EPKCS12* e_pkcs12_new (void);
+
+
+#if 0
+/* XXX we're not going to support additional slots in the initial ssl
+ stuff, so we just always default to the internal token (and thus
+ don't need this function yet. */
+gboolean e_pkcs12_set_token (void);
+#endif
+
+gboolean e_pkcs12_import_from_file (EPKCS12 *pkcs12, const char *path, GError **error);
+gboolean e_pkcs12_export_to_file (EPKCS12 *pkcs12, const char *path, GList *certs, GError **error);
+
+#endif /* _E_CERT_H_ */