On Mon, May 29, 2006, Saurabh Arora wrote:

> hi all
> 
> heres another lead , but with few problems :
> 
> using this function we can set the type :
> ---------
> void ASN1_TYPE_set(a,type,value)
> ----------
> where
> ASN1_TYPE *a;
> int type;
> char *value;
> 
> so wen i try this with the type - V_ASN1_SEQUENCE,
> what should i add in the field (char *)value ??
> 
> do i have to convert ATTRIBUTE1 and 2 into octet strings using i2d
> functions to set the type ??
> 

You have to generate the encoding of the attribute and place it in an
ASN1_STRING structure using the type V_ASN1_SEQUENCE .

The decoding process is similar except you have to check the type is
V_ASN1_SEQUENCE then deocde it based on the contents of the ASN1_STRING.

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                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to