Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
CMS_decrypt, CMS_decrypt_set1_pkey, CMS_decrypt_set1_key — decrypt content from a CMS EnvelopedData structureSYNOPSIS
#include <openssl/cms.h>CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *private_key, X509 *certificate, BIO *dcont, BIO *out, unsigned int flags);
CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *private_key, X509 *certificate);
CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *symmetric_key, size_t keylen, const unsigned char *id, size_t idlen);
DESCRIPTION
CMS_decrypt() extracts and decrypts the content from the CMS EnvelopedData structure cms using the private_key and the certificate of the recipient. It writes the decrypted content to out.RETURN VALUES
CMS_decrypt(), CMS_decrypt_set1_pkey(), and CMS_decrypt_set1_key() return 1 for success or 0 for failure. The error can be obtained from ERR_get_error(3).STANDARDS
RFC 5652: Cryptographic Message Syntax (CMS)- section 6.1: EnvelopedData Type
- section 6.2.3: KEKRecipientInfo Type