| Top |
GMimeApplicationPkcs7Mime *
g_mime_application_pkcs7_mime_new (GMimeSecureMimeType type);
Creates a new application/pkcs7-mime object.
GMimeSecureMimeType
g_mime_application_pkcs7_mime_get_smime_type
(GMimeApplicationPkcs7Mime *pkcs7_mime);
Gets the smime-type value of the Content-Type header.
GMimeApplicationPkcs7Mime * g_mime_application_pkcs7_mime_compress (GMimeEntity *entity,GError **err);
Serializes entity
using DOS newlines and compresses it as RFC 3274 CMS
CompressedData using zlib. No crypto context is required.
GMimeEntity * g_mime_application_pkcs7_mime_decompress (GMimeApplicationPkcs7Mime *pkcs7_mime,size_t max_size,GError **err);
Decompresses RFC 3274 CMS CompressedData and parses its MIME content. Accepts DER and BER, including constructed OCTET STRINGs, with at most 32 nested ASN.1 containers. Only zlib compression and encapsulated id-data content are supported. No crypto context is required. The entire zlib stream, including its checksum, must be valid; truncated, trailing, or oversized content is rejected.
pkcs7_mime |
||
max_size |
positive maximum decompressed size in bytes, including MIME headers |
|
err |
return location for a GError, or |
GMimeEntity * g_mime_application_pkcs7_mime_unwrap (GMimeApplicationPkcs7Mime *pkcs7_mime,GError **err);
Extracts the encapsulated id-data MIME entity from CMS SignedData without verifying signatures, digests, certificates, or trust. The returned entity is unverified and must not be presented as authenticated content.
Accepts DER and BER, including constructed OCTET STRINGs, with at most 32 nested ASN.1 containers. Checks container framing, but does not validate the contents of the digest, certificate, revocation, or signer sets. Detached signatures, other encapsulated content types, truncated containers, and trailing data are rejected. DOS newlines are normalized as for signature verification. No crypto context or crypto support is required.
GMimeApplicationPkcs7Mime * g_mime_application_pkcs7_mime_encrypt (gpgme_ctx_t ctx,GMimeEntity *entity,gpgme_encrypt_flags_t flags,gpgme_key_t *recipients,gpgme_encrypt_result_t *result,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.
[skip]
ctx |
a borrowed GPGME CMS context |
|
entity |
a GMimeEntity to encrypt |
|
flags |
native GPGME encryption flags |
|
recipients |
borrowed NULL-terminated recipient keys |
|
result |
a retained encryption result. |
[out][optional] |
err |
a GError |
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.
GMimeEntity * g_mime_application_pkcs7_mime_decrypt (GMimeApplicationPkcs7Mime *pkcs7_mime,gpgme_ctx_t ctx,gpgme_decrypt_result_t *result,GError **err);
Attempts to decrypt the encrypted application/pkcs7-mime part.
Context policy is unchanged. Release any returned result even on failure. Nested signed MIME entities must be verified separately.
[skip]
GMimeApplicationPkcs7Mime * g_mime_application_pkcs7_mime_sign (gpgme_ctx_t ctx,GMimeEntity *entity,gpgme_sign_result_t *result,GError **err);
Signs entity
using the context's signers and S/MIME. If successful, a new
application/pkcs7-mime object is returned.
[skip]
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.
gboolean g_mime_application_pkcs7_mime_verify (GMimeApplicationPkcs7Mime *pkcs7_mime,gpgme_ctx_t ctx,GMimeEntity **entity,gpgme_verify_result_t *result,GError **err);
Attempts to verify the signed pkcs7_mime
part and extract the original
MIME entity.
[skip]
pkcs7_mime |
||
ctx |
a borrowed GPGME CMS context |
|
entity |
the extracted entity. |
[out][transfer full] |
result |
a retained native verification result. |
[out][optional] |
err |
a GError |
typedef struct _GMimeApplicationPkcs7Mime GMimeApplicationPkcs7Mime;
An application/pkcs7-mime MIME part.
The S/MIME data type.