CMS_EncryptedData_decrypt.pod 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. =pod
  2. =head1 NAME
  3. CMS_EncryptedData_decrypt
  4. - Decrypt CMS EncryptedData
  5. =head1 SYNOPSIS
  6. #include <openssl/cms.h>
  7. int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
  8. const unsigned char *key, size_t keylen,
  9. BIO *dcont, BIO *out, unsigned int flags);
  10. =head1 DESCRIPTION
  11. CMS_EncryptedData_decrypt() decrypts a I<cms> EncryptedData object using the
  12. symmetric I<key> of size I<keylen> bytes. I<out> is a BIO to write the content
  13. to and I<flags> is an optional set of flags.
  14. I<dcont> is used in the rare case where the encrypted content is detached. It
  15. will normally be set to NULL.
  16. The following flags can be passed in the B<flags> parameter.
  17. If the B<CMS_TEXT> flag is set MIME headers for type B<text/plain> are deleted
  18. from the content. If the content is not of type B<text/plain> then an error is
  19. returned.
  20. =head1 RETURN VALUES
  21. CMS_EncryptedData_decrypt() returns 0 if an error occurred otherwise it
  22. returns 1.
  23. =head1 SEE ALSO
  24. L<ERR_get_error(3)>, L<CMS_EncryptedData_encrypt(3)>
  25. =head1 COPYRIGHT
  26. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  27. Licensed under the Apache License 2.0 (the "License"). You may not use
  28. this file except in compliance with the License. You can obtain a copy
  29. in the file LICENSE in the source distribution or at
  30. L<https://www.openssl.org/source/license.html>.
  31. =cut