On 5/31/06, Dr. Stephen Henson <[EMAIL PROTECTED]> wrote:
On Tue, May 30, 2006, Saurabh Arora wrote:

> On 5/29/06, Dr. Stephen Henson <[EMAIL PROTECTED]> wrote:
>
> , but i am unable to find a way for decoding .
> can you tell the way.. how to check the type V_ASN1_SEQUENCE .
>

ASN1_TYPE_get().

Steve.
--

but how do i decode it back ??
i am not able to link the chain in i2r function ..

i have
----------
ATTRIBUTES = {
value ASN1_ANY
}

ATTRIBUTE1 = {
one INTEGER
two INTEGER
}
-----------

to decode back .. i will have to use ..

ATTRIBUTE1 attr1 = d2i_ATTRIBUTE1(NULL,char *,int)

now to get the blob (char *)STRING and int length :

ATTRIBUTES *atttr;
ATTRIBUTE1 *attr1;

char *buf;
int len;
ASN1_STRING *str;

str = attr->value->value.ptr;

buf = str->data;
len = str->length;

attr1 = d2i_ATTRIBUTE1(NULL,&buf,len);

BIO_printf(out,attr1->one, ....);

is there a way .. so that i can access the chain like :
attr->attr1->one

instead of the above procedure .. which is giving me SEGMENTATION ERRORS..


regards

tanish
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to