gmime-multipart-signed

Name

gmime-multipart-signed -- 

Synopsis



struct      GMimeMultipartSigned;
GMimeMultipartSigned* g_mime_multipart_signed_new
                                            (void);
int         g_mime_multipart_signed_sign    (GMimeMultipartSigned *mps,
                                             GMimeObject *content,
                                             GMimeCipherContext *ctx,
                                             const char *userid,
                                             GMimeCipherHash hash,
                                             GMimeException *ex);
GMimeCipherValidity* g_mime_multipart_signed_verify
                                            (GMimeMultipartSigned *mps,
                                             GMimeCipherContext *ctx,
                                             GMimeException *ex);


Description

Details

struct GMimeMultipartSigned

struct GMimeMultipartSigned {
	GMimeMultipart parent_object;
	
	char *protocol;
	char *micalg;
};


g_mime_multipart_signed_new ()

GMimeMultipartSigned* g_mime_multipart_signed_new
                                            (void);

Creates a new MIME multipart/signed object.

Returns :an empty MIME multipart/signed object.


g_mime_multipart_signed_sign ()

int         g_mime_multipart_signed_sign    (GMimeMultipartSigned *mps,
                                             GMimeObject *content,
                                             GMimeCipherContext *ctx,
                                             const char *userid,
                                             GMimeCipherHash hash,
                                             GMimeException *ex);

Attempts to sign the content MIME part with userid's private key using the ctx signing context with the hash algorithm. If successful, the signed GMimeObject is set as the signed part of the multipart/signed object mps.

mps : multipart/signed object
content : MIME part to sign
ctx : encryption cipher context
userid : user id to sign with
hash : preferred digest algorithm
ex : exception
Returns :0 on success or -1 on fail. If the signing fails, an exception will be set on ex to provide information as to why the failure occured.


g_mime_multipart_signed_verify ()

GMimeCipherValidity* g_mime_multipart_signed_verify
                                            (GMimeMultipartSigned *mps,
                                             GMimeCipherContext *ctx,
                                             GMimeException *ex);

Attempts to verify the signed MIME part contained within the multipart/signed object mps using the ctx cipher context.

mps : multipart/signed object
ctx : encryption cipher context
ex : exception
Returns :a new GMimeCipherValidity object on success or NULL on fail. If the signing fails, an exception will be set on ex to provide information as to why the failure occured.