"\nemailAddress type needs to be of type IA5STRING\n");
goto end;
}
- j = ASN1_PRINTABLE_type(ASN1_STRING_get0_data(str),
- ASN1_STRING_length(str));
- if ((type == V_ASN1_T61STRING && j != V_ASN1_T61STRING)
- || (type == V_ASN1_IA5STRING && type == V_ASN1_PRINTABLESTRING)) {
- BIO_puts(bio_err,
- "\nThe string contains characters that are illegal for the"
- " ASN.1 type\n");
- goto end;
+ if (type != V_ASN1_BMPSTRING && type != V_ASN1_UTF8STRING) {
+ j = ASN1_PRINTABLE_type(ASN1_STRING_get0_data(str),
+ ASN1_STRING_length(str));
+ if ((j == V_ASN1_T61STRING && type != V_ASN1_T61STRING)
+ || (j == V_ASN1_IA5STRING && type == V_ASN1_PRINTABLESTRING)) {
+ BIO_puts(bio_err,
+ "\nThe string contains characters that are illegal for the"
+ " ASN.1 type\n");
+ goto end;
+ }
}
if (default_op)