|
Hello! Dr. Stephen Henson wrote: On Wed, Sep 15, 2004, Antonio Ruiz Martínez wrote:Hello! 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? I tried to put the sequence in an octet_string and with that way there is no problem but I would like to use the SEQUENCE directley if it is possible.You can put totally unstructured garbage data in an OCTET_STRING and the result will still parse until you try to decode the contents. If however you try that with the V_ASN1_SEQUENCE it will choke the parser when you try d2i_PKCS7() on the outer structure. Regards, Antonio. |
- PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Dr. Stephen Henson
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
- Re: PKCS7_add_attribut... Dr. Stephen Henson
- Re: PKCS7_add_attribute Peter Sylvester
- Re: PKCS7_add_attribute Peter Sylvester
- Re: PKCS7_add_attribute Antonio Ruiz Mart�nez
