|  |  |  | GMime 2.6 Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
enum GMimePubKeyAlgo; enum GMimeDigestAlgo; enum GMimeCertificateTrust; GMimeCertificate; GMimeCertificate * g_mime_certificate_new (void); GMimePubKeyAlgo g_mime_certificate_get_pubkey_algo (GMimeCertificate *cert); void g_mime_certificate_set_pubkey_algo (GMimeCertificate *cert,GMimePubKeyAlgo algo); GMimeDigestAlgo g_mime_certificate_get_digest_algo (GMimeCertificate *cert); void g_mime_certificate_set_digest_algo (GMimeCertificate *cert,GMimeDigestAlgo algo); const char * g_mime_certificate_get_issuer_serial (GMimeCertificate *cert); void g_mime_certificate_set_issuer_serial (GMimeCertificate *cert,const char *issuer_serial); const char * g_mime_certificate_get_issuer_name (GMimeCertificate *cert); void g_mime_certificate_set_issuer_name (GMimeCertificate *cert,const char *issuer_name); const char * g_mime_certificate_get_fingerprint (GMimeCertificate *cert); void g_mime_certificate_set_fingerprint (GMimeCertificate *cert,const char *fingerprint); time_t g_mime_certificate_get_created (GMimeCertificate *cert); void g_mime_certificate_set_created (GMimeCertificate *cert,time_t created); time_t g_mime_certificate_get_expires (GMimeCertificate *cert); void g_mime_certificate_set_expires (GMimeCertificate *cert,time_t expires); const char * g_mime_certificate_get_key_id (GMimeCertificate *cert); void g_mime_certificate_set_key_id (GMimeCertificate *cert,const char *key_id); GMimeCertificateTrust g_mime_certificate_get_trust (GMimeCertificate *cert); void g_mime_certificate_set_trust (GMimeCertificate *cert,GMimeCertificateTrust trust); const char * g_mime_certificate_get_email (GMimeCertificate *cert); void g_mime_certificate_set_email (GMimeCertificate *cert,const char *email); const char * g_mime_certificate_get_name (GMimeCertificate *cert); void g_mime_certificate_set_name (GMimeCertificate *cert,const char *name); GMimeCertificateList; GMimeCertificateList * g_mime_certificate_list_new (void); int g_mime_certificate_list_length (GMimeCertificateList *list); void g_mime_certificate_list_clear (GMimeCertificateList *list); int g_mime_certificate_list_add (GMimeCertificateList *list,GMimeCertificate *cert); void g_mime_certificate_list_insert (GMimeCertificateList *list,int index,GMimeCertificate *cert); gboolean g_mime_certificate_list_remove (GMimeCertificateList *list,GMimeCertificate *cert); gboolean g_mime_certificate_list_remove_at (GMimeCertificateList *list,int index); gboolean g_mime_certificate_list_contains (GMimeCertificateList *list,GMimeCertificate *cert); int g_mime_certificate_list_index_of (GMimeCertificateList *list,GMimeCertificate *cert); GMimeCertificate * g_mime_certificate_list_get_certificate (GMimeCertificateList *list,int index); void g_mime_certificate_list_set_certificate (GMimeCertificateList *list,int index,GMimeCertificate *cert);
A GMimeCertificate is an object containing useful information about a digital certificate as used in signing and encrypting data.
typedef enum {
	GMIME_PUBKEY_ALGO_DEFAULT  = 0,
	GMIME_PUBKEY_ALGO_RSA      = 1,
	GMIME_PUBKEY_ALGO_RSA_E    = 2,
	GMIME_PUBKEY_ALGO_RSA_S    = 3,
	GMIME_PUBKEY_ALGO_ELG_E    = 16,
	GMIME_PUBKEY_ALGO_DSA      = 17,
	GMIME_PUBKEY_ALGO_ELG      = 20
} GMimePubKeyAlgo;
A public-key algorithm.
| The default public-key algorithm. | |
| The RSA algorithm. | |
| An encryption-only RSA algorithm. | |
| A signature-only RSA algorithm. | |
| An encryption-only ElGamal algorithm. | |
| The DSA algorithm. | |
| The ElGamal algorithm. | 
typedef enum {
	GMIME_DIGEST_ALGO_DEFAULT     = 0,
	GMIME_DIGEST_ALGO_MD5         = 1,
	GMIME_DIGEST_ALGO_SHA1        = 2,
	GMIME_DIGEST_ALGO_RIPEMD160   = 3,
	GMIME_DIGEST_ALGO_MD2         = 5,
	GMIME_DIGEST_ALGO_TIGER192    = 6,
	GMIME_DIGEST_ALGO_HAVAL5160   = 7,
	GMIME_DIGEST_ALGO_SHA256      = 8,
	GMIME_DIGEST_ALGO_SHA384      = 9,
	GMIME_DIGEST_ALGO_SHA512      = 10,
	GMIME_DIGEST_ALGO_SHA224      = 11,
	GMIME_DIGEST_ALGO_MD4         = 301
} GMimeDigestAlgo;
A hash algorithm.
| The default hash algorithm. | |
| The MD5 hash algorithm. | |
| The SHA-1 hash algorithm. | |
| The RIPEMD-160 hash algorithm. | |
| The MD2 hash algorithm. | |
| The TIGER-192 hash algorithm. | |
| The HAVAL-5-160 hash algorithm. | |
| The SHA-256 hash algorithm. | |
| The SHA-384 hash algorithm. | |
| The SHA-512 hash algorithm. | |
| The SHA-224 hash algorithm. | |
| The MD4 hash algorithm. | 
typedef enum {
	GMIME_CERTIFICATE_TRUST_NONE,
	GMIME_CERTIFICATE_TRUST_NEVER,
	GMIME_CERTIFICATE_TRUST_UNDEFINED,
	GMIME_CERTIFICATE_TRUST_MARGINAL,
	GMIME_CERTIFICATE_TRUST_FULLY,
	GMIME_CERTIFICATE_TRUST_ULTIMATE
} GMimeCertificateTrust;
The trust value of a certificate.
| No trust assigned. | |
| Never trust this certificate. | |
| Undefined trust for this certificate. | |
| Trust this certificate maginally. | |
| Trust this certificate fully. | |
| Trust this certificate ultimately. | 
typedef struct _GMimeCertificate GMimeCertificate;
An object containing useful information about a certificate.
GMimeCertificate *  g_mime_certificate_new              (void);
Creates a new GMimeCertificate object.
| Returns : | a new GMimeCertificate object. | 
GMimePubKeyAlgo     g_mime_certificate_get_pubkey_algo  (GMimeCertificate *cert);
Get the public-key algorithm used by the certificate.
| 
 | a GMimeCertificate | 
| Returns : | the public-key algorithm used by the certificate or GMIME_PUBKEY_ALGO_DEFAULT if unspecified. | 
void g_mime_certificate_set_pubkey_algo (GMimeCertificate *cert,GMimePubKeyAlgo algo);
Set the public-key algorithm used by the certificate.
| 
 | a GMimeCertificate | 
| 
 | a GMimePubKeyAlgo | 
GMimeDigestAlgo     g_mime_certificate_get_digest_algo  (GMimeCertificate *cert);
Get the digest algorithm used by the certificate.
| 
 | a GMimeCertificate | 
| Returns : | the digest algorithm used by the certificate or GMIME_DIGEST_ALGO_DEFAULT if unspecified. | 
void g_mime_certificate_set_digest_algo (GMimeCertificate *cert,GMimeDigestAlgo algo);
Set the digest algorithm used by the certificate.
| 
 | a GMimeCertificate | 
| 
 | a GMimeDigestAlgo | 
const char *        g_mime_certificate_get_issuer_serial
                                                        (GMimeCertificate *cert);
Get the certificate's issuer serial.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's issuer serial or NULLif unspecified. | 
void g_mime_certificate_set_issuer_serial (GMimeCertificate *cert,const char *issuer_serial);
Set the certificate's issuer serial.
| 
 | a GMimeCertificate | 
| 
 | certificate's issuer serial | 
const char *        g_mime_certificate_get_issuer_name  (GMimeCertificate *cert);
Get the certificate's issuer name.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's issuer name or NULLif unspecified. | 
void g_mime_certificate_set_issuer_name (GMimeCertificate *cert,const char *issuer_name);
Set the certificate's issuer name.
| 
 | a GMimeCertificate | 
| 
 | certificate's issuer name | 
const char *        g_mime_certificate_get_fingerprint  (GMimeCertificate *cert);
Get the certificate's key fingerprint.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's key fingerprint or NULLif unspecified. | 
void g_mime_certificate_set_fingerprint (GMimeCertificate *cert,const char *fingerprint);
Set the certificate's key fingerprint.
| 
 | a GMimeCertificate | 
| 
 | fingerprint string | 
time_t              g_mime_certificate_get_created      (GMimeCertificate *cert);
Get the creation date of the certificate's key.
| 
 | a GMimeCertificate | 
| Returns : | the creation date of the certificate's key or -1if unknown. | 
void g_mime_certificate_set_created (GMimeCertificate *cert,time_t created);
Set the creation date of the certificate's key.
| 
 | a GMimeCertificate | 
| 
 | creation date | 
time_t              g_mime_certificate_get_expires      (GMimeCertificate *cert);
Get the expiration date of the certificate's key.
| 
 | a GMimeCertificate | 
| Returns : | the expiration date of the certificate's key or -1if unknown. | 
void g_mime_certificate_set_expires (GMimeCertificate *cert,time_t expires);
Set the expiration date of the certificate's key.
| 
 | a GMimeCertificate | 
| 
 | expiration date | 
const char *        g_mime_certificate_get_key_id       (GMimeCertificate *cert);
Get the certificate's key id.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's key id or NULLif unspecified. | 
void g_mime_certificate_set_key_id (GMimeCertificate *cert,const char *key_id);
Set the certificate's key id.
| 
 | a GMimeCertificate | 
| 
 | key id | 
GMimeCertificateTrust  g_mime_certificate_get_trust     (GMimeCertificate *cert);
Get the certificate trust.
| 
 | a GMimeCertificate | 
| Returns : | the certificate trust. | 
void g_mime_certificate_set_trust (GMimeCertificate *cert,GMimeCertificateTrust trust);
Set the certificate trust.
| 
 | a GMimeCertificate | 
| 
 | a GMimeCertificateTrust value | 
const char *        g_mime_certificate_get_email        (GMimeCertificate *cert);
Get the certificate's email.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's email or NULLif unspecified. | 
void g_mime_certificate_set_email (GMimeCertificate *cert,const char *email);
Set the certificate's email.
| 
 | a GMimeCertificate | 
| 
 | certificate's email | 
const char *        g_mime_certificate_get_name         (GMimeCertificate *cert);
Get the certificate's name.
| 
 | a GMimeCertificate | 
| Returns : | the certificate's name or NULLif unspecified. | 
void g_mime_certificate_set_name (GMimeCertificate *cert,const char *name);
Set the certificate's name.
| 
 | a GMimeCertificate | 
| 
 | certificate's name | 
typedef struct _GMimeCertificateList GMimeCertificateList;
A collection of GMimeCertificate objects.
GMimeCertificateList * g_mime_certificate_list_new      (void);
Creates a new GMimeCertificateList.
| Returns : | a new GMimeCertificateList. | 
int                 g_mime_certificate_list_length      (GMimeCertificateList *list);
Gets the length of the list.
| 
 | a GMimeCertificateList | 
| Returns : | the number of GMimeCertificate objects in the list. | 
void                g_mime_certificate_list_clear       (GMimeCertificateList *list);
Clears the list of addresses.
| 
 | a GMimeCertificateList | 
int g_mime_certificate_list_add (GMimeCertificateList *list,GMimeCertificate *cert);
Adds a GMimeCertificate to the GMimeCertificateList.
| 
 | a GMimeCertificateList | 
| 
 | a GMimeCertificate | 
| Returns : | the index of the added GMimeCertificate. | 
void g_mime_certificate_list_insert (GMimeCertificateList *list,int index,GMimeCertificate *cert);
Inserts a GMimeCertificate into the GMimeCertificateList at the specified index.
| 
 | a GMimeCertificateList | 
| 
 | index to insert at | 
| 
 | a GMimeCertificate | 
gboolean g_mime_certificate_list_remove (GMimeCertificateList *list,GMimeCertificate *cert);
Removes a GMimeCertificate from the GMimeCertificateList.
| 
 | a GMimeCertificateList | 
| 
 | a GMimeCertificate | 
| Returns : | TRUEif the specified GMimeCertificate was removed orFALSEotherwise. | 
gboolean g_mime_certificate_list_remove_at (GMimeCertificateList *list,int index);
Removes a GMimeCertificate from the GMimeCertificateList at the specified index.
| 
 | a GMimeCertificateList | 
| 
 | index to remove | 
| Returns : | TRUEif an GMimeCertificate was removed orFALSEotherwise. | 
gboolean g_mime_certificate_list_contains (GMimeCertificateList *list,GMimeCertificate *cert);
Checks whether or not the specified GMimeCertificate is contained within the GMimeCertificateList.
| 
 | a GMimeCertificateList | 
| 
 | a GMimeCertificate | 
| Returns : | TRUEif the specified GMimeCertificate is contained within the
specified GMimeCertificateList orFALSEotherwise. | 
int g_mime_certificate_list_index_of (GMimeCertificateList *list,GMimeCertificate *cert);
Gets the index of the specified GMimeCertificate inside the GMimeCertificateList.
| 
 | a GMimeCertificateList | 
| 
 | a GMimeCertificate | 
| Returns : | the index of the requested GMimeCertificate within the
GMimeCertificateList or -1if it is not contained within the
GMimeCertificateList. | 
GMimeCertificate * g_mime_certificate_list_get_certificate (GMimeCertificateList *list,int index);
Gets the GMimeCertificate at the specified index.
| 
 | a GMimeCertificateList | 
| 
 | index of GMimeCertificate to get | 
| Returns : | the GMimeCertificate at the specified index or NULLif
the index is out of range. | 
void g_mime_certificate_list_set_certificate (GMimeCertificateList *list,int index,GMimeCertificate *cert);
Sets the GMimeCertificate at the specified index to cert.
| 
 | a GMimeCertificateList | 
| 
 | index of GMimeCertificate to set | 
| 
 | a GMimeCertificate |