int make_revoked(X509_REVOKED *rev, char *str)
int make_revoked(X509_REVOKED *rev, const char *str)
int make_revoked(X509_REVOKED *rev, char *str)	{	char *tmp = NULL;	int reason_code = -1;	int i, ret = 0;	ASN1_OBJECT *hold = NULL;	ASN1_GENERALIZEDTIME *comp_time = NULL;	ASN1_ENUMERATED *rtmp = NULL;	ASN1_TIME *revDate = NULL;	i = unpack_revinfo(&revDate, &reason_code, &hold, &comp_time, str);	if (i == 0)		goto err;	if (rev && !X509_REVOKED_set_revocationDate(rev, revDate))		goto err;	if (rev && (reason_code != OCSP_REVOKED_STATUS_NOSTATUS))		{		rtmp = ASN1_ENUMERATED_new();		if (!rtmp || !ASN1_ENUMERATED_set(rtmp, reason_code))			goto err;		if (!X509_REVOKED_add1_ext_i2d(rev, NID_crl_reason, rtmp, 0, 0))			goto err;		}	if (rev && comp_time)		{		if (!X509_REVOKED_add1_ext_i2d(rev, NID_invalidity_date, comp_time, 0, 0))			goto err;		}	if (rev && hold)		{		if (!X509_REVOKED_add1_ext_i2d(rev, NID_hold_instruction_code, hold, 0, 0))			goto err;		}	if (reason_code != OCSP_REVOKED_STATUS_NOSTATUS)		ret = 2;	else ret = 1;	err:	if (tmp) OPENSSL_free(tmp);	ASN1_OBJECT_free(hold);	ASN1_GENERALIZEDTIME_free(comp_time);	ASN1_ENUMERATED_free(rtmp);	ASN1_TIME_free(revDate);	return ret;	}