For what I understood recently (I had to work a bit with it), the macro IMPLEMENT_ASN1_FUNCTIONS will expand (macro usage is quite heavy in OpenSSL) to provide a number of functions for the struct KDC_PRINCNAME, such as KDC_PRINCNAME_i2d, KDC_PRINCNAME_d2i, etc.

The magic works so that you do not have to implement those functions with new code because the macros will expand the sequence (so that they know what shal be done) and write the code for you.

Vinay Kumar L wrote:
Hi All,

I found a code snippet as follows:

ASN1_SEQUENCE(KDC_PRINCNAME) = {
        ASN1_EXP(KDC_PRINCNAME, realm,     ASN1_GENERALSTRING,     0),
        ASN1_EXP(KDC_PRINCNAME, princname, KRB5_PRINCNAME, 1)
} ASN1_SEQUENCE_END(KDC_PRINCNAME);

IMPLEMENT_ASN1_FUNCTIONS(KDC_PRINCNAME)

Here ASN1_SEQUENCE implements the asn1 sequence of KDC_PRINCNAME, but what is the functionality of "IMPLEMENT_ASN1_FUNCTIONS(KDC_PRINCNAME)"? Is it compulsory to include this function after defining every ASN1_SEQUENCE? Please guide me.

Regards,
Vinay
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to