summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-10-27 17:04:47 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-10-27 17:04:47 +0000
commite7156ff2e8ac54e0e833751db0aa62164f0fb519 (patch)
treea1928e57701e2b4aff9a6b67ec9fd78513a8e189 /apps
parent437db75b943ba0f72eb27d49f660a6d69dfddf1b (diff)
Allow ca to certify requests containing BMPStrings and UTF8Strings.
Diffstat (limited to 'apps')
-rw-r--r--apps/ca.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/apps/ca.c b/apps/ca.c
index a6e6976f7f..4421070019 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1909,14 +1909,17 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
BIO_printf(bio_err,"\nemailAddress type needs to be of type IA5STRING\n");
goto err;
}
- j=ASN1_PRINTABLE_type(str->data,str->length);
- if ( ((j == V_ASN1_T61STRING) &&
- (str->type != V_ASN1_T61STRING)) ||
- ((j == V_ASN1_IA5STRING) &&
- (str->type == V_ASN1_PRINTABLESTRING)))
+ if ((str->type != V_ASN1_BMPSTRING) && (str->type != V_ASN1_UTF8STRING))
{
- BIO_printf(bio_err,"\nThe string contains characters that are illegal for the ASN.1 type\n");
- goto err;
+ j=ASN1_PRINTABLE_type(str->data,str->length);
+ if ( ((j == V_ASN1_T61STRING) &&
+ (str->type != V_ASN1_T61STRING)) ||
+ ((j == V_ASN1_IA5STRING) &&
+ (str->type == V_ASN1_PRINTABLESTRING)))
+ {
+ BIO_printf(bio_err,"\nThe string contains characters that are illegal for the ASN.1 type\n");
+ goto err;
+ }
}
if (default_op)