if (nid == NID_pkcs9_emailAddress) *type=V_ASN1_IA5STRING; if ((nid == NID_commonName) && (*type == V_ASN1_IA5STRING)) *type=V_ASN1_T61STRING; if ((nid == NID_pkcs9_challengePassword) && (*type == V_ASN1_IA5STRING)) *type=V_ASN1_T61STRING;
if(type) { if (nid == NID_pkcs9_emailAddress) *type=V_ASN1_IA5STRING; if ((nid == NID_commonName) && (*type == V_ASN1_IA5STRING)) *type=V_ASN1_T61STRING; if ((nid == NID_pkcs9_challengePassword) && (*type == V_ASN1_IA5STRING)) *type=V_ASN1_T61STRING;
static int req_fix_data(int nid, int *type, int len, int min, int max)	{	if (nid == NID_pkcs9_emailAddress)		*type=V_ASN1_IA5STRING;	if ((nid == NID_commonName) && (*type == V_ASN1_IA5STRING))		*type=V_ASN1_T61STRING;	if ((nid == NID_pkcs9_challengePassword) &&		(*type == V_ASN1_IA5STRING))		*type=V_ASN1_T61STRING;	if ((nid == NID_pkcs9_unstructuredName) &&		(*type == V_ASN1_T61STRING))		{		BIO_printf(bio_err,"invalid characters in string, please re-enter the string\n");		return(0);		}	if (nid == NID_pkcs9_unstructuredName)		*type=V_ASN1_IA5STRING;	if (len < min)		{		BIO_printf(bio_err,"string is too short, it needs to be at least %d bytes long\n",min);		return(0);		}	if ((max != 0) && (len > max))		{		BIO_printf(bio_err,"string is too long, it needs to be less than  %d bytes long\n",max);		return(0);		}	return(1);	}