I'm trying to use openssl to generate a signed CMS that matches the output of
a windows program written with the BouncyCastle library. One of the
differences I've noticed is that my openssl output has the length set for each
structure whereas the c# program has the length as inf and closes with an EOC.

I tried setting the CMS_STREAM flag, but that didn't change my output.
I realize it should not matter, but my code is crashing the server (which is
3rd party code so I can't change it) and the c# is not, so I'm wondering if it
could be related to EOC.

Here's a snipped of what my code is doing:

        int flags = CMS_STREAM; // or 0

        BIO *mem = BIO_new(BIO_s_mem());
        // write stuff to mem
        cms = CMS_sign(scert, skey, NULL, mem, flags);
        if (!i2d_CMS_bio(out, cms))

Is there some other flag, or some mode I can set to make it use EOC?

-- 
Chris Bare
[email protected]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to