Hello,
I'm currently performing an upgrade from 1.0.2 to 3.0 and I'm having some
difficulties.
Our code is very old and some assumptions could have changed during time.
Anyway the problem I have right now is about d2i_ASN1_SET and i2d_ASN1_SET
functions that in OpenSSL 3 are not available anymore.
In particular I have the function
i2d_ASN1_SET_OF_X509_CRL( stack, &position, reinterpret_cast<
int(*)(X509_CRL*,unsigned char**) >( i2d_X509_CRL ),  1,
V_ASN1_CONTEXT_SPECIFIC,  IS_SET ) );

In version 3 of my code I did the following:
ASN1_ITEM_TEMPLATE(X509_CRLStack) =
        ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SET_ORDER, 0, X509_CRLStack,
X509_CRL)
ASN1_ITEM_TEMPLATE_END(X509_CRLStack);
IMPLEMENT_ASN1_FUNCTIONS(X509_CRLStack);
I replaced i2d_ASN1_SET_OF_X509_CRL with i2d_X509_CRLStack( stack,
&position )

The problem arises when I save the result and try to read with version
1.0.2 of my code. I have to be sure to garante legacy compatibility
In d2i_X509_CRLStack I get error bad class

Can you please help me to understand  what I'm doing wrong?

Regards
Ivano

Reply via email to