Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
PKCS7_final — read data from a BIO into a ContentInfo objectDESCRIPTION
PKCS7_final() reads data and puts it into the appropriate content field of p7 itself or of its appropriate substructure, which can be of type SignedData, EnvelopedData, SignedAndEnvelopedData, DigestedData, or arbitrary data. The PKCS7_dataFinal(3) manual explains which field exactly the data is put into.- PKCS7_BINARY
- Copy the data verbatim without changing any bytes. By default, line endings are replaced with two-byte “\r\n” sequences (ASCII CR+LF). If this flag is set, PKCS7_TEXT is ignored.
- PKCS7_TEXT
- Prepend “Content-Type: text/plain” followed by a blank line to the data. This flag is ignored if PKCS7_BINARY is also set.
RETURN VALUES
PKCS7_final() returns 1 on success or 0 on failure.- p7 is NULL.
- The content field of p7 is empty.
- The contentType of p7 is unsupported.
- Signing or digesting is requested and p7 is not configured to store a detached signature, but does not contain the required field to store the content either.
- At least one signer lacks a useable digest algorithm.
- A cipher is required but none is configured.
- Any required operation fails, for example signing or digesting.
- Memory allocation fails.