check_hostkeydoc: Move check_hostkeydoc to scripts & deprecation warning

Move the check_hostkeydoc script to scripts. This eliminates the last file
in the genprotimg directory. Additionally, add a deprecation warning to
that script. Every pv tool can verify the chain itself using the pv
library.

Acked-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2025-06-03 15:37:06 +02:00
parent 619c466275
commit bfc9854eb5
3 changed files with 11 additions and 4 deletions

View File

@@ -86,7 +86,6 @@ install: $(INSTALL_TARGETS)
$(INSTALL) -d -m 755 $(DESTDIR)$(USRBINDIR)
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 pvattest/tools/pvextract-hdr $(DESTDIR)$(USRBINDIR)
$(INSTALL) -d -m 755 $(DESTDIR)$(PVIMG_PKGDATADIR)
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 pvimg/tools/check_hostkeydoc $(DESTDIR)$(PVIMG_PKGDATADIR)
$(MAKE) -C pvimg/boot install
ln -sf pvimg $(DESTDIR)$(USRBINDIR)/genprotimg

View File

@@ -1 +0,0 @@
../../../genprotimg/samples/check_hostkeydoc

View File

@@ -53,8 +53,13 @@ usage()
cat <<-EOF
Usage: $(basename "$1") [-d] [-c CA-cert] [-r CRL] host-key-doc signing-key-cert
Verify an IBM Secure Execution host key document against
a signing key.
Verify an IBM Secure Execution host key document against a signing key. Use for
resolving issues only. Use the built-in functions from pvimg, pvsecret, or
pvattest directly to verify the host-key documents. This script should only be
used as a last resort for when the distribution provided binaries have
unresolved issues regarding the host-key verification. In that case ensure the
latest version of this script is used.
Find the latest version here https://github.com/ibm-s390-linux/s390-tools
Options:
-d disable default issuer check of host-key-doc
@@ -297,6 +302,10 @@ fi
HKD_FILE=$1
HKSK_FILE=$2
printf "DEPRECATED SCRIPT. Use pvimg, pvattest, or pvsecret directly.\n"
printf "This script is intended for resolving issues only.\n"
printf "This script may be inaccessible in the future.\n"
# Check whether all specified files exist
check_file "$HKD_FILE"
check_file "$HKSK_FILE"