diff --git a/lib/hx509/name.c b/lib/hx509/name.c index a5877dfc7..e77a8f3da 100644 --- a/lib/hx509/name.c +++ b/lib/hx509/name.c @@ -527,6 +527,9 @@ hx509_name_expand(hx509_context context, Name *n = &name->der_name; int i, j; + if (env == NULL) + return 0; + if (n->element != choice_Name_rdnSequence) { hx509_set_error_string(context, 0, EINVAL, "RDN not of supported type"); return EINVAL;