1CMS_DATA_CREATE(3ossl)              OpenSSL             CMS_DATA_CREATE(3ossl)
2
3
4

NAME

6       CMS_data_create_ex, CMS_data_create - Create CMS Data object
7

SYNOPSIS

9        #include <openssl/cms.h>
10
11        CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
12                                            OSSL_LIB_CTX *libctx, const char *propq);
13        CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
14

DESCRIPTION

16       CMS_data_create_ex() creates a CMS_ContentInfo structure with a type
17       NID_pkcs7_data. The data is supplied via the in BIO.  The library
18       context libctx and the property query propq are used when retrieving
19       algorithms from providers. The flags field supports the CMS_STREAM
20       flag. Internally CMS_final() is called unless CMS_STREAM is specified.
21
22       The CMS_ContentInfo structure can be freed using
23       CMS_ContentInfo_free(3).
24
25       CMS_data_create() is similar to CMS_data_create_ex() but uses default
26       values of NULL for the library context libctx and the property query
27       propq.
28

RETURN VALUES

30       If the allocation fails, CMS_data_create_ex() and CMS_data_create()
31       return NULL and set an error code that can be obtained by
32       ERR_get_error(3).  Otherwise they return a pointer to the newly
33       allocated structure.
34

SEE ALSO

36       ERR_get_error(3), CMS_final(3)
37

HISTORY

39       The CMS_data_create_ex() method was added in OpenSSL 3.0.
40
42       Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
43
44       Licensed under the Apache License 2.0 (the "License").  You may not use
45       this file except in compliance with the License.  You can obtain a copy
46       in the file LICENSE in the source distribution or at
47       <https://www.openssl.org/source/license.html>.
48
49
50
513.0.5                             2022-11-01            CMS_DATA_CREATE(3ossl)
Impressum