]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/CMS_data_create.pod
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
[thirdparty/openssl.git] / doc / man3 / CMS_data_create.pod
CommitLineData
dda4e259
SL
1=pod
2
3=head1 NAME
4
d8652be0 5CMS_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 18CMS_data_create_ex() creates a B<CMS_ContentInfo> structure
dda4e259
SL
19with a type B<NID_pkcs7_data>. The data is supplied via the I<in> BIO.
20The library context I<libctx> and the property query I<propq> are used when
21retrieving algorithms from providers. The I<flags> field supports the
22B<CMS_STREAM> flag. Internally CMS_final() is called unless B<CMS_STREAM> is
23specified.
24
25The B<CMS_ContentInfo> structure can be freed using L<CMS_ContentInfo_free(3)>.
26
d8652be0 27CMS_data_create() is similar to CMS_data_create_ex()
dda4e259
SL
28but uses default values of NULL for the library context I<libctx> and the
29property query I<propq>.
30
31=head1 RETURN VALUES
32
d8652be0 33If the allocation fails, CMS_data_create_ex() and CMS_data_create()
dda4e259
SL
34return NULL and set an error code that can be obtained by L<ERR_get_error(3)>.
35Otherwise they return a pointer to the newly allocated structure.
36
37=head1 SEE ALSO
38
39L<ERR_get_error(3)>, L<CMS_final(3)>
40
41head1 HISTORY
42
d8652be0 43The CMS_data_create_ex() method was added in OpenSSL 3.0.
dda4e259
SL
44
45=head1 COPYRIGHT
46
47Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
48
49Licensed under the Apache License 2.0 (the "License"). You may not use
50this file except in compliance with the License. You can obtain a copy
51in the file LICENSE in the source distribution or at
52L<https://www.openssl.org/source/license.html>.
53
54=cut