]>
Commit | Line | Data |
---|---|---|
dda4e259 SL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
d8652be0 | 5 | CMS_data_create_ex, CMS_data_create |
dda4e259 SL |
6 | - Create CMS Data object |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/cms.h> | |
11 | ||
d8652be0 | 12 | CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags, |
b4250010 | 13 | OSSL_LIB_CTX *libctx, const char *propq); |
dda4e259 SL |
14 | CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags); |
15 | ||
16 | =head1 DESCRIPTION | |
17 | ||
d8652be0 | 18 | CMS_data_create_ex() creates a B<CMS_ContentInfo> structure |
dda4e259 SL |
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 | |
23 | specified. | |
24 | ||
25 | The B<CMS_ContentInfo> structure can be freed using L<CMS_ContentInfo_free(3)>. | |
26 | ||
d8652be0 | 27 | CMS_data_create() is similar to CMS_data_create_ex() |
dda4e259 SL |
28 | but uses default values of NULL for the library context I<libctx> and the |
29 | property query I<propq>. | |
30 | ||
31 | =head1 RETURN VALUES | |
32 | ||
d8652be0 | 33 | If the allocation fails, CMS_data_create_ex() and CMS_data_create() |
dda4e259 SL |
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. | |
36 | ||
37 | =head1 SEE ALSO | |
38 | ||
39 | L<ERR_get_error(3)>, L<CMS_final(3)> | |
40 | ||
41 | head1 HISTORY | |
42 | ||
d8652be0 | 43 | The CMS_data_create_ex() method was added in OpenSSL 3.0. |
dda4e259 SL |
44 | |
45 | =head1 COPYRIGHT | |
46 | ||
47 | Copyright 2020 The OpenSSL Project Authors. All Rights Reserved. | |
48 | ||
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>. | |
53 | ||
54 | =cut |