#include <time.h>
#include <glib.h>
Include dependency graph for certificate.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _PurpleCertificate |
A certificate instance. More... | |
struct | _PurpleCertificatePool |
Database for retrieval or storage of Certificates. More... | |
struct | _PurpleCertificateScheme |
A certificate type. More... | |
struct | _PurpleCertificateVerifier |
A set of operations used to provide logic for verifying a Certificate's authenticity. More... | |
struct | _PurpleCertificateVerificationRequest |
Structure for a single certificate request. More... | |
Certificate Verification Functions | |
void | purple_certificate_verify (PurpleCertificateVerifier *verifier, const gchar *subject_name, GList *cert_chain, PurpleCertificateVerifiedCallback cb, gpointer cb_data) |
Constructs a verification request and passed control to the specified Verifier. | |
void | purple_certificate_verify_complete (PurpleCertificateVerificationRequest *vrq, PurpleCertificateVerificationStatus st) |
Completes and destroys a VerificationRequest. | |
Certificate Functions | |
PurpleCertificate * | purple_certificate_copy (PurpleCertificate *crt) |
Makes a duplicate of a certificate. | |
GList * | purple_certificate_copy_list (GList *crt_list) |
Duplicates an entire list of certificates. | |
void | purple_certificate_destroy (PurpleCertificate *crt) |
Destroys and free()'s a Certificate. | |
void | purple_certificate_destroy_list (GList *crt_list) |
Destroy an entire list of Certificate instances and the containing list. | |
gboolean | purple_certificate_signed_by (PurpleCertificate *crt, PurpleCertificate *issuer) |
Check whether 'crt' has a valid signature made by 'issuer'. | |
gboolean | purple_certificate_check_signature_chain (GList *chain) |
Check that a certificate chain is valid. | |
PurpleCertificate * | purple_certificate_import (PurpleCertificateScheme *scheme, const gchar *filename) |
Imports a PurpleCertificate from a file. | |
gboolean | purple_certificate_export (const gchar *filename, PurpleCertificate *crt) |
Exports a PurpleCertificate to a file. | |
GByteArray * | purple_certificate_get_fingerprint_sha1 (PurpleCertificate *crt) |
Retrieves the certificate public key fingerprint using SHA1. | |
gchar * | purple_certificate_get_unique_id (PurpleCertificate *crt) |
Get a unique identifier for the certificate. | |
gchar * | purple_certificate_get_issuer_unique_id (PurpleCertificate *crt) |
Get a unique identifier for the certificate's issuer. | |
gchar * | purple_certificate_get_subject_name (PurpleCertificate *crt) |
Gets the certificate subject's name. | |
gboolean | purple_certificate_check_subject_name (PurpleCertificate *crt, const gchar *name) |
Check the subject name against that on the certificate. | |
gboolean | purple_certificate_get_times (PurpleCertificate *crt, time_t *activation, time_t *expiration) |
Get the expiration/activation times. | |
Certificate Pool Functions | |
gchar * | purple_certificate_pool_mkpath (PurpleCertificatePool *pool, const gchar *id) |
Helper function for generating file paths in ~/.purple/certificates for CertificatePools that use them. | |
gboolean | purple_certificate_pool_usable (PurpleCertificatePool *pool) |
Determines whether a pool can be used. | |
PurpleCertificateScheme * | purple_certificate_pool_get_scheme (PurpleCertificatePool *pool) |
Looks up the scheme the pool operates under. | |
gboolean | purple_certificate_pool_contains (PurpleCertificatePool *pool, const gchar *id) |
Check for presence of an ID in a pool. | |
PurpleCertificate * | purple_certificate_pool_retrieve (PurpleCertificatePool *pool, const gchar *id) |
Retrieve a certificate from a pool. | |
gboolean | purple_certificate_pool_store (PurpleCertificatePool *pool, const gchar *id, PurpleCertificate *crt) |
Add a certificate to a pool. | |
gboolean | purple_certificate_pool_delete (PurpleCertificatePool *pool, const gchar *id) |
Remove a certificate from a pool. | |
GList * | purple_certificate_pool_get_idlist (PurpleCertificatePool *pool) |
Get the list of IDs currently in the pool. | |
void | purple_certificate_pool_destroy_idlist (GList *idlist) |
Destroys the result given by purple_certificate_pool_get_idlist(). | |
Certificate Subsystem API | |
void | purple_certificate_init (void) |
Initialize the certificate system. | |
void | purple_certificate_uninit (void) |
Un-initialize the certificate system. | |
gpointer | purple_certificate_get_handle (void) |
Get the Certificate subsystem handle for signalling purposes. | |
PurpleCertificateScheme * | purple_certificate_find_scheme (const gchar *name) |
Look up a registered CertificateScheme by name. | |
GList * | purple_certificate_get_schemes (void) |
Get all registered CertificateSchemes. | |
gboolean | purple_certificate_register_scheme (PurpleCertificateScheme *scheme) |
Register a CertificateScheme with libpurple. | |
gboolean | purple_certificate_unregister_scheme (PurpleCertificateScheme *scheme) |
Unregister a CertificateScheme from libpurple. | |
PurpleCertificateVerifier * | purple_certificate_find_verifier (const gchar *scheme_name, const gchar *ver_name) |
Look up a registered PurpleCertificateVerifier by scheme and name. | |
GList * | purple_certificate_get_verifiers (void) |
Get the list of registered CertificateVerifiers. | |
gboolean | purple_certificate_register_verifier (PurpleCertificateVerifier *vr) |
Register a CertificateVerifier with libpurple. | |
gboolean | purple_certificate_unregister_verifier (PurpleCertificateVerifier *vr) |
Unregister a CertificateVerifier with libpurple. | |
PurpleCertificatePool * | purple_certificate_find_pool (const gchar *scheme_name, const gchar *pool_name) |
Look up a registered PurpleCertificatePool by scheme and name. | |
GList * | purple_certificate_get_pools (void) |
Get the list of registered Pools. | |
gboolean | purple_certificate_register_pool (PurpleCertificatePool *pool) |
Register a CertificatePool with libpurple and call its init function. | |
gboolean | purple_certificate_unregister_pool (PurpleCertificatePool *pool) |
Unregister a CertificatePool with libpurple and call its uninit function. | |
Typedefs | |
typedef _PurpleCertificate | PurpleCertificate |
typedef _PurpleCertificatePool | PurpleCertificatePool |
typedef _PurpleCertificateScheme | PurpleCertificateScheme |
typedef _PurpleCertificateVerifier | PurpleCertificateVerifier |
typedef _PurpleCertificateVerificationRequest | PurpleCertificateVerificationRequest |
typedef void(* | PurpleCertificateVerifiedCallback )(PurpleCertificateVerificationStatus st, gpointer userdata) |
Callback function for the results of a verification check. | |
Enumerations | |
enum | PurpleCertificateVerificationStatus { PURPLE_CERTIFICATE_INVALID = 0, PURPLE_CERTIFICATE_VALID = 1 } |
Functions | |
void | purple_certificate_display_x509 (PurpleCertificate *crt) |
Displays a window showing X.509 certificate information. | |
void | purple_certificate_add_ca_search_path (const char *path) |
Add a search path for certificates. |
Definition in file certificate.h.
|
Callback function for the results of a verification check.
Definition at line 61 of file certificate.h. |
|
Add a search path for certificates.
|
|
Check that a certificate chain is valid. Uses purple_certificate_signed_by() to verify that each PurpleCertificate in the chain carries a valid signature from the next. A single-certificate chain is considered to be valid.
|
|
Check the subject name against that on the certificate.
|
|
Makes a duplicate of a certificate.
|
|
Duplicates an entire list of certificates.
|
|
Destroys and free()'s a Certificate.
|
|
Destroy an entire list of Certificate instances and the containing list.
|
|
Displays a window showing X.509 certificate information.
|
|
Exports a PurpleCertificate to a file.
|
|
Look up a registered PurpleCertificatePool by scheme and name.
|
|
Look up a registered CertificateScheme by name.
|
|
Look up a registered PurpleCertificateVerifier by scheme and name.
|
|
Retrieves the certificate public key fingerprint using SHA1.
|
|
Get a unique identifier for the certificate's issuer.
|
|
Get the list of registered Pools.
|
|
Get all registered CertificateSchemes.
|
|
Gets the certificate subject's name. For X.509, this is the "Common Name" field, as we're only using it for hostname verification at the moment
|
|
Get the expiration/activation times.
|
|
Get a unique identifier for the certificate.
|
|
Get the list of registered CertificateVerifiers.
|
|
Imports a PurpleCertificate from a file.
|
|
Check for presence of an ID in a pool.
|
|
Remove a certificate from a pool.
|
|
Destroys the result given by purple_certificate_pool_get_idlist().
|
|
Get the list of IDs currently in the pool.
|
|
Looks up the scheme the pool operates under.
|
|
Helper function for generating file paths in ~/.purple/certificates for CertificatePools that use them. All components will be escaped for filesystem friendliness.
|
|
Retrieve a certificate from a pool.
|
|
Add a certificate to a pool. Any pre-existing certificate of the same ID will be overwritten.
|
|
Determines whether a pool can be used. Checks whether the associated CertificateScheme is loaded.
|
|
Register a CertificatePool with libpurple and call its init function.
|
|
Register a CertificateScheme with libpurple. No two schemes can be registered with the same name; this function enforces that.
|
|
Register a CertificateVerifier with libpurple.
|
|
Check whether 'crt' has a valid signature made by 'issuer'.
|
|
Unregister a CertificatePool with libpurple and call its uninit function.
|
|
Unregister a CertificateScheme from libpurple.
|
|
Unregister a CertificateVerifier with libpurple.
|
|
Constructs a verification request and passed control to the specified Verifier. It is possible that the callback will be called immediately upon calling this function. Plan accordingly.
|
|
Completes and destroys a VerificationRequest.
|