Thank you Stephen for your reply.

As expected in your answer, I have used
ASN1_DECLARE_ITEM(TA) just before
ASN1_CHOICE(TA). Now, it compiles.

I believe to understant why this structure
is ambiguous. Only, I need this field f2.
If I write:

TA ::= CHOICE {
  f1 SET OF TA,
  f2 [10] TA,
  f3 INTEGER
}

1  struct _ta_st TA;
2
3  struct _ta_st {
4    int type;
5    union {
6      STACK_OF(TA) *f1;
7      TA *f2;
8      ASN1_INTEGER *f3;
9    } value;
10 };
11
12 ASN1_DECLARE_ITEM(TA)
13 ASN1_CHOICE(TA) = {
14   ASN1_SET_OF(TA, value.f1, TA),
15   ASN1_EXP(TA, value.f2, TA, 10),
16   ASN1_SIMPLE(TA, value.f3, ASN1_INTEGER)
17 } ASN1_CHOICE_END(TA)

I think that the ambiquity is not present any more.
Is it correct ?

I will see how it works with ASN1_DECLARE_ITEM(TA).
It compiles and the structure seems to be correctely
initialised.

Thank you very much.

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

Reply via email to