swtpm_setup: Write active_pcr_banks into swtpm_setup.conf

Write the active_pcr_banks into swtpm_setup.conf with the default
PCR banks from the configure script.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2021-10-28 13:04:24 -04:00 committed by Stefan Berger
parent a5cc0bf6e2
commit 30fa8b47d2
2 changed files with 7 additions and 2 deletions

View File

@ -2,3 +2,5 @@
create_certs_tool= @BINDIR@/swtpm_localca
create_certs_tool_config = @SYSCONFDIR@/swtpm-localca.conf
create_certs_tool_options = @SYSCONFDIR@/swtpm-localca.options
# Comma-separated list (no spaces) of PCR banks to activate by default
active_pcr_banks = @DEFAULT_PCR_BANKS@

View File

@ -134,10 +134,13 @@ int create_config_files(gboolean overwrite, gboolean root_flag,
filedata[SWTPM_SETUP_CONF] = g_strdup_printf(
"create_certs_tool = %s\n"
"create_certs_tool_config = %s\n"
"create_certs_tool_options = %s\n",
"create_certs_tool_options = %s\n"
"# Comma-separated list (no spaces) of PCR banks to activate by default\n"
"active_pcr_banks = %s\n",
create_certs_tool,
configfiles[SWTPM_LOCALCA_CONF],
configfiles[SWTPM_LOCALCA_OPTIONS]
configfiles[SWTPM_LOCALCA_OPTIONS],
DEFAULT_PCR_BANKS
);
/* swtpm-localca.conf */