<div dir="ltr"><div dir="ltr" class="gmail_attr">Hello,<br></div><div dir="ltr">I'm currently performing an upgrade from 1.0.2 to 3.0 and I'm having some difficulties.<br>Our code is very old and some assumptions could have changed during time.<br>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.<br>In particular I have the function<br>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 ) );<br><br>In version 3 of my code I did the following:<br>ASN1_ITEM_TEMPLATE(X509_CRLStack) = <br>        ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SET_ORDER, 0, X509_CRLStack, X509_CRL) <br>ASN1_ITEM_TEMPLATE_END(X509_CRLStack);<br>IMPLEMENT_ASN1_FUNCTIONS(X509_CRLStack);<br>I replaced 

i2d_ASN1_SET_OF_X509_CRL with i2d_X509_CRLStack( stack, &position )<br><br>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<br>In d2i_X509_CRLStack I get error bad class<br><br>Can you please help me to understand  what I'm doing wrong?<br><br>Regards<br>Ivano</div></div>