From 6623ac64414edd7ba19c4352333224be2a709f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 5 Jun 2007 02:28:18 +0000 Subject: [PATCH] Use selfsigned for CRL DP whine, tell if its a self-signed. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20907 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/print.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/hx509/print.c b/lib/hx509/print.c index 7b724518b..f85668fef 100644 --- a/lib/hx509/print.c +++ b/lib/hx509/print.c @@ -708,8 +708,11 @@ hx509_validate_cert(hx509_context context, "issuer name: %s\n", str); free(str); - if (hx509_name_cmp(subject, issuer) == 0) + if (hx509_name_cmp(subject, issuer) == 0) { status.selfsigned = 1; + validate_print(ctx, HX509_VALIDATE_F_VERBOSE, + "\tis a self-signed certificate\n"); + } validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "Validity:\n"); @@ -796,11 +799,10 @@ hx509_validate_cert(hx509_context context, validate_print(ctx, HX509_VALIDATE_F_VALIDATE, "NULL subject DN and doesn't have a SAN\n"); - if (!status.isca && !status.isproxy && !status.haveCRLDP) { + if (!status.selfsigned && !status.haveCRLDP) validate_print(ctx, HX509_VALIDATE_F_VALIDATE, "Not a CA nor PROXY and doesn't have" "CRL Dist Point\n"); - } hx509_name_free(&subject); hx509_name_free(&issuer);