SignedData is not being produced detached. BIO_new_CMS with CMS_Sign
I am implementing a new streamer for CMS SignedData with CMS_sign.
I use BIO_new_CMS.
My program successfuly produces a SignedData structure in the end, but
the actual data is embedded. I have passed (CMS_BINARY | CMS_DETACHED
| CMS_STREAM) as flags to the initial call to CMS_sign but still the
SignedData is not being produced detached.
Am I missing something? Is there another way I can achieve the same thing?
The code that follows is a true fragment from my original program.