CMS_data_create.pod 1.6 KB

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