| GMime 2.6 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
enum GMimeSignatureStatus; enum GMimeSignatureError; struct GMimeSignature; GMimeSignature * g_mime_signature_new (void); GMimeCertificate * g_mime_signature_get_certificate (GMimeSignature *sig); void g_mime_signature_set_certificate (GMimeSignature *sig,GMimeCertificate *cert); GMimeSignatureStatus g_mime_signature_get_status (GMimeSignature *sig); void g_mime_signature_set_status (GMimeSignature *sig,GMimeSignatureStatus status); GMimeSignatureError g_mime_signature_get_errors (GMimeSignature *sig); void g_mime_signature_set_errors (GMimeSignature *sig,GMimeSignatureError errors); time_t g_mime_signature_get_created (GMimeSignature *sig); void g_mime_signature_set_created (GMimeSignature *sig,time_t created); time_t g_mime_signature_get_expires (GMimeSignature *sig); void g_mime_signature_set_expires (GMimeSignature *sig,time_t expires); struct GMimeSignatureList; GMimeSignatureList * g_mime_signature_list_new (void); int g_mime_signature_list_length (GMimeSignatureList *list); void g_mime_signature_list_clear (GMimeSignatureList *list); int g_mime_signature_list_add (GMimeSignatureList *list,GMimeSignature *sig); void g_mime_signature_list_insert (GMimeSignatureList *list,int index,GMimeSignature *sig); gboolean g_mime_signature_list_remove (GMimeSignatureList *list,GMimeSignature *sig); gboolean g_mime_signature_list_remove_at (GMimeSignatureList *list,int index); gboolean g_mime_signature_list_contains (GMimeSignatureList *list,GMimeSignature *sig); int g_mime_signature_list_index_of (GMimeSignatureList *list,GMimeSignature *sig); GMimeSignature * g_mime_signature_list_get_signature (GMimeSignatureList *list,int index); void g_mime_signature_list_set_signature (GMimeSignatureList *list,int index,GMimeSignature *sig);
A GMimeSignature is an object containing useful information about a digital signature as used in signing and encrypting data.
typedef enum {
GMIME_SIGNATURE_STATUS_GOOD,
GMIME_SIGNATURE_STATUS_ERROR,
GMIME_SIGNATURE_STATUS_BAD
} GMimeSignatureStatus;
A value representing the signature status for a particular GMimeSignature.
typedef enum {
GMIME_SIGNATURE_ERROR_NONE = 0,
GMIME_SIGNATURE_ERROR_EXPSIG = (1 << 0), /* expired signature */
GMIME_SIGNATURE_ERROR_NO_PUBKEY = (1 << 1), /* no public key */
GMIME_SIGNATURE_ERROR_EXPKEYSIG = (1 << 2), /* expired key */
GMIME_SIGNATURE_ERROR_REVKEYSIG = (1 << 3), /* revoked key */
GMIME_SIGNATURE_ERROR_UNSUPP_ALGO = (1 << 4) /* unsupported algorithm */
} GMimeSignatureError;
Possible errors that a GMimeSignature could have.
| No error. | |
| Expired signature. | |
| No public key found. | |
| Expired signature key. | |
| Revoked signature key. | |
| Unsupported algorithm. |
struct GMimeSignature;
An object containing useful information about a signature.
GMimeSignature * g_mime_signature_new (void);
Creates a new GMimeSignature object.
Returns : |
a new GMimeSignature object. |
GMimeCertificate * g_mime_signature_get_certificate (GMimeSignature *sig);
Get the signature's certificate.
|
a GMimeSignature |
Returns : |
the signature's certificate. |
void g_mime_signature_set_certificate (GMimeSignature *sig,GMimeCertificate *cert);
Set the signature's certificate.
|
a GMimeSignature |
|
a GMimeCertificate |
GMimeSignatureStatus g_mime_signature_get_status (GMimeSignature *sig);
Get the signature status.
|
a GMimeSignature |
Returns : |
the signature status. |
void g_mime_signature_set_status (GMimeSignature *sig,GMimeSignatureStatus status);
Set the status on the signature.
|
a GMimeSignature |
|
a GMimeSignatureStatus |
GMimeSignatureError g_mime_signature_get_errors (GMimeSignature *sig);
Get the signature errors. If the GMimeSignatureStatus returned from
g_mime_signature_get_status() is not GMIME_SIGNATURE_STATUS_GOOD, then the
errors may provide a clue as to why.
|
a GMimeSignature |
Returns : |
a bitfield of errors. |
void g_mime_signature_set_errors (GMimeSignature *sig,GMimeSignatureError errors);
Set the errors on the signature.
|
a GMimeSignature |
|
a GMimeSignatureError |
time_t g_mime_signature_get_created (GMimeSignature *sig);
Get the creation date of the signature.
|
a GMimeSignature |
Returns : |
the creation date of the signature or -1 if unknown. |
void g_mime_signature_set_created (GMimeSignature *sig,time_t created);
Set the creation date of the signature.
|
a GMimeSignature |
|
creation date |
time_t g_mime_signature_get_expires (GMimeSignature *sig);
Get the expiration date of the signature.
|
a GMimeSignature |
Returns : |
the expiration date of the signature or -1 if unknown. |
void g_mime_signature_set_expires (GMimeSignature *sig,time_t expires);
Set the expiration date of the signature.
|
a GMimeSignature |
|
expiration date |
GMimeSignatureList * g_mime_signature_list_new (void);
Creates a new GMimeSignatureList.
Returns : |
a new GMimeSignatureList. |
int g_mime_signature_list_length (GMimeSignatureList *list);
Gets the length of the list.
|
a GMimeSignatureList |
Returns : |
the number of GMimeSignature objects in the list. |
void g_mime_signature_list_clear (GMimeSignatureList *list);
Clears the list of addresses.
|
a GMimeSignatureList |
int g_mime_signature_list_add (GMimeSignatureList *list,GMimeSignature *sig);
Adds a GMimeSignature to the GMimeSignatureList.
|
a GMimeSignatureList |
|
a GMimeSignature |
Returns : |
the index of the added GMimeSignature. |
void g_mime_signature_list_insert (GMimeSignatureList *list,int index,GMimeSignature *sig);
Inserts a GMimeSignature into the GMimeSignatureList at the specified index.
|
a GMimeSignatureList |
|
index to insert at |
|
a GMimeSignature |
gboolean g_mime_signature_list_remove (GMimeSignatureList *list,GMimeSignature *sig);
Removes a GMimeSignature from the GMimeSignatureList.
|
a GMimeSignatureList |
|
a GMimeSignature |
Returns : |
TRUE if the specified GMimeSignature was removed or FALSE
otherwise. |
gboolean g_mime_signature_list_remove_at (GMimeSignatureList *list,int index);
Removes a GMimeSignature from the GMimeSignatureList at the specified index.
|
a GMimeSignatureList |
|
index to remove |
Returns : |
TRUE if an GMimeSignature was removed or FALSE otherwise. |
gboolean g_mime_signature_list_contains (GMimeSignatureList *list,GMimeSignature *sig);
Checks whether or not the specified GMimeSignature is contained within the GMimeSignatureList.
|
a GMimeSignatureList |
|
a GMimeSignature |
Returns : |
TRUE if the specified GMimeSignature is contained within the
specified GMimeSignatureList or FALSE otherwise. |
int g_mime_signature_list_index_of (GMimeSignatureList *list,GMimeSignature *sig);
Gets the index of the specified GMimeSignature inside the GMimeSignatureList.
|
a GMimeSignatureList |
|
a GMimeSignature |
Returns : |
the index of the requested GMimeSignature within the
GMimeSignatureList or -1 if it is not contained within the
GMimeSignatureList. |
GMimeSignature * g_mime_signature_list_get_signature (GMimeSignatureList *list,int index);
Gets the GMimeSignature at the specified index.
|
a GMimeSignatureList |
|
index of GMimeSignature to get |
Returns : |
the GMimeSignature at the specified index or NULL if
the index is out of range. |
void g_mime_signature_list_set_signature (GMimeSignatureList *list,int index,GMimeSignature *sig);
Sets the GMimeSignature at the specified index to sig.
|
a GMimeSignatureList |
|
index of GMimeSignature to set |
|
a GMimeSignature |