PKCS12err(PKCS12_F_PKCS12_PACK_P7_DATA, ERR_R_MALLOC_FAILURE);
PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, ERR_R_MALLOC_FAILURE);
PKCS7 *PKCS12_pack_p7data (STACK *sk){	PKCS7 *p7;	if (!(p7 = PKCS7_new())) {		PKCS12err(PKCS12_F_PKCS12_PACK_P7_DATA, ERR_R_MALLOC_FAILURE);		return NULL;	}	p7->type = OBJ_nid2obj(NID_pkcs7_data);	if (!(p7->d.data = ASN1_OCTET_STRING_new())) {		PKCS12err(PKCS12_F_PKCS12_PACK_P7_DATA, ERR_R_MALLOC_FAILURE);		return NULL;	}		if (!ASN1_seq_pack(sk, i2d_PKCS12_SAFEBAG, &p7->d.data->data,					&p7->d.data->length)) {		PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, PKCS12_R_CANT_PACK_STRUCTURE);		return NULL;	}	return p7;}