]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/cmp.c
apps: Correct and extend diagnostics of parse_name()
[thirdparty/openssl.git] / apps / cmp.c
index 1af53510b32dc2fec08a570ebb3b0f630ca6dd17..86b1bd6a30d1b838ed170e3b1f0e88f03bac2a03 100644 (file)
@@ -1109,12 +1109,10 @@ static int set_name(const char *str,
                     OSSL_CMP_CTX *ctx, const char *desc)
 {
     if (str != NULL) {
-        X509_NAME *n = parse_name(str, MBSTRING_ASC, 0);
+        X509_NAME *n = parse_name(str, MBSTRING_ASC, 0, desc);
 
-        if (n == NULL) {
-            CMP_err2("cannot parse %s DN '%s'", desc, str);
+        if (n == NULL)
             return 0;
-        }
         if (!(*set_fn) (ctx, n)) {
             X509_NAME_free(n);
             CMP_err("out of memory");