PR: 2366
[openssl.git] / apps / verify.c
index c0be253db23329c713307f419bc187e505b19bb3..4fd6b192e34d6c1a983c0d38d415452e8aa93459 100644 (file)
@@ -234,13 +234,26 @@ end:
                BIO_printf(bio_err," [-engine e]");
 #endif
                BIO_printf(bio_err," cert1 cert2 ...\n");
+
                BIO_printf(bio_err,"recognized usages:\n");
-               for(i = 0; i < X509_PURPOSE_get_count(); i++) {
+               for(i = 0; i < X509_PURPOSE_get_count(); i++)
+                       {
                        X509_PURPOSE *ptmp;
                        ptmp = X509_PURPOSE_get0(i);
-                       BIO_printf(bio_err, "\t%-10s\t%s\n", X509_PURPOSE_get0_sname(ptmp),
-                                                               X509_PURPOSE_get0_name(ptmp));
-               }
+                       BIO_printf(bio_err, "\t%-10s\t%s\n",
+                                       X509_PURPOSE_get0_sname(ptmp),
+                                       X509_PURPOSE_get0_name(ptmp));
+                       }
+
+               BIO_printf(bio_err,"recognized verify names:\n");
+               for(i = 0; i < X509_VERIFY_PARAM_get_count(); i++)
+                       {
+                       const X509_VERIFY_PARAM *vptmp;
+                       vptmp = X509_VERIFY_PARAM_get0(i);
+                       BIO_printf(bio_err, "\t%-10s\n",
+                                       X509_VERIFY_PARAM_get0_name(vptmp));
+                       }
+
        }
        if (vpm) X509_VERIFY_PARAM_free(vpm);
        if (cert_ctx != NULL) X509_STORE_free(cert_ctx);
@@ -310,7 +323,9 @@ static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx)
                                0, XN_FLAG_ONELINE);
                        printf("\n");
                        }
-               printf("error %d at %d depth lookup:%s\n",cert_error,
+               printf("%serror %d at %d depth lookup:%s\n",
+                       X509_STORE_CTX_get0_parent_ctx(ctx) ? "[CRL path]" : "",
+                       cert_error,
                        X509_STORE_CTX_get_error_depth(ctx),
                        X509_verify_cert_error_string(cert_error));
                switch(cert_error)