<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>I am trying to define an ASN1 structure similar to this:</p>
<pre>ASN1_SEQUENCE(TEST) = {
ASN1_SIMPLE(TEST, version, ASN1_INTEGER),
ASN1_EXP_SEQUENCE_OF_OPT(TEST, otherTests, TEST, 0)
} ASN1_SEQUENCE_END(TEST)</pre>
<pre>IMPLEMENT_ASN1_FUNCTIONS(TEST) [**]
</pre>
<p>what is the correct procedure for doing that ? The problem is
that the "otherTests" field should be a sequence of "TEST"
structures, but defined like that it won't work.</p>
<p>Is there a way to solve the issue ? Or shall we use something
like ASN1_ANY to avoid the circular reference ?<br>
</p>
<p>Cheers,<br>
Max</p>
<p>[**] = For completeness, that is what is defined in the test.c -
in test.h we define the struct as usual</p>
<pre> struct test_st;
typedef struct test_st TEST;
</pre>
<pre> typedef struct test_st {
ASN1_INTEGER * version;
STACK_OF(TEST) * otherTests;
} TEST;</pre>
<pre> DECLARE_ASN1_FUNCTIONS(TEST)
</pre>
<div class="moz-signature">-- <br>
<div style="color: black; margin-top: 10px;">
Best Regards,
<div style="margin-top: 5px; margin-left: 0px; ">
Massimiliano Pala, Ph.D.<br>
OpenCA Labs Director<br>
</div>
<img src="cid:part1.F54BA85A.C1FF73A9@openca.org"
style="vertical-align: 0px; margin-top: 10px; margin-left:
0px;" alt="OpenCA Logo"><br>
</div>
</div>
</body>
</html>