Home | History | Annotate | Line # | Download | only in man3
      1  1.1  christos =pod
      2  1.1  christos 
      3  1.1  christos =head1 NAME
      4  1.1  christos 
      5  1.1  christos CMS_data_create_ex, CMS_data_create
      6  1.1  christos - Create CMS Data object
      7  1.1  christos 
      8  1.1  christos =head1 SYNOPSIS
      9  1.1  christos 
     10  1.1  christos  #include <openssl/cms.h>
     11  1.1  christos 
     12  1.1  christos  CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
     13  1.1  christos                                      OSSL_LIB_CTX *libctx, const char *propq);
     14  1.1  christos  CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
     15  1.1  christos 
     16  1.1  christos =head1 DESCRIPTION
     17  1.1  christos 
     18  1.1  christos CMS_data_create_ex() creates a B<CMS_ContentInfo> structure
     19  1.1  christos with a type B<NID_pkcs7_data>. The data is supplied via the I<in> BIO.
     20  1.1  christos The library context I<libctx> and the property query I<propq> are used when
     21  1.1  christos retrieving algorithms from providers. The I<flags> field supports the
     22  1.1  christos B<CMS_STREAM> flag. Internally CMS_final() is called unless B<CMS_STREAM> is
     23  1.1  christos specified.
     24  1.1  christos 
     25  1.1  christos The B<CMS_ContentInfo> structure can be freed using L<CMS_ContentInfo_free(3)>.
     26  1.1  christos 
     27  1.1  christos CMS_data_create() is similar to CMS_data_create_ex()
     28  1.1  christos but uses default values of NULL for the library context I<libctx> and the
     29  1.1  christos property query I<propq>.
     30  1.1  christos 
     31  1.1  christos =head1 RETURN VALUES
     32  1.1  christos 
     33  1.1  christos If the allocation fails, CMS_data_create_ex() and CMS_data_create()
     34  1.1  christos return NULL and set an error code that can be obtained by L<ERR_get_error(3)>.
     35  1.1  christos Otherwise they return a pointer to the newly allocated structure.
     36  1.1  christos 
     37  1.1  christos =head1 SEE ALSO
     38  1.1  christos 
     39  1.1  christos L<ERR_get_error(3)>, L<CMS_final(3)>
     40  1.1  christos 
     41  1.1  christos =head1 HISTORY
     42  1.1  christos 
     43  1.1  christos The CMS_data_create_ex() method was added in OpenSSL 3.0.
     44  1.1  christos 
     45  1.1  christos =head1 COPYRIGHT
     46  1.1  christos 
     47  1.1  christos Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
     48  1.1  christos 
     49  1.1  christos Licensed under the Apache License 2.0 (the "License").  You may not use
     50  1.1  christos this file except in compliance with the License.  You can obtain a copy
     51  1.1  christos in the file LICENSE in the source distribution or at
     52  1.1  christos L<https://www.openssl.org/source/license.html>.
     53  1.1  christos 
     54  1.1  christos =cut
     55