Camel.MultipartSigned

g Camel.DataWrapper Camel.DataWrapper Camel.Multipart Camel.Multipart Camel.DataWrapper->Camel.Multipart Camel.MultipartSigned Camel.MultipartSigned Camel.Multipart->Camel.MultipartSigned GObject.Object GObject.Object GObject.Object->Camel.DataWrapper

Subclasses:

None

Methods

Inherited:

Camel.Multipart (12), Camel.DataWrapper (32), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_content_stream ()

set_content_stream (content_stream)

set_signature (signature)

Virtual Methods

Inherited:

Camel.Multipart (7), Camel.DataWrapper (11), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Camel.Multipart

r

Class Details

class Camel.MultipartSigned(**kwargs)
Bases:

Camel.Multipart

Abstract:

No

Structure:

Camel.MultipartSignedClass

classmethod new()
Returns:

a new Camel.MultipartSigned object

Return type:

Camel.MultipartSigned

Create a new Camel.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 Camel.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 Camel.MimeParserState.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 Camel.part will automatically be created and the whole Camel.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).

get_content_stream()
Raises:

GLib.Error

Returns:

the signed content stream

Return type:

Camel.Stream

Get the raw signed content stream of the multipart/signed MIME Camel.part suitable for use with verification of the signature.

set_content_stream(content_stream)
Parameters:

content_stream (Camel.Stream) – a Camel.Stream

Explicits sets the raw signed content stream of the multipart/signed MIME Camel.part.

New in version 3.12.

set_signature(signature)
Parameters:

signature (Camel.MimePart) – a Camel.MimePart

Explicitly sets the signature Camel.part of self.

New in version 3.12.