summaryrefslogtreecommitdiffstats
path: root/crtSignedContainer.sh
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2019-03-04 11:07:54 -0600
committerNick Bofferding <bofferdn@us.ibm.com>2019-03-04 11:07:54 -0600
commit2c46bcc027916101a9b6e5fc91d6d736e1d20107 (patch)
tree2a0efeac65859d6756b74203db36380099610b4f /crtSignedContainer.sh
parente30f6413b3e3e932d0bf2638c5668bd16cf8ce4d (diff)
downloadsb-signing-utils-2c46bcc027916101a9b6e5fc91d6d736e1d20107.tar.gz
sb-signing-utils-2c46bcc027916101a9b6e5fc91d6d736e1d20107.zip
Support setting software flags field in software header
- Adds support to specify --sw-flags in crtSignedContainer.sh
Diffstat (limited to 'crtSignedContainer.sh')
-rwxr-xr-xcrtSignedContainer.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/crtSignedContainer.sh b/crtSignedContainer.sh
index 082872e..025bbc0 100755
--- a/crtSignedContainer.sh
+++ b/crtSignedContainer.sh
@@ -39,6 +39,7 @@ usage () {
echo " -i, --out file to write containerized payload"
echo " -o, --code-start-offset code start offset for software header in hex"
echo " -f, --flags prefix header flags in hex"
+ echo " -F, --sw-flags prefix software header flags in hex"
echo " -m, --mode signing mode: local, independent or production"
echo " -k, --kms key management system for retrieving keys and signatures"
echo " (choices are \"signframework\" or \"pkcs11\")"
@@ -327,6 +328,7 @@ for arg in "$@"; do
"--swKeyQ") set -- "$@" "-q" ;;
"--swKeyR") set -- "$@" "-r" ;;
"--flags") set -- "$@" "-f" ;;
+ "--sw-flags") set -- "$@" "-F" ;;
"--code-start-offset") set -- "$@" "-o" ;;
"--protectedPayload") set -- "$@" "-l" ;;
"--out") set -- "$@" "-i" ;;
@@ -346,7 +348,7 @@ for arg in "$@"; do
done
# Process command-line arguments
-while getopts -- ?hdvw:a:b:c:p:q:r:f:o:l:i:m:k:s:L:4:5:6:7:89: opt
+while getopts -- ?hdvw:a:b:c:p:q:r:f:F:o:l:i:m:k:s:L:4:5:6:7:89: opt
do
case "${opt:?}" in
v) SB_VERBOSE="TRUE";;
@@ -359,6 +361,7 @@ do
q) SW_KEY_Q="$OPTARG";;
r) SW_KEY_R="$OPTARG";;
f) HW_FLAGS="$OPTARG";;
+ F) SW_FLAGS="$OPTARG";;
o) CS_OFFSET="$OPTARG";;
l) PAYLOAD="$OPTARG";;
i) OUTPUT="$OPTARG";;
@@ -566,6 +569,7 @@ test "$SB_VERBOSE" && DEBUG_ARGS=" -v"
test "$SB_DEBUG" && DEBUG_ARGS="$DEBUG_ARGS -d"
test "$SB_WRAP" && DEBUG_ARGS="$DEBUG_ARGS -w $SB_WRAP"
test "$HW_FLAGS" && ADDL_ARGS="$ADDL_ARGS --hw-flags $HW_FLAGS"
+test "$SW_FLAGS" && ADDL_ARGS="$ADDL_ARGS --sw-flags $SW_FLAGS"
test "$CS_OFFSET" && ADDL_ARGS="$ADDL_ARGS --sw-cs-offset $CS_OFFSET"
test "$LABEL" && ADDL_ARGS="$ADDL_ARGS --label $LABEL"
test "$SB_CONTR_HDR_OUT" && CONTR_HDR_OUT_OPT="--dumpContrHdr"
OpenPOWER on IntegriCloud