Blob Blame History Raw
From 914164383085c6559f0f5fe608385c3024095f74 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Wed, 29 Apr 2020 16:33:35 -0400
Subject: [PATCH 38/39] Include template-profile, issuer and MS cert template
 in output

---
 src/getcert.c               | 16 ++++++++++++++++
 tests/028-dbus/expected.out |  1 +
 2 files changed, 17 insertions(+)

diff --git a/src/getcert.c b/src/getcert.c
index 493771f..42281af 100644
--- a/src/getcert.c
+++ b/src/getcert.c
@@ -3882,6 +3882,22 @@ list(const char *argv0, int argc, const char **argv)
 				printf("\t\t%s\n", as[j]);
 			}
 		}
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
+					CM_DBUS_PROP_TEMPLATE_PROFILE, verbose, globals.tctx);
+		if (s1 != NULL && strlen(s1) > 0) {
+			printf(_("\tprofile: %s\n"), s1);
+		}
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
+					CM_DBUS_PROP_TEMPLATE_MS_CERTIFICATE_TEMPLATE,
+					verbose, globals.tctx);
+		if (s1 != NULL && strlen(s1) > 0) {
+			printf(_("\tms v2 template: %s\n"), s1);
+		}
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
+					CM_DBUS_PROP_TEMPLATE_ISSUER, verbose, globals.tctx);
+		if (s1 != NULL && strlen(s1) > 0) {
+			printf(_("\tissuer template: %s\n"), s1);
+		}
 		printf(_("\tpre-save command: %s\n"),
 		       query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
 				    CM_DBUS_PROP_CERT_PRESAVE_COMMAND, verbose, globals.tctx));
diff --git a/tests/028-dbus/expected.out b/tests/028-dbus/expected.out
index 1d8bec4..a25eb34 100644
--- a/tests/028-dbus/expected.out
+++ b/tests/028-dbus/expected.out
@@ -15,6 +15,7 @@ Request ID 'Buddy':
 	key usage: digitalSignature,dataEncipherment
 	eku: id-kp-serverAuth
 	certificate template/profile: SomeProfileName
+	profile: SomeProfileName
 	pre-save command: echo Pre
 	post-save command: echo Post
 	track: yes
-- 
2.21.1