Re: PKCS7_add_attribute

2004-09-20 Thread Dr. Stephen Henson
firm > >that's the case with that. > > > > > Thanks for your comments, here you're the octet string version.The > content inside de octet string is the same the length of the file. This > file is generated with the same code that use to the previous f

Re: PKCS7_add_attribute

2004-09-20 Thread Antonio Ruiz Martínez
files the only difference is that for this version I'm using PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_OCTET_STRING,(void *)oct)  instead of using PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(void *)oct). Regards, Antonio. SignedP7TSP.p7 Description: Binary data

Re: PKCS7_add_attribute

2004-09-19 Thread Dr. Stephen Henson
On Sun, Sep 19, 2004, Dr. Stephen Henson wrote: > On Thu, Sep 16, 2004, Antonio Ruiz Martínez wrote: > > 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. > > > > I tried that test file

Re: PKCS7_add_attribute

2004-09-18 Thread Dr. Stephen Henson
On Thu, Sep 16, 2004, Antonio Ruiz Martínez wrote: > 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. > I tried that test file and it chokes several asn1 parsing tools. It looks like the at

Re: PKCS7_add_attribute

2004-09-16 Thread Antonio Ruiz Martínez
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_s

Re: PKCS7_add_attribute

2004-09-16 Thread Dr. Stephen Henson
; >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... > ... > /

Re: PKCS7_add_attribute

2004-09-16 Thread Antonio Ruiz Martínez
perly because I don't get the desired result. I've tried the following options: 1) ASN1_OCTET_STRING *oct=NULL; oct=ASN1_STRING_new(); ASN1_STRING_set(oct,p7_2,lenp7_2) where p7_2 -> coding in DER of a signed PKCS#7 PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(voi

Re: PKCS7_add_attribute

2004-09-15 Thread Dr. Stephen Henson
get the > desired result. > I've tried the following options: > > 1) > ASN1_OCTET_STRING *oct=NULL; > oct=ASN1_STRING_new(); > ASN1_STRING_set(oct,p7_2,lenp7_2) > where p7_2 -> coding in DER of a signed PKCS#7 > PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_

Re: PKCS7_add_attribute

2004-09-15 Thread Antonio Ruiz Martínez
Hello! Peter Sylvester wrote: You may try a routine like the following by replacing all occurences of ESS_SIGNING_CERTIFICATE by PKCS7 and change the nid to the PKCS9 V2 defined one. Or to consider to (mis)use id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(1

Re: PKCS7_add_attribute

2004-09-15 Thread Peter Sylvester
You may try a routine like the following by replacing all occurences of ESS_SIGNING_CERTIFICATE by PKCS7 and change the nid to the PKCS9 V2 defined one. Or to consider to (mis)use id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smi

Re: PKCS7_add_attribute

2004-09-15 Thread Antonio Ruiz Martínez
don't get the desired result. I've tried the following options: 1) ASN1_OCTET_STRING *oct=NULL; oct=ASN1_STRING_new(); ASN1_STRING_set(oct,p7_2,lenp7_2) where p7_2 -> coding in DER of a signed PKCS#7 PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(void *)oct); i2d_PKC7

Re: PKCS7_add_attribute

2004-09-15 Thread Antonio Ruiz Martínez
don't get the desired result. I've tried the following options: 1) ASN1_OCTET_STRING *oct=NULL; oct=ASN1_STRING_new(); ASN1_STRING_set(oct,p7_2,lenp7_2) where p7_2 -> coding in DER of a signed PKCS#7 PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(void *)oct); i2d_PKC7

Re: PKCS7_add_attribute

2004-09-15 Thread Dr. Stephen Henson
t; desired result. > I've tried the following options: > > 1) > ASN1_OCTET_STRING *oct=NULL; > oct=ASN1_STRING_new(); > ASN1_STRING_set(oct,p7_2,lenp7_2) > where p7_2 -> coding in DER of a signed PKCS#7 > PKCS7_add_attribute(si, NID_pkcs7_signed, V_ASN1_SEQUENCE,(

Re: PKCS7_add_attribute

2004-09-15 Thread Peter Sylvester
27;ve looking at the PKCS7_add_attribute function and I would like to insert a signed PKCS7 as an attribute. The header of the function is: PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,void *value); I suppose that nid should be the NID_pkcs7_signed but I don't know whi

Re: PKCS7_add_attribute

2004-09-15 Thread Antonio Ruiz Martínez
Hello! Dr. Stephen Henson wrote: On Wed, Sep 15, 2004, Antonio Ruiz Martínez wrote: Hello! I've looking at the PKCS7_add_attribute function and I would like to insert a signed PKCS7 as an attribute. The header of the function is: PKCS7_add_attribute(PKCS7_SIGNER

Re: PKCS7_add_attribute

2004-09-15 Thread Dr. Stephen Henson
On Wed, Sep 15, 2004, Antonio Ruiz Martínez wrote: > Hello! > >I've looking at the PKCS7_add_attribute function and I would like to > insert a signed PKCS7 as an attribute. > > The header of the function is: > > PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7

PKCS7_add_attribute

2004-09-15 Thread Antonio Ruiz Martínez
Hello! I've looking at the PKCS7_add_attribute function and I would like to insert a signed PKCS7 as an attribute. The header of the function is: PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,void *value); I suppose that nid should be the NID_pkcs7_signed but I