On Thu, Sep 16, 2004, Antonio Ruiz Martínez wrote:

> Hello!
> 
> Dr. Stephen Henson wrote:
> 
> >
> >My guess is that there's a problem with the generation of the encoding of 
> >the
> >attribute: what code did you use for that?
> > 
> >
> 
>    oct=ASN1_STRING_new();
>    if (!ASN1_STRING_set(oct,p72,lenP72)) {
>        lReturn=-50;
>        goto err;
>    }
> 
>    p7=PKCS7_new();
>    if (p7==NULL) {
>        lReturn=-20;
>        goto err;
>    }
> //add certificate and keys...
> ...  
> //get the signer info...
>    PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(char *)oct);
>   
> //insert the date with PKCS7_dataInit and bio_write and PKCS7_dataFinal...
> 
> //ENCODE in DER ...
> ....
> 
> Any idea?
> 

Its the bit *before* that which is needed: the part that produces p72 and
lenP72.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to