ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE);
ASN1err(ASN1_F_ASN1_ITEM_I2D_BIO,ERR_R_MALLOC_FAILURE);
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x)	{	unsigned char *b = NULL;	int i,j=0,n,ret=1;	n = ASN1_item_i2d(x, &b, it);	if (b == NULL)		{		ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE);		return(0);		}	for (;;)		{		i=BIO_write(out,&(b[j]),n);		if (i == n) break;		if (i <= 0)			{			ret=0;			break;			}		j+=i;		n-=i;		}	OPENSSL_free(b);	return(ret);	}