Commit Graph

4 Commits

Author SHA1 Message Date
4e4c16760a 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
2003-11-26 08:54:48 +00:00
4e1bce59fa don't init NSS here. it's done in e_cert_db_peek.
2003-11-11  Chris Toshok  <toshok@ximian.com>

	* tests/import-cert.c (main): don't init NSS here.  it's done in
	e_cert_db_peek.

	* lib/Makefile.am (libessmime_la_SOURCES): add e-cert-db.[ch]

	* gui/smime-ui.glade: set the initial sensitivity of the buttons
	here, and add the beginnings of the CA import dialog (where you
	assign trust levels to it.)

	* gui/certificate-manager.c (handle_selection_changed):
	sensitize/desensitize all the various buttons correctly when the
	GtkTreeView's selection changes.
	(yourcerts_selection_changed): new, selection change handler for
	the Your Certs tab.
	(initialize_yourcerts_ui): hook up the tree selection, and add a
	model column for the ECert.
	(contactcerts_selection_changed): new, selection change handler
	for the Contact Certs tab.
	(initialize_contactcerts_ui): hook up the tree selection, and add
	a model column for the ECert.
	(import_ca): new function.
	(delete_ca): new function.
	(authoritycerts_selection_changed): new, selection change handler
	for the Authority Certs tab.
	(create_authoritycerts_treemodel): new function for creating the
	authority cert tree model.  the other tabs will eventually use a
	separate function for this too, as unload_certs gets fleshed out.
	(initialize_authoritycerts_ui): hook up the tree selection, and
	add import/delete buttons.
	(destroy_key): dtor for the keys in our hashes.
	(destroy_value): dtor for the values in our hashes.
	(unload_certs): new function.  basically destroy/recreate the
	model and hash for the particular cert type/tab.
	(load_certs): use e_cert_get_cert_type.
	(populate_ui): use unload_certs as well as load_certs.
	(certificate_manager_config_control_new): call e_cert_db_peek
	,which will initialize all of NSS.  hook up all the widgets from
	libglade.

	* lib/e-cert.h: add prototypes for all the new methods, and add
	the ECertType enum.

	* lib/e-cert.c (e_cert_dispose): handle deletion from the DB here.
	(e_cert_new_from_der): new function.
	(e_cert_get_internal_cert): new function.
	(e_cert_get_raw_der): new function.
	(e_cert_get_issuer_name): new
	(e_cert_get_subject_name): new
	(e_cert_mark_for_deletion): new
	(e_cert_get_cert_type): new.
	(e_cert_is_ca_cert): nuke.

	* lib/e-cert-db.[ch]: new, partly implemented, derived from
	mozilla's nsNSSCertificateDB code.

svn path=/trunk/; revision=23292
2003-11-12 02:07:25 +00:00
4981fa14e2 use CERT_UI_CFLAGS. (TEST_LIBS): use CERT_UI_LIBS.
2003-10-30  Chris Toshok  <toshok@ximian.com>

	* tests/Makefile.am (INCLUDES): use CERT_UI_CFLAGS.
	(TEST_LIBS): use CERT_UI_LIBS.

svn path=/trunk/; revision=23139
2003-10-30 21:05:48 +00:00
e432971d03 initial checkin
svn path=/trunk/; revision=23137
2003-10-30 20:28:32 +00:00