CMS_data_create.pod 1.7 KB

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