1c8781ff | 26-Aug-2021 |
George Liu <liuxiwei@inspur.com> |
utest: Fix test case SignatureTest.TestSignatureVerify()
The unit test case SignatureTest.TestSignatureVerify() passes with default config. But when `verify-full-signature` is enabled, the test case
utest: Fix test case SignatureTest.TestSignatureVerify()
The unit test case SignatureTest.TestSignatureVerify() passes with default config. But when `verify-full-signature` is enabled, the test case fails.
resolved: openbmc/phosphor-bmc-code-mgmt#9
Tested: Unit Test successfully when `verify-full-signature` is enabled.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ia600690ea26ca3559f1e9f2049283880ddf95a4d
show more ...
|
1fd6dddf | 05-Jan-2021 |
Chanh Nguyen <chanh@amperemail.onmicrosoft.com> |
Implement Software.Extended Version
- Populate the ExtendedVersion object from MANIFEST - Create an ExtendedVersion object
Change-Id: I13e352d4cb8f4a73259a940f341a736fe7e9305f Signed-off-by: Chanh
Implement Software.Extended Version
- Populate the ExtendedVersion object from MANIFEST - Create an ExtendedVersion object
Change-Id: I13e352d4cb8f4a73259a940f341a736fe7e9305f Signed-off-by: Chanh Nguyen <chanh@amperemail.onmicrosoft.com>
show more ...
|
8a5ccbb5 | 20-Jan-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
utils: Add execute command
As issue openbmc/phosphor-bmc-code-mgmt#6 describes, the code makes use of the systemd services to execute commands via a script, but calls to systemd service files are as
utils: Add execute command
As issue openbmc/phosphor-bmc-code-mgmt#6 describes, the code makes use of the systemd services to execute commands via a script, but calls to systemd service files are async, so if there is a need to wait for the service to finish executing, workarounds like sleep commands have been added to the code, ex: https://github.com/openbmc/phosphor-bmc-code-mgmt/commit/60f5ccfd5ab0fc8cedc3a2bf5f5adcab77318b7d
Create a function that would execute a command in a child process so that it's possible to wait for it to finish. In addition, errors can be more obvious by checking the return of the execute function and taking action to notify the caller of the error instead of relying on system unit dependencies to run recovery actions on error.
Tested: Called new execute function from the code and verified it was successful. Ex: utils::execute("/bin/mkdir", "/tmp/test-execute");
Change-Id: I81a6aa0a50276abb6aba40196a214629ec9baa13 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
0a06e97f | 16-Dec-2020 |
George Liu <liuxiwei@inspur.com> |
Add support for tarball contents signature
Currently only supported to allow optional image files in BMC tarball. In order to ensure that the contents of the tarball are the expected ones as a full
Add support for tarball contents signature
Currently only supported to allow optional image files in BMC tarball. In order to ensure that the contents of the tarball are the expected ones as a full package, an additional signature file has been created for all the signature files in the tarball, (ex: image-full.sig = hash(file1.sig + file2.sig + file3.sig...)). Need to check the existence of the file and the signature verification passed.
Also, added unit test case for the mergeFiles method.
Tested: Enable `WANT_SIGNATURE_FULL_VERIFY` and ran the following command:
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T obmc-phosphor-image-fp5280g2.static.mtd.tar
https://${bmc}/redfish/v1/UpdateService { "@odata.id": "/redfish/v1/TaskService/Tasks/1", "@odata.type": "#Task.v1_4_3.Task", "Id": "1", "TaskState": "Running", "TaskStatus": "OK" }
And Log output: `Successfully completed Signature vaildation.`
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0e658b9dd90ea405a9c8292f29183ab516a0fa31
show more ...
|
5a43b373 | 06-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
meson: build: Remove automake files and update READMEs
Tested: Ran CI and code update on witherspoon.
Change-Id: I4d9695cdddf48e4a4d884fb9b8e30108ee6dfe6c Signed-off-by: Adriana Kobylak <anoo@us.ib
meson: build: Remove automake files and update READMEs
Tested: Ran CI and code update on witherspoon.
Change-Id: I4d9695cdddf48e4a4d884fb9b8e30108ee6dfe6c Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
c98d912e | 05-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
Use std::filesystem instead of std::experimental
std::filesystem is fully supported in c++17, no need to keep the experimental around anymore.
Note that the path append behavior changed, so appendi
Use std::filesystem instead of std::experimental
std::filesystem is fully supported in c++17, no need to keep the experimental around anymore.
Note that the path append behavior changed, so appending an absolute path replaces the path instead of appending, therefore need to use .relative_path().
Tested: Did a code update on witherspoon and verified the sync path was correct.
Change-Id: Iffe42cf0ebd5537920c8fdbf9edcec640ab9c724 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
292159f4 | 05-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
meson: Fix compile errors
Meson runs stricter compiler checks. Fix the following errors in preparation to moving to meson:
- Unusued parameters. Ex: ../download_manager_main.cpp:7:14: error: unused
meson: Fix compile errors
Meson runs stricter compiler checks. Fix the following errors in preparation to moving to meson:
- Unusued parameters. Ex: ../download_manager_main.cpp:7:14: error: unused parameter ‘argc’ [-Werror=unused-parameter] ../static/item_updater_helper.cpp:16:42: error: unused parameter ‘entryId’ [-Werror=unused-parameter] ../watch.cpp:77:38: error: unused parameter ‘s’ [-Werror=unused-parameter] [test/utest.cpp:166]: (style) Variable 'pubKeyConfFile' is assigned a value that is never used.
- Add destructor and initialize variable in init list: ../flash.hpp:18:7: error: ‘class phosphor::software::updater::Flash’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] [version.hpp:81]: callback is assigned in constructor body. Consider performing initialization in initialization list
Tested: Verified code update on witherspoon still worked.
Change-Id: Ib7a0e0e11d6bfe6eeeb3f2ea4bfefd43505d639e Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
2a3d9f5c | 06-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
version: getBMCVersion: Support value without quotes
Yocto upstream has removed the quotes from the VERSION_ID value in os-release[1]. Update getBMCVersion() to support unquoted values.
[1]: http:/
version: getBMCVersion: Support value without quotes
Yocto upstream has removed the quotes from the VERSION_ID value in os-release[1]. Update getBMCVersion() to support unquoted values.
[1]: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4d98363d59cd422b6357148bc0862256ca2076cb
Closes openbmc/phosphor-bmc-code-mgmt#4
Tested: Added unit test cases and verified on a witherspoon with and without quotes.
Change-Id: I904a90a611e43722955fb31b1a4b673b1e6e725f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
5a7363b4 | 18-Oct-2019 |
Lei YU <mine260309@gmail.com> |
Version: support CRLF line feed in MANIFEST
When a MANIFEST is generated from Windows and it contains CRLF as line feed, the code was getting each line with '\r' at the end, and thus the parsed stri
Version: support CRLF line feed in MANIFEST
When a MANIFEST is generated from Windows and it contains CRLF as line feed, the code was getting each line with '\r' at the end, and thus the parsed string contains '\r' and it incorrectly parses the string.
Add a piece of code to support CRLF line feed so support such MANIFEST files.
Tested: Update the unit test case to verify CRLF is correctly handled.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I872bb59dbde5647e833f5c335357a3f6ae0765a5
show more ...
|
b0ce996a | 07-Sep-2018 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: Update to match docs repo
Update the .clang-format file. Now includes header sorting and updating PointerAlignment.
Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054 Signed-off-by:
clang-format: Update to match docs repo
Update the .clang-format file. Now includes header sorting and updating PointerAlignment.
Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
1be8d500 | 19-Jun-2018 |
Lei YU <mine260309@gmail.com> |
Refactor of bmcImages
bmcImages were in image_verify.hpp but it is used not only in image verification, but elsewhere.
Move it into a more generic header file, images.hpp, so it makes more clear th
Refactor of bmcImages
bmcImages were in image_verify.hpp but it is used not only in image verification, but elsewhere.
Move it into a more generic header file, images.hpp, so it makes more clear that users of bmcImages include images.hpp instead of image_verify.hpp
Tested: Verify the code pass the build.
Change-Id: If9adf315eee9047d9d08ab93ed7c0ff3c97f7a1e Signed-off-by: Lei YU <mine260309@gmail.com>
show more ...
|
2bcba02a | 08-Apr-2018 |
Gunnar Mills <gmills@us.ibm.com> |
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I2ca3f
Spelling fixes
Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2.
Change-Id: I2ca3fd16d7cc84fdce63089b47fefb8f128894fd Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
6be275ba | 27-Feb-2018 |
Jayanth Othayoth <ojayanth@in.ibm.com> |
Add unit tests for testing Signature verification functionality
Resolves openbmc/openbmc#2838
Change-Id: I60b5ca418551d404d29646fd729311adbe81290c Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.c
Add unit tests for testing Signature verification functionality
Resolves openbmc/openbmc#2838
Change-Id: I60b5ca418551d404d29646fd729311adbe81290c Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
show more ...
|
2285fe0f | 27-Feb-2018 |
Adriana Kobylak <anoo@us.ibm.com> |
Enable clang code format
Change-Id: Ia899858c11cff6e4fa26b820b35b1e5dca1b57df Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> |
26a960d0 | 19-Sep-2017 |
Saqib Khan <khansa@us.ibm.com> |
Use sha512 to calculate the versionID for images.
- We needed a hash algorithm that can be replicated on multiple platforms and across multiple programming languages. - This would allow the user t
Use sha512 to calculate the versionID for images.
- We needed a hash algorithm that can be replicated on multiple platforms and across multiple programming languages. - This would allow the user to calculate the versionID by executing the following command to obtain correct versionID. echo -n "<versionID>" | sha512sum | cut -b 1-8 - This is part of the change required for openbmc/openbmc#2323
Change-Id: Ibc96a2871f07cb549c482c06dec7090e6ba3a766 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
show more ...
|
ba239881 | 26-May-2017 |
Saqib Khan <khansa@us.ibm.com> |
Move Active BMC version object to item_updater.
- There needs to be only one version class for both BMC and PNOR images. Thus removing the BMCVERSION class and moving the functionality to MANAGE
Move Active BMC version object to item_updater.
- There needs to be only one version class for both BMC and PNOR images. Thus removing the BMCVERSION class and moving the functionality to MANAGER class.
Change-Id: I6dda818960588cfd9ed345fe93068531efc7a877 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
show more ...
|
01d55c33 | 20-Apr-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Move version gtests to phosphor-bmc-code-mgmt
Moving the version gtests from openpower-pnor-code-mgmt to phosphor-bmc-code-mgmt. This code has been reviewed before, the only changes are renaming to
Move version gtests to phosphor-bmc-code-mgmt
Moving the version gtests from openpower-pnor-code-mgmt to phosphor-bmc-code-mgmt. This code has been reviewed before, the only changes are renaming to "namespace phosphor", changes related to renaming the files, and changes related to renaming function getVersion to getValue.
Change-Id: Id799fcfff8effbb4c63f1f4e7169aa425567dd41 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|