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

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