summaryrefslogtreecommitdiffstats
path: root/crtSignedContainer.sh
Commit message (Collapse)AuthorAgeFilesLines
* Support setting software flags field in software headerNick Bofferding2019-03-041-1/+5
| | | | - Adds support to specify --sw-flags in crtSignedContainer.sh
* Revert: Change cmdline options --hwPrivKeyX to --hwKeyX (part 2)Dave Heller2018-09-201-0/+6
| | | | | | | | | | | This change is dependent on the related change to genPnorImages.pl in Hostboot, and although it's changed upstream, there are still active op-build machine configs that are locked to an older version. So it's unclear when this change can be finalized. For now I'm going to punt and allow the old cmdline options to still work, and continue to support both the new and deprecated cmdline options. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Sanitize boolean valuesDave Heller2018-09-021-1/+21
| | | | | | | | Make sure the value of any boolean configuration property is set to an acceptable string (True), or an empty string (False). This is safer and more robust. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Change cmdline options --hwPrivKeyX to --hwKeyX (part 2)Dave Heller2018-08-281-6/+0
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Make SB_KEEP_CACHE=false by defaultDave Heller2018-08-281-1/+1
| | | | | | | | It makes sense to do this for environments outside of op-build. Under op-build it's helpful to keep cache by default, so now will set it explicitly under op-build. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Quash unnecessary messages to stdout from previous patchDave Heller2018-08-271-2/+2
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Support multiple KMS in Production modeDave Heller2018-08-181-43/+136
| | | | | | | | | | This adds support for PKCS11 as an alternate key management system in place of signframework, and adds the configuation property SB_KMS and a new command line option --kms to select between them. If unset the default is "signframework". If set to "pkcs11" two additional configuration properties, specifying the token name and the shared library implementing the token, are recognized. These properties are set by environment, or via the INI under a new section [pkcs11].
* Support inter-mode import (part 2)Dave Heller2018-07-051-104/+173
| | | | | | | | | This completes support for the the case where HW key signing is done standalone in Local or Independent mode, and the signatures are imported into Production mode. It also adds support for the opposite case, where HW key siging is done in Production mode and artifacts are imported and exported to FW key signing in Local mode. Refactors most of the keyfinder/sigfinder code in crtSignedContainer.sh.
* Support inter-mode importDave Heller2018-06-191-54/+125
| | | | | | | | | | | Supports the case where HW key signing is done standalone in Local or Independent mode, and the signatures are imported into Production mode. The use of "signing project" names, used previously in Production only, is now extended to Local or Independent mode. The HW key signer may set a "hw_signing_project_basename". If set, the export will be prepared for import to a Production mode process where the same project basename is in use. On import, signtool will pick up the artifacts generated by this basename.
* Don't reuse FW keys sigs for transition containersDave Heller2018-04-241-4/+11
| | | | because SBKT and SBKTRAND are regenerated on each run
* Don't use cp -T option in shell scriptsDave Heller2018-04-171-1/+2
| | | | | | | because AIX doesn't like it. In this case, can get the same result by just deleting the destination directory first. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Cleanup scratch container fileDave Heller2018-04-161-0/+7
| | | | | | | | If no --out is provide we use a scratch file for output container. But there is no reason to keep this; if the user wants a persistent file he can specify --out. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Support config properties specific to key transitionDave Heller2018-03-311-0/+14
| | | | | | | | This adds config properties SB_VERIFY_TRANS and SB_PROJECT_INI_TRANS. If set, these take precedence over their non-_TRANS counterparts for the transistion 'to' container only (SBKTRAND). Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Quash a few more shellcheck warningsDave Heller2018-03-311-6/+6
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Remove unused code to read properties directly from _defconfigDave Heller2018-03-311-15/+0
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Minor shell adjustment to make crtSignedContainer.sh work on AIXDave Heller2018-02-091-3/+2
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Fix cache cleanup when archive import is usedDave Heller2018-01-281-9/+2
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Move required program check below option processingDave Heller2018-01-201-7/+7
| | | | | | as to not interfere with the operation of help or usage. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Remove dependence on 'xxd' (part 2)Dave Heller2018-01-201-3/+2
| | | | | | | | This patch removes the second dependency in crtSignedContainer.sh, in the generation of the payload hash, in Production mode. Now the .md files are generated by create-container instead. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Remove dependence on 'xxd' (part 1)Dave Heller2018-01-201-2/+5
| | | | | | | | There is no 'xxd' command in AIX. This patch removes one of the two dependencies in crtSignedContainer.sh: in the is_key_raw() function. This is now done with a shell comparison instead. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Merge pull request #19 from hellerda/add-get_date_stringhellerda2018-01-111-2/+14
|\ | | | | Add get_date_string() function to crtSignedContainer.sh
| * Add get_date_string() function to crtSignedContainer.shDave Heller2017-12-281-2/+14
| | | | | | | | | | | | | | On some systems (AIX) the date command does not support the '-d' option and there is no facility to convert numeric time to presentation format. The new function uses Perl as a fallback in this case. Thanks to Matt Vaught (mtvaught-ibm) for the suggestion.
* | Adjust sig finding behavior in indpendent modeDave Heller2018-01-101-8/+29
|/ | | | | | | | In indpendent mode, there are cases where we want to look for signatures elsewhere in the cache, if not found in the local cache, that were not covered previously. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Add basic support for independent signing modeDave Heller2017-12-271-10/+16
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Nonzero value is the default test operationDave Heller2017-12-271-40/+40
| | | | | | | | Test for nonzero value is the default test operation in shell, so it's not necessary to use -n explicitly in tests. Removing them makes the code a bit more compact. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Check return code from executables and fail on errorDave Heller2017-12-211-4/+22
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Simplify checkKeys() and remove unused codeDave Heller2017-12-211-38/+22
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Allow input payload and output image file to be omittedDave Heller2017-12-171-11/+10
| | | | | | | | | | In cases where input payload or output imagefile are not needed, we previously required __none to be specified for these properties. But really they can be omitted, and we can treat it as if __none were specified. Also, fix a shellcheck warning from a previous commit. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Check availability of required programs before executionDave Heller2017-12-151-0/+13
| | | | | | | | Add a simple check to crtSignedContainer.sh to make sure basic tools, openssl commands, and other signtool and signframework executables are found in PATH, before proceeding. Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Fix some shellcheck warningsDave Heller2017-12-151-44/+55
| | | | | | | Fix some warnings from shellcheck static analyzer tool, in crtSignedContainer.sh, mostly regarding double-quoting Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Fix relative path handling for --archiveInDave Heller2017-12-081-4/+12
| | | | Signed-off-by: Dave Heller <hellerda@linux.vnet.ibm.com>
* Make SB_VERBOSE, SB_DEBUG, SB_WRAP settable by environmentDave Heller2017-10-291-11/+8
| | | | | | Helpful for execution under op-build, where command line options are not exposed. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Use eval instead of declare in bashDave Heller2017-10-181-1/+1
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Fix behavior of __getkeyDave Heller2017-10-131-2/+2
| | | | | | | On __getkey, the behavior should be to integrate a signature if found, but skip the request if not found. Currently it skips both. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Fix careless setting of IFSDave Heller2017-10-131-0/+1
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Support comma delimted list for --archiveInDave Heller2017-10-111-8/+16
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Change cmdline options --hwPrivKeyX to --hwKeyX (part 1)Dave Heller2017-10-101-6/+12
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Merge pull request #11 from hellerda/container-header-outhellerda2017-10-101-8/+17
|\ | | | | Add --contrHdrOut option to crtSignedContainer.sh
| * Add --contrHdrOut option to crtSignedContainer.shDave Heller2017-10-081-8/+17
| | | | | | | | Adds option to dump the container header (first 4k) without the payload.
* | Merge pull request #10 from hellerda/make-signproject-names-configurablehellerda2017-10-101-16/+33
|\ \ | |/ |/| Make signproject base names configurable via env or INI
| * Make signproject base names configurable via env or INIDave Heller2017-10-061-16/+33
| | | | | | | | | | | | | | | | | | | | This patch allows signframework project basenames to be settable via env or INI. There are three new env properties: SF_HW_SIGNING_PROJECT_BASE, SF_FW_SIGNING_PROJECT_BASE and SF_GETPUBKEY_PROJECT_BASE. In the INI, there are three new properties under a new section [signproject]. The defaults are the values that were previously hardcoded. Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* | Fixup previous commitDave Heller2017-10-071-2/+1
| | | | | | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* | Allow input payload and output image file to be emptyDave Heller2017-10-061-1/+12
|/ | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Add --archiveIn and --archiveOut options to crtSignedContainer.shDave Heller2017-09-301-3/+97
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Fix handling of filepaths containing spacesDave Heller2017-09-291-44/+50
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Support special input key value: __getsigDave Heller2017-09-291-2/+4
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Support special input key values: __skip, __get, __getkeyDave Heller2017-09-231-21/+114
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Make --scratchDir a configurable optionDave Heller2017-09-211-10/+15
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Simplify config property processingDave Heller2017-09-191-66/+75
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
* Add INI file supportDave Heller2017-09-071-27/+89
| | | | Signed-off-by: Dave Heller <hellerda@us.ibm.com>
OpenPOWER on IntegriCloud