static int TS_TST_INFO_content_new(PKCS7 *p7)
	{
	PKCS7 *ret = NULL;
	ASN1_OCTET_STRING *octet_string = NULL;

	/* Create new encapsulated NID_id_smime_ct_TSTInfo content. */
	if (!(ret = PKCS7_new())) goto err;
	if (!(ret->d.other = ASN1_TYPE_new())) goto err;
	ret->type = OBJ_nid2obj(NID_id_smime_ct_TSTInfo);
	if (!(octet_string = ASN1_OCTET_STRING_new())) goto err;
	ASN1_TYPE_set(ret->d.other, V_ASN1_OCTET_STRING, octet_string);
	octet_string = NULL;

	/* Add encapsulated content to signed PKCS7 structure. */
	if (!PKCS7_set_content(p7, ret)) goto err;

	return 1;
 err:
	ASN1_OCTET_STRING_free(octet_string);
	PKCS7_free(ret);
	return 0;
	}
static int TS_TST_INFO_content_new(PKCS7 *p7)
	{
	PKCS7 *ret = NULL;
	ASN1_OCTET_STRING *octet_string = NULL;

	 
	if (!(ret = PKCS7_new())) goto err;
	if (!(ret->d.other = ASN1_TYPE_new())) goto err;
	ret->type = OBJ_nid2obj(NID_id_smime_ct_TSTInfo);
	if (!(octet_string = ASN1_OCTET_STRING_new())) goto err;
	ASN1_TYPE_set(ret->d.other, V_ASN1_OCTET_STRING, octet_string);
	octet_string = NULL;

	 
	if (!PKCS7_set_content(p7, ret)) goto err;

	return 1;
 err:
	ASN1_OCTET_STRING_free(octet_string);
	PKCS7_free(ret);
	return 0;
	}