ASN1 & Recursive Structures definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am trying to define an ASN1 structure similar to this:

ASN1_SEQUENCE(TEST) = {
    ASN1_SIMPLE(TEST, version, ASN1_INTEGER),
    ASN1_EXP_SEQUENCE_OF_OPT(TEST, otherTests, TEST, 0)
} ASN1_SEQUENCE_END(TEST)
IMPLEMENT_ASN1_FUNCTIONS(TEST) [**]

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.

Is there a way to solve the issue ? Or shall we use something like ASN1_ANY to avoid the circular reference ?

Cheers,
Max

[**] = For completeness, that is what is defined in the test.c - in test.h we define the struct as usual

    struct test_st;
    typedef struct test_st TEST;
    typedef struct test_st {
        ASN1_INTEGER * version;
        STACK_OF(TEST) * otherTests;
    } TEST;
    DECLARE_ASN1_FUNCTIONS(TEST)
--
Best Regards,
Massimiliano Pala, Ph.D.
OpenCA Labs Director
OpenCA Logo
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux