Difference ASN1_item_d2i_bio / ASN1_d2i_bio_of ?

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

 



Hi,

I want to read several bespoke ASN1 types from a BIO.  DECLARE_ASN1_FUNCTIONS does not include d2i bio routines, so what is the best way to define them?

I have seen both ASN1_item_d2i_bio() and ASN1_d2i_bio_of() and it is not clear to me why one might be used over the other.

E.g. cms_io.c has a one-line function calling ASN1_item_d2i_bio():

	CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms)
	{
	    return ASN1_item_d2i_bio(ASN1_ITEM_rptr(CMS_ContentInfo), bp, cms);
	}

Whereas ocsp.h has a macro using ASN1_d2i_bio_of, which itself is defined in terms of ASN1_d2i_bio():

	#  define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)

Regards,
Andrew.





[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