Hello, I have defined a custom ASN.1 structure by doing something like this:
*typedef struct my_custom* *{* * ... // omited * * * *} MY_CUSTOM;* Then I did the declarations like this: *DECLARE_ASN1_ITEM(MY_CUSTOM)* *DECLARE_STACK_OF(MY_CUSTOM)* *DECLARE_ASN1_SET_OF(MY_CUSTOM)* And implemented (it is a sequence): *ASN1_SEQUENCE(MY_CUSTOM) =* *{* * ... // omited* * * *} ASN1_SEQUENCE_END(MY_CUSTOM)* * * *IMPLEMENT_ASN1_FUNCTIONS_const(MY_CUSTOM)* *IMPLEMENT_ASN1_DUP_FUNCTION(MY_CUSTOM)* The problem is that I can't use the stack functions like * sk_MY_CUSTOM_new_null* or *sk_MY_CUSTOM_num*. Digging the code I've found this line: *#define IMPLEMENT_STACK_OF(type) /* nada (obsolete in new safestack approach)*/* But the previous does nothing =p. Further looking in the code I see that everything is defined in terms of the SKM_... stuff. For example, for PKCS7 it is done like this: *#define sk_PKCS7_new(cmp) SKM_sk_new(PKCS7, (cmp))* *#define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7)* ... So, the recomended way to do this is by defining by hand? Like: *#define sk_**MY_CUSTOM**_new(cmp) SKM_sk_new(**MY_CUSTOM**, (cmp))* *#define sk_**MY_CUSTOM**_new_null() SKM_sk_new_null(**MY_CUSTOM**)* * * thank you. -- Felipe Menegola Blauth