get_autocrypt_gossip_headers_from_inner_part


Description:

public AutocryptHeaderList? get_autocrypt_gossip_headers_from_inner_part (DateTime now, Object inner_part)

Creates a new AutocryptHeaderList of relevant headers of the given type based on the recipient(s) of an e-mail message.

You must pass the decrypted inner part of the message to this function, since Autocrypt-Gossip headers are only stored within the encrypted layer.

If you don't already have the decrypted inner part available to you, you probably want to use get_autocrypt_gossip_headers instead.

Each header in the returned list will:

  • have a valid address
  • be of the type requested
  • be complete

If no Autocrypt header is found for a recipient, no AutocryptHeader will be in the list associated with that e-mail address.

Note that the following types of Autocrypt headers will not be returned by this function:

  • headers of an unrequested type
  • headers that do not match an address in "From:"
  • unparseable headers
  • headers with unknown critical attributes
  • duplicate valid headers for a given address

On error (e.g. if this version of GMime cannot handle the requested Autocrypt type, or if a parameter is missing or malformed), returns null

The returned Autocrypt headers will have their effective_date set to the earliest of either:

  • the Date: header of the message or
  • now (or the current time, if now is null)

Parameters:

this

a Message object.

now

a DateTime object, or null

inner_part

a Object which is the cleartext part of the inner message

Returns:

a new AutocryptHeaderList object, or null on error.




2022 vala-language.org