Blame SOURCES/0038-Include-template-profile-issuer-and-MS-cert-template.patch

5e5f7c
From 914164383085c6559f0f5fe608385c3024095f74 Mon Sep 17 00:00:00 2001
5e5f7c
From: Rob Crittenden <rcritten@redhat.com>
5e5f7c
Date: Wed, 29 Apr 2020 16:33:35 -0400
5e5f7c
Subject: [PATCH 38/39] Include template-profile, issuer and MS cert template
5e5f7c
 in output
5e5f7c
5e5f7c
---
5e5f7c
 src/getcert.c               | 16 ++++++++++++++++
5e5f7c
 tests/028-dbus/expected.out |  1 +
5e5f7c
 2 files changed, 17 insertions(+)
5e5f7c
5e5f7c
diff --git a/src/getcert.c b/src/getcert.c
5e5f7c
index 493771f..42281af 100644
5e5f7c
--- a/src/getcert.c
5e5f7c
+++ b/src/getcert.c
5e5f7c
@@ -3882,6 +3882,22 @@ list(const char *argv0, int argc, const char **argv)
5e5f7c
 				printf("\t\t%s\n", as[j]);
5e5f7c
 			}
5e5f7c
 		}
5e5f7c
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
5e5f7c
+					CM_DBUS_PROP_TEMPLATE_PROFILE, verbose, globals.tctx);
5e5f7c
+		if (s1 != NULL && strlen(s1) > 0) {
5e5f7c
+			printf(_("\tprofile: %s\n"), s1);
5e5f7c
+		}
5e5f7c
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
5e5f7c
+					CM_DBUS_PROP_TEMPLATE_MS_CERTIFICATE_TEMPLATE,
5e5f7c
+					verbose, globals.tctx);
5e5f7c
+		if (s1 != NULL && strlen(s1) > 0) {
5e5f7c
+			printf(_("\tms v2 template: %s\n"), s1);
5e5f7c
+		}
5e5f7c
+		s1 = query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
5e5f7c
+					CM_DBUS_PROP_TEMPLATE_ISSUER, verbose, globals.tctx);
5e5f7c
+		if (s1 != NULL && strlen(s1) > 0) {
5e5f7c
+			printf(_("\tissuer template: %s\n"), s1);
5e5f7c
+		}
5e5f7c
 		printf(_("\tpre-save command: %s\n"),
5e5f7c
 		       query_prop_s(bus, requests[i], CM_DBUS_REQUEST_INTERFACE,
5e5f7c
 				    CM_DBUS_PROP_CERT_PRESAVE_COMMAND, verbose, globals.tctx));
5e5f7c
diff --git a/tests/028-dbus/expected.out b/tests/028-dbus/expected.out
5e5f7c
index 1d8bec4..a25eb34 100644
5e5f7c
--- a/tests/028-dbus/expected.out
5e5f7c
+++ b/tests/028-dbus/expected.out
5e5f7c
@@ -15,6 +15,7 @@ Request ID 'Buddy':
5e5f7c
 	key usage: digitalSignature,dataEncipherment
5e5f7c
 	eku: id-kp-serverAuth
5e5f7c
 	certificate template/profile: SomeProfileName
5e5f7c
+	profile: SomeProfileName
5e5f7c
 	pre-save command: echo Pre
5e5f7c
 	post-save command: echo Post
5e5f7c
 	track: yes
5e5f7c
-- 
5e5f7c
2.21.1
5e5f7c