## GMimeMultipartSigned GMimeMultipartSigned — Signed MIME multiparts |

## Functions

GMimeMultipartSigned * | g_mime_multipart_signed_new ()
int | g_mime_multipart_signed_sign ()
GMimeSignatureList * | g_mime_multipart_signed_verify ()

## Types and Values

struct | GMimeMultipartSigned

## Description

A GMimeMultipartSigned part is a special subclass of GMimeMultipart to make it easier to manipulate the multipart/signed MIME type.

## Functions

### 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,
                                  GMimeCryptoContext *ctx,
                                  const char *userid,
                                  GMimeDigestAlgo digest,
                                  GError **err);

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

#### Parameters

mps | multipart/signed object |
content | MIME part to sign |
ctx | encryption crypto context |
userid | user id to sign with |
digest | preferred digest algorithm |
err | exception |

#### Returns

`0` on success or `-1` on fail. If the signing fails, an exception will be set on `err` to provide information as to why the failure occured.

### g_mime_multipart_signed_verify ()

    GMimeSignatureList *
    g_mime_multipart_signed_verify (GMimeMultipartSigned *mps,
                                    GMimeCryptoContext *ctx,
                                    GError **err);

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

#### Parameters

mps | multipart/signed object |
ctx | encryption crypto context |
err | exception |

#### Returns

a new GMimeSignatureList object on success or `NULL` on fail. If the verification fails, an exception will be set on `err` to provide information as to why the failure occured.

[transfer full]

## Types and Values

### struct GMimeMultipartSigned

    struct GMimeMultipartSigned {
    	GMimeMultipart parent_object;
    };

A multipart/signed MIME part.

#### Members

GMimeMultipart `parent_object`; | parent GMimeMultipart |

## See Also

GMimeMultipart