On Mon, Nov 15, 2010, Patrick Patterson wrote:

> Hi Steve:
> 
> On 2010-11-15, at 11:43 AM, Dr. Stephen Henson wrote:
> 
> > On Mon, Nov 15, 2010, Patrick Patterson wrote:
> > 
> > If you call CMS_dataInit() with a NULL BIO it should make use of any content
> > already in the CMS structure. It does create a read only BIO internally for
> > that purpose.
> > 
> 
> Ok - thanks for that tip - however, I'm still curious about 2 things:
> 
> 1: Why SID isn't getting set.
> 

Not sure haven't had a chance to check in more detail yet.

> 2: And now that I add:
> 
>    BIO *tmp = CMS_dataInit(cms, NULL);
>    err = ERR_get_error();
>    if (err != 0)
>            printf("ERROR: %s\n", ERR_error_string(err, NULL));
> 
>    CMS_dataFinal(cms, tmp);
>    err = ERR_get_error();
>    if (err != 0)
>            printf("ERROR: %s\n", ERR_error_string(err, NULL));
> 
> Which, based one what you've indicated, should do the right thing, I am 
> getting the errors:
> 
> cms_DigestAlgorithm_init_bio: unknown digest algorithm
> cms_DigestAlgorithm_find_ctx: no matching digest.
> 
> Now, if you examine the base64 output from my previous mail, and run it 
> through asn1_parse, you'll see that the SignedData structure does indeed have 
> SHA1 set as the MD, and SignerInfo also has the correct Algorithm set, so 
> from my reading of the two referenced functions, it should work. Any thoughts 
> as to why not?
> 
> Thanks for any insight you can give.
> 

Usual cause of that is missing OpenSSL_add_all_algorithms().

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to