Hello,
I would like to use openssl/asn1 with these types:
TA ::= CHOICE {
f1 SET OF TA,
f2 TA,
f3 INTEGER
}
TB ::= SEQUENCE {
f1 INTEGER,
f2 CHOICE {
f2_1 INTEGER,
f2_2 BOOLEAN
}
}
I have two problems but I don't have found any
responses on Internet.
1) The definition of TA
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 INTEG
Hello everyone.
I would like to implement these types with openssl/asn.1:
1 H ::= [APPLICATION 0] INTEGER
2
3 I ::= [APPLICATION 1] OCTET STRING
4
5 G ::= CHOICE {
6 g_1 H,
7 g_2 I }
To do so, I have created a test program (at the end of this message).
Now, all functions but d2
Hi,
I have made the change. Now, the CHOICE looks like:
1 ASN1_CHOICE(G) = {
2ASN1_EX_TYPE(ASN1_TFLG_EXPTAG|ASN1_TFLG_APPLICATION, 0, G, value.g_1,
H_BODY),
3ASN1_EX_TYPE(ASN1_TFLG_EXPTAG|ASN1_TFLG_APPLICATION, 1, G, value.g_2,
I_BODY)
4 } ASN1_CHOICE_END(G)
It works fine. Bu