MultipartSigned


Description:

[ CCode ( has_construct_function = false ) ]
public MultipartSigned ()

Create a new MultipartSigned object.

A MultipartSigned should be used to store and create parts of type "multipart/signed". This is because multipart/signed is entirely broken-by-design (tm) and uses completely different semantics to other mutlipart types. It must be treated as opaque data by any transport. See rfc 3156 for details.

There are 3 ways to create the part: Use construct_from_stream. If this is used, then you must set the mime_type appropriately to match the data uses, so that the multiple parts my be extracted.

Use construct_from_parser. The parser MUST be in the HEADER state, and the current content_type MUST be "multipart/signed" with the appropriate boundary and it SHOULD include the appropriate protocol and hash specifiers.

Use sign_part. A signature part will automatically be created and the whole part may be written using write_to_stream to create a 'transport-safe' version (as safe as can be expected with such a broken specification).

Returns:

a new MultipartSigned object