1CMS_get0_type(3)                    OpenSSL                   CMS_get0_type(3)
2
3
4

NAME

6        CMS_get0_type, CMS_set1_eContentType, CMS_get0_eContentType - get and set CMS content types
7

SYNOPSIS

9        #include <openssl/cms.h>
10
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);
14

DESCRIPTION

16       CMS_get0_type() returns the content type of a CMS_ContentInfo structure
17       as and ASN1_OBJECT pointer. An application can then decide how to
18       process the CMS_ContentInfo structure based on this value.
19
20       CMS_set1_eContentType() sets the embedded content type of a
21       CMS_ContentInfo structure. It should be called with CMS functions with
22       the CMS_PARTIAL flag and before the structure is finalised, otherwise
23       the results are undefined.
24
25       ASN1_OBJECT *CMS_get0_eContentType() returns a pointer to the embedded
26       content type.
27

NOTES

29       As the 0 implies CMS_get0_type() and CMS_get0_eContentType() return
30       internal pointers which should not be freed up. CMS_set1_eContentType()
31       copies the supplied OID and it should be freed up after use.
32
33       The ASN1_OBJECT values returned can be converted to an integer NID
34       value using OBJ_obj2nid(). For the currently supported content types
35       the following values are returned:
36
37        NID_pkcs7_data
38        NID_pkcs7_signed
39        NID_pkcs7_digest
40        NID_id_smime_ct_compressedData:
41        NID_pkcs7_encrypted
42        NID_pkcs7_enveloped
43

RETURN VALUES

45       CMS_get0_type() and CMS_get0_eContentType() return and ASN1_OBJECT
46       structure.
47
48       CMS_set1_eContentType() returns 1 for success or 0 if an error
49       occurred.  The error can be obtained from ERR_get_error(3).
50

SEE ALSO

52       ERR_get_error(3)
53

HISTORY

55       CMS_get0_type(), CMS_set1_eContentType() and CMS_get0_eContentType()
56       were all first added to OpenSSL 0.9.8
57
58
59
601.0.1e                            2013-02-11                  CMS_get0_type(3)
Impressum