get_recipient_certificates_sync


Description:

[ Version ( since = "3.30" ) ]
public virtual bool get_recipient_certificates_sync (uint32 flags, GenericArray<string> recipients, out SList<string> out_certificates, Cancellable? cancellable = null) throws Error

Searches for S/MIME certificates or PGP keys for the given recipients, which are returned as base64 encoded strings in out_certificates.

This is used when encrypting messages. The flags influence what the out_certificates will contain. The order of items in out_certificates should match the order of items in recipients, with null data for those which could not be found.

The function should return failure only if some fatal error happened. It's not an error when certificates for some, or all, recipients could not be found.

This method is optional and the default implementation returns true and sets the out_certificates to null. It's the only exception when the length of recipients and out_certificates can differ. In all other cases the length of the two should match.

The out_certificates will be freed with g_slist_free_full (certificates, g_free); when done with it.

Parameters:

this

a Session

flags

bit-or of RecipientCertificateFlags

recipients

a GenericArray of recipients

out_certificates

a SList of gathered certificates

cancellable

optional Cancellable object, or null

Returns:

Whether succeeded, or better whether no fatal error happened.