5 CMS_data_create_ex, CMS_data_create
6 - Create CMS Data object
10 #include <openssl/cms.h>
12 CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
13 OPENSSL_CTX *libctx, const char *propq);
14 CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
18 CMS_data_create_ex() creates a B<CMS_ContentInfo> structure
19 with a type B<NID_pkcs7_data>. The data is supplied via the I<in> BIO.
20 The library context I<libctx> and the property query I<propq> are used when
21 retrieving algorithms from providers. The I<flags> field supports the
22 B<CMS_STREAM> flag. Internally CMS_final() is called unless B<CMS_STREAM> is
25 The B<CMS_ContentInfo> structure can be freed using L<CMS_ContentInfo_free(3)>.
27 CMS_data_create() is similar to CMS_data_create_ex()
28 but uses default values of NULL for the library context I<libctx> and the
29 property query I<propq>.
33 If the allocation fails, CMS_data_create_ex() and CMS_data_create()
34 return NULL and set an error code that can be obtained by L<ERR_get_error(3)>.
35 Otherwise they return a pointer to the newly allocated structure.
39 L<ERR_get_error(3)>, L<CMS_final(3)>
43 The CMS_data_create_ex() method was added in OpenSSL 3.0.
47 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
49 Licensed under the Apache License 2.0 (the "License"). You may not use
50 this file except in compliance with the License. You can obtain a copy
51 in the file LICENSE in the source distribution or at
52 L<https://www.openssl.org/source/license.html>.