Function

CMSEncoderSetEncapsulatedContentType

Specifies an object identifier for the encapsulated data of a signed message.

Declaration

OSStatus CMSEncoderSetEncapsulatedContentType(CMSEncoderRef cmsEncoder, const SecAsn1Oid *eContentType);

Parameters

cmsEncoder

The CMSEncoder reference returned by the CMSEncoderCreate function.

eContentType

The object identifier for the encapsulated data in a signed message.

Return Value

Discussion

In a signed message, the signed data consists of any type of content (referred to as the encapsulated content, because it is encapsulated in the signed data) plus the signature values. You can indicate the content type of the encapsulated data by specifying an object identifier (OID) in the eContentType parameter of this function. The default value for the OID (used if this function is not called) is id-data. This is the normal encapsulated content type for applications such as S/MIME, which uses it to indicate MIME-encoded content. You can pass any value that is meaningful to your application. Examples of CMS OIDs are listed in http://www.imc.org/ietf-smime/other-smime-oids.asn.

If you do call this function, you must call it before the first call to the CMSEncoderUpdateContent function.

Special Considerations

See Also

Message Creation

CMSEncoderAddSigners

Specifies signers of the message.

CMSEncoderAddRecipients

Specifies a message is to be encrypted and specifies the recipients of the message.

CMSEncoderSetHasDetachedContent

Specifies whether the signed data is to be separate from the message.

CMSEncoderSetEncapsulatedContentTypeOID

Specifies an object identifier for the encapsulated data of a signed message.

CMSEncoderAddSupportingCerts

Adds certificates to a message.

CMSEncoderAddSignedAttributes

Specifies attributes for a signed message.

CMSSignedAttributes

Optional attributes you can add to a signed message.

CMSEncoderSetCertificateChainMode

Specifies which certificates to include in a signed CMS message.

CMSCertificateChainMode

Constants that can be set to specify what certificates to include in a signed message.

CMSEncoderSetSignerAlgorithm

Sets the digest algorithm to use for the signer.