samples: pass --subject to swtpm_cert since certtool needs a subject

Certtool seems to not verify a certificate chain properly unless
the certificate has a distinguished name.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2017-12-21 21:14:48 -05:00
parent a8bc74fd01
commit 5ceed802cc

View File

@ -142,6 +142,12 @@ create_cert() {
options=$(cat ${LOCALCA_OPTIONS})
fi
if [ -n "$vmid" ]; then
options="$options --subject \"CN=$vmid\""
else
options="$options --subject \"CN=unknown\""
fi
case "$typ" in
ek)
if [ -z "$(type -p swtpm_cert)" ]; then