CMS_uncompress.pod 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =pod
  2. =head1 NAME
  3. CMS_uncompress - uncompress a CMS CompressedData structure
  4. =head1 SYNOPSIS
  5. #include <openssl/cms.h>
  6. int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags);
  7. =head1 DESCRIPTION
  8. CMS_uncompress() extracts and uncompresses the content from a CMS
  9. CompressedData structure B<cms>. B<data> is a BIO to write the content to and
  10. B<flags> is an optional set of flags.
  11. The B<dcont> parameter is used in the rare case where the compressed content
  12. is detached. It will normally be set to NULL.
  13. =head1 NOTES
  14. The only currently supported compression algorithm is zlib: if the structure
  15. indicates the use of any other algorithm an error is returned.
  16. If zlib support is not compiled into OpenSSL then CMS_uncompress() will always
  17. return an error.
  18. The following flags can be passed in the B<flags> parameter.
  19. If the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted
  20. from the content. If the content is not of type B<text/plain> then an error is
  21. returned.
  22. =head1 RETURN VALUES
  23. CMS_uncompress() returns either 1 for success or 0 for failure. The error can
  24. be obtained from ERR_get_error(3)
  25. =head1 BUGS
  26. The lack of single pass processing and the need to hold all data in memory as
  27. mentioned in CMS_verify() also applies to CMS_decompress().
  28. =head1 SEE ALSO
  29. L<ERR_get_error(3)>, L<CMS_compress(3)>
  30. =head1 COPYRIGHT
  31. Copyright 2008-2016 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