aboutsummaryrefslogtreecommitdiffstats
path: root/smime/lib/e-cert.h
Commit message (Collapse)AuthorAgeFilesLines
* Use the same certificate-viewer as the trust-prompt from edsMilan Crha2012-12-121-1/+1
| | | | | | This way it'll be possible to copy whole files if change in one of them will be done. A real code reuse, rather than copy, would be ideal, but the trust-prompt is just a module for evolution-user-prompter.
* Coding style and whitespace cleanup.Matthew Barnes2011-09-041-5/+5
|
* Coding style cleanups.Matthew Barnes2010-09-131-1/+1
|
* Prefer GLib basic types over C types.Matthew Barnes2009-05-291-19/+19
|
* Remove trailing whitespace, again.Matthew Barnes2009-05-291-1/+1
|
* License ChangesSankarasivasubramanian Pasupathilingam2008-08-271-14/+15
| | | | svn path=/trunk/; revision=36116
* updated novell copyright notices (left others alone)Jeffrey Stedfast2008-06-211-1/+1
| | | | svn path=/trunk/; revision=35665
* Update FSF address in header comments (#469886). Patch from TobiasMatthew Barnes2007-09-021-1/+1
| | | | | | | | | | 2007-09-02 Matthew Barnes <mbarnes@redhat.com> * Update FSF address in header comments (#469886). Patch from Tobias Mueller. svn path=/trunk/; revision=34151
* ** See bugs #52061 & #52669.Not Zed2004-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-05-28 Not Zed <NotZed@Ximian.com> ** See bugs #52061 & #52669. * gui/smime-ui.glade: added cert-trust-dialog and tweaked the ca-trust-dialog. * gui/ca-trust-dialog.c (ca_trust_dialog_show): Fix the %s in the label. Slack. (ca_trust_dialog_show): slight rearrangement. * gui/certificate-manager.c (add_contact_cert): fill out fields. * lib/e-cert.c (e_cert_get_usage): helper to get the usage of a cert. * gui/certificate-manager.c (edit_ca): use the right certdb, not the e-one. (add_user_cert): fill out missing columns. * lib/e-cert.c (e_cert_get_ca_cert): new method to find the ca cert of a cert. * gui/cert-trust-dialog.[ch]: peer cert trust editor. * gui/certificate-manager.c (edit_contact): implement. svn path=/trunk/; revision=26119
* set the window title based on e_cert_get_window_title.Chris Toshok2003-12-051-0/+1
| | | | | | | | | | | | | 2003-12-04 Chris Toshok <toshok@ximian.com> * gui/certificate-viewer.c (certificate_viewer_show): set the window title based on e_cert_get_window_title. * lib/e-cert.c (e_cert_get_window_title): new function, for use with the certificate viewer. (create_asn1_struct): call e_cert_get_window_title. svn path=/trunk/; revision=23643
* add prototype for e_cert_get_asn1_struct.Chris Toshok2003-12-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-12-04 Chris Toshok <toshok@ximian.com> * lib/e-cert.h: add prototype for e_cert_get_asn1_struct. * lib/e-cert.c (e_cert_dispose): unref the asn1 object. (get_int_value): copy and massage from mozilla source. (process_version): same. (process_serial_number_der): same. (get_default_oid_format): same. (get_oid_text): same. (process_raw_bytes): same. (process_sec_algorithm_id): same. (process_subject_public_key_info): same. (process_ns_cert_type_extensions): same. (process_key_usage_extensions): same. (process_extension_data): same. (process_single_extension): same. (process_extensions): same. (process_name): same. (create_tbs_certificate_asn1_struct): same. (create_asn1_struct): same. (e_cert_get_asn1_struct): new function. * lib/e-asn1-object.c (e_asn1_object_dispose): free the display name, value, and children. (e_asn1_object_init): assume it's a valid container unless we hear otherwise. (e_asn1_object_new_from_cert): nuke. (e_asn1_object_set_valid_container): implement. (e_asn1_object_append_child): same. (e_asn1_object_set_display_name): same. (e_asn1_object_set_display_value): same. * lib/e-asn1-object.h: add prototypes for e_asn1_object_set_valid_container, e_asn1_object_set_display_name, e_asn1_object_set_display_value, and e_asn1_object_append_child. * gui/certificate-viewer.c (populate_fields_tree): populate the tree from the asn structure. (hierarchy_selection_changed): blow away the old fields_tree content and populate it again. (fields_selection_changed): implement, set the text view's contents to the asn1 object's display_value. (fill_in_details): expand all nodes in the hierarchy tree. svn path=/trunk/; revision=23640
* add e-asn1-object.[ch]Chris Toshok2003-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* mostly implement a viewer for certificates.Chris Toshok2003-11-261-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* implement using the e-cert-trust foo. (e_cert_get_email): implement.Chris Toshok2003-11-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-11-12 Chris Toshok <toshok@ximian.com> * lib/e-cert.c (e_cert_get_cert_type): implement using the e-cert-trust foo. (e_cert_get_email): implement. * lib/e-cert.h: add UNKNOWN cert type. * gui/smime-ui.glade: fix capitalization of "Import" on the contact certificate page. * gui/certificate-manager.c (import_contact): new function. implement email cert importing. (delete_contact): new function. (unload_certs): implement for E_CERT_CONTACT. (certificate_manager_config_control_new): get the contact cert action buttons from libglade. * lib/e-cert-db.c (handle_ca_cert_download): mostly implement the trust settings correctly. this still needs work pending the CA trust dialog's completion. (e_cert_db_delete_cert): fix the ifdef'ed code. (e_cert_db_import_user_cert): remove the ifdef'ed body of this, since it was copied from the CA code. * lib/Makefile.am (libessmime_la_SOURCES): add e-cert-trust.[ch] * lib/e-cert-trust.[ch]: new files, basically c&p nsNSSCertTrust from mozilla's PSM. svn path=/trunk/; revision=23308
* don't init NSS here. it's done in e_cert_db_peek.Chris Toshok2003-11-121-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* initial addition of s/mime foo.Chris Toshok2003-10-241-0/+67
2003-10-23 Chris Toshok <toshok@ximian.com> * lib/e-cert.[ch], lib/Makefile.am, gui/certificate-manager.[ch], gui/Makefile.am, gui/smime-ui.glade, Makefile.am: initial addition of s/mime foo. svn path=/trunk/; revision=23042