5 CMS_get0_type, CMS_set1_eContentType, CMS_get0_eContentType - get and set CMS content types
9 #include <openssl/cms.h>
11 const ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);
12 int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
13 const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
17 CMS_get0_type() returns the content type of a CMS_ContentInfo structure as
18 and ASN1_OBJECT pointer. An application can then decide how to process the
19 CMS_ContentInfo structure based on this value.
21 CMS_set1_eContentType() sets the embedded content type of a CMS_ContentInfo
22 structure. It should be called with CMS functions with the B<CMS_PARTIAL>
23 flag and B<before> the structure is finalised, otherwise the results are
26 ASN1_OBJECT *CMS_get0_eContentType() returns a pointer to the embedded
31 As the B<0> implies CMS_get0_type() and CMS_get0_eContentType() return internal
32 pointers which should B<not> be freed up. CMS_set1_eContentType() copies the
33 supplied OID and it B<should> be freed up after use.
35 The B<ASN1_OBJECT> values returned can be converted to an integer B<NID> value
36 using OBJ_obj2nid(). For the currently supported content types the following
42 NID_id_smime_ct_compressedData:
49 CMS_get0_type() and CMS_get0_eContentType() return and ASN1_OBJECT structure.
51 CMS_set1_eContentType() returns 1 for success or 0 if an error occurred. The
52 error can be obtained from ERR_get_error(3).
56 L<ERR_get_error(3)|ERR_get_error(3)>
60 CMS_get0_type(), CMS_set1_eContentType() and CMS_get0_eContentType() were all
61 first added to OpenSSL 0.9.8