Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
PKCS7_dataFinal — move data from a BIO chain to a ContentInfo objectDESCRIPTION
PKCS7_dataFinal() transfers the data from the memory BIO at the end of the given chain into the appropriate content field of p7 itself or of its appropriate substructure. It is typically used as the final step of populating p7, after creating the chain with PKCS7_dataInit(3) and after writing the data into it.-
for SignedData
or
DigestedData: - in substructures of the content field of p7: the content field in the ContentInfo structure (unless p7 is configured to store a detached signature) and the encryptedDigest fields in all the SignerInfo structures
-
for EnvelopedData
or
SignedAndEnvelopedData: - the encryptedContent field in the EncryptedContentInfo structure contained in the content field of p7
- for arbitrary data:
- the content field of p7 itself
RETURN VALUES
PKCS7_dataFinal() returns 1 on success or 0 on failure.- p7 is NULL.
- The content field of p7 is empty.
- The contentType of p7 is unsupported.
- The chain does not contain the expected memory BIO.
- 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 usable digest algorithm.
- Signing or digesting fails.
- Memory allocation fails.