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_EncryptedData_decrypt
      6      1.1  christos - Decrypt CMS EncryptedData
      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  int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
     13      1.1  christos                                const unsigned char *key, size_t keylen,
     14      1.1  christos                                BIO *dcont, BIO *out, unsigned int flags);
     15      1.1  christos 
     16      1.1  christos =head1 DESCRIPTION
     17      1.1  christos 
     18      1.1  christos CMS_EncryptedData_decrypt() decrypts a I<cms> EncryptedData object using the
     19      1.1  christos symmetric I<key> of size I<keylen> bytes. I<out> is a BIO to write the content
     20      1.1  christos to and I<flags> is an optional set of flags.
     21      1.1  christos I<dcont> is used in the rare case where the encrypted content is detached. It
     22      1.1  christos will normally be set to NULL.
     23      1.1  christos 
     24  1.1.1.2  christos The following flags can be passed in the I<flags> parameter.
     25      1.1  christos 
     26  1.1.1.2  christos If the B<CMS_TEXT> flag is set MIME headers for type C<text/plain> are deleted
     27  1.1.1.2  christos from the content. If the content is not of type C<text/plain> then an error is
     28      1.1  christos returned.
     29      1.1  christos 
     30      1.1  christos =head1 RETURN VALUES
     31      1.1  christos 
     32      1.1  christos CMS_EncryptedData_decrypt() returns 0 if an error occurred otherwise it
     33      1.1  christos returns 1.
     34      1.1  christos 
     35      1.1  christos =head1 SEE ALSO
     36      1.1  christos 
     37      1.1  christos L<ERR_get_error(3)>, L<CMS_EncryptedData_encrypt(3)>
     38      1.1  christos 
     39      1.1  christos 
     40      1.1  christos =head1 COPYRIGHT
     41      1.1  christos 
     42  1.1.1.2  christos Copyright 2020-2023 The OpenSSL Project Authors. All Rights Reserved.
     43      1.1  christos 
     44      1.1  christos Licensed under the Apache License 2.0 (the "License").  You may not use
     45      1.1  christos this file except in compliance with the License.  You can obtain a copy
     46      1.1  christos in the file LICENSE in the source distribution or at
     47      1.1  christos L<https://www.openssl.org/source/license.html>.
     48      1.1  christos 
     49      1.1  christos =cut
     50