Top |
Functions
Functions
g_mime_application_pkcs7_mime_new ()
GMimeApplicationPkcs7Mime *
g_mime_application_pkcs7_mime_new (GMimeSecureMimeType type
);
Creates a new application/pkcs7-mime object.
g_mime_application_pkcs7_mime_get_smime_type ()
GMimeSecureMimeType
g_mime_application_pkcs7_mime_get_smime_type
(GMimeApplicationPkcs7Mime *pkcs7_mime
);
Gets the smime-type value of the Content-Type header.
g_mime_application_pkcs7_mime_encrypt ()
GMimeApplicationPkcs7Mime * g_mime_application_pkcs7_mime_encrypt (GMimeObject *entity
,GMimeEncryptFlags flags
,GPtrArray *recipients
,GError **err
);
Attempts to encrypt the entity
MIME part to the public keys of recipients
using S/MIME. If successful, a new application/pkcs7-mime object is returned.
Parameters
entity |
a GMimeObject to encrypt |
|
flags |
||
recipients |
an array of recipients to encrypt to. |
[element-type utf8] |
err |
a GError |
Returns
a new GMimeApplicationPkcs7Mime object on success
or NULL
on fail. If encrypting fails, an exception will be set on err
to provide
information as to why the failure occurred.
g_mime_application_pkcs7_mime_decrypt ()
GMimeObject * g_mime_application_pkcs7_mime_decrypt (GMimeApplicationPkcs7Mime *pkcs7_mime
,GMimeDecryptFlags flags
,const char *session_key
,GMimeDecryptResult **result
,GError **err
);
Attempts to decrypt the encrypted application/pkcs7-mime part.
When non-NULL
, session_key
should be a NULL
-terminated string,
such as the one returned by g_mime_decrypt_result_get_session_key()
from a previous decryption. If the session_key
is not valid, decryption
will fail.
If result
is non-NULL
, then on a successful decrypt operation, it will be
updated to point to a newly-allocated GMimeDecryptResult with signature
status information as well as a list of recipients that the part was
encrypted to.
Parameters
pkcs7_mime |
||
flags |
||
session_key |
session key to use or |
|
result |
the decryption result |
|
err |
a GError |
g_mime_application_pkcs7_mime_sign ()
GMimeApplicationPkcs7Mime * g_mime_application_pkcs7_mime_sign (GMimeObject *entity
,const char *userid
,GError **err
);
Attempts to sign the entity
MIME part with userid
's private key using
S/MIME. If successful, a new application/pkcs7-mime object is returned.
Returns
a new GMimeApplicationPkcs7Mime object on success
or NULL
on fail. If signing fails, an exception will be set on err
to provide
information as to why the failure occurred.
g_mime_application_pkcs7_mime_verify ()
GMimeSignatureList * g_mime_application_pkcs7_mime_verify (GMimeApplicationPkcs7Mime *pkcs7_mime
,GMimeVerifyFlags flags
,GMimeObject **entity
,GError **err
);
Attempts to verify the signed pkcs7_mime
part and extract the original
MIME entity.
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
occurred.
Types and Values
struct GMimeApplicationPkcs7Mime
struct GMimeApplicationPkcs7Mime;
An application/pkcs7-mime MIME part.