History log of /openbmc/phosphor-certificate-manager/mainapp.cpp (Results 1 – 13 of 13)
Revision Date Author Comments
# 1c1497a5 24-Nov-2024 Jayanth Othayoth <ojayanth@gmail.com>

clang-tidy: Enable bugprone-narrowing-conversions

Modified code to address issues flagged by this check.

Tested: Build and unit tests passed successfully.

Change-Id: I17111e3f00ad0dbf5d0d72d5ccd37

clang-tidy: Enable bugprone-narrowing-conversions

Modified code to address issues flagged by this check.

Tested: Build and unit tests passed successfully.

Change-Id: I17111e3f00ad0dbf5d0d72d5ccd374367e4cca36
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>

show more ...


# 223e4604 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ie4138afe359d52b9f1a32fdff6890a90dd31efa8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# b3dbfb37 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9bb7b9a430d029ddaf2a08ea26acb775b9b2b152

show more ...


# 7047be67 10-Mar-2022 Nan Zhou <nanzhoumails@gmail.com>

argument parser: use CLI11 and add unit tests

CLI11 is one of the most commonly use argument parser in OpenBMC. It can
save ~150 lines of codes in this project.

We are hitting argument related bugs

argument parser: use CLI11 and add unit tests

CLI11 is one of the most commonly use argument parser in OpenBMC. It can
save ~150 lines of codes in this project.

We are hitting argument related bugs that not covered in unit tests.
This test adds a test for argument parsing.

Tested: QEMU IPMI/Redfish worked.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ib409c7e6a82ad31049f2da3e32727ebdf185f0fc

show more ...


# 454643d7 03-Mar-2022 Nan Zhou <nanzhoumails@gmail.com>

mainapp: fix typo in the "type" string key

The SRCREV bump change failed.
https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/50836

Tested:
The QEMU Robot test worked.

Signed-off-by: Nan Zhou <

mainapp: fix typo in the "type" string key

The SRCREV bump change failed.
https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/50836

Tested:
The QEMU Robot test worked.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ic378ebf87c0cbaf220e413f9245d6d4c0fb7a926

show more ...


# 014be0bf 28-Dec-2021 Nan Zhou <nanzhoumails@gmail.com>

iwyu

This changes uses its best effort to clean up headers according to iwyu.

Reference:
https://include-what-you-use.org/

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ibd8bd8735238

iwyu

This changes uses its best effort to clean up headers according to iwyu.

Reference:
https://include-what-you-use.org/

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ibd8bd8735238d6ec101a2428241bb1727e3ac9a9

show more ...


# cf06ccdc 28-Dec-2021 Nan Zhou <nanzhoumails@gmail.com>

clean up using directives and type alias

Most C++ style guides try to avoid using directives in headers and also
suggest using type alias carefully, according to which, this change does
the followin

clean up using directives and type alias

Most C++ style guides try to avoid using directives in headers and also
suggest using type alias carefully, according to which, this change does
the following clean up:

1. used Enum class to represent Certificate type
2. removed all using directives: e.g. the phosphor logging namespace;
instead, this change uses using declarations
3. removed unnecessary type alias; in existing codes, we only support
strings as types of UnitToRestart, InstallPath, UploadPath, etc; this
change uses std::string directly
4. moved all alias outside any class scope into source files or an
internal namespace
5. renamed types, constants, classes as per OpenBMC style guide
6. fixed all compilation errors and some warnings after the refactoring;
built with both Clang & GCC

Reference:
https://docs.microsoft.com/en-us/cpp/cpp/header-files-cpp?view=msvc-170#what-to-put-in-a-header-file
https://google.github.io/styleguide/cppguide.html#Namespaces

Tested:
Unit tests

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I58e026934a4e969f4d8877801c8f3c671990468a

show more ...


# 718eef37 28-Dec-2021 Nan Zhou <nanzhoumails@gmail.com>

config.h.in: use const variables instead of macros

Most style guides try to avoid preprocessor macros, especially the use
case here: const objects. This change replaced them with const
variables. Th

config.h.in: use const variables instead of macros

Most style guides try to avoid preprocessor macros, especially the use
case here: const objects. This change replaced them with const
variables. Their names are also changed according to the OpenBMC style
guide.

Reference:
https://google.github.io/styleguide/cppguide.html#Preprocessor_Macros

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I0786c7c83f3a0d892c14f1cb813d0aa16d627b3e

show more ...


# f4682712 19-Mar-2019 Marri Devender Rao <devenrao@in.ibm.com>

Add Generate Key and Certificate Signing Request (CSR)

Generates Private key and CSR file, at present supporing
only RSA algorithm type.

-The generateCSR method defined in Create interface is imple

Add Generate Key and Certificate Signing Request (CSR)

Generates Private key and CSR file, at present supporing
only RSA algorithm type.

-The generateCSR method defined in Create interface is implemented
by manager class to Create CSR and PrivateKey files.

-The cSR method defined in View interface is implemented by CSR
class to view CSR file.

- Generate CSR is time consuming operation and it might time-out
the D-Bus call. Forking process and performing CSR generation in
the child process, adding the process ID of the child process to the
SD Event loop so that callback is received when the chid process
is done with the CSR generation.

- As the GenerateCSR method returns immediately, caller need
to wait on InterfacesAdded signal that is generated after completion
of the CSR request. The caller then invokes cSR method of
CSR interface to read the CSR.

- For any failure in Generate CSR CSR object is created with error
status.

- CSR object raises exception if error is set else CSR data is
returned to the caller.

- To cater for failure cases caller need to start a timer, which
will be terminated after getting InterfaceAdded signal or upon timeout.

-Added Unit tests.
Tested:
1) Added unit tests to verify CSR generation
2) Tested with Redfish to generate and view CSR
curl -c cjar -b cjar -k -H "X-Auth-Token: $bmc_token" -X POST
https://${bmc}/redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR/
-d @generate.jon

{
"CSRString": "-----BEGIN CERTIFICATE REQUEST---7E=\n-----END CERTIFICATE
REQUEST-----\n",
"CertificateCollection": {
"@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/"
}
}
Change-Id: I1e3ae8df45f87bfd8903f552d93c4df1af7c569f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>

show more ...


# 6ceec40b 01-Feb-2019 Marri Devender Rao <devenrao@in.ibm.com>

Refactor code for uploading different types of certificates

Introduced new Certificate class that caters for a certificate
upload and certificate replace.

As part of refactoring moved the validatio

Refactor code for uploading different types of certificates

Introduced new Certificate class that caters for a certificate
upload and certificate replace.

As part of refactoring moved the validation of certificate
from Manager class to Certificate class so that the logic
can be used both for replacing of an existing certificate
and also for certificate upload.

Disabling test cases as complete functionality is not
available in the patches due to refactoring

Change-Id: Ia51db8cc81881a1c3c63dd2ca1c6f16a8d52a13f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>

show more ...


# b50789ce 09-Oct-2018 Jayanth Othayoth <ojayanth@in.ibm.com>

Add support to upload CA certificate

Added support to upload CA certificates in
/etc/ssl/certs path. Curently scope is limited to one
certificate and any new upload is going to override the
existing

Add support to upload CA certificate

Added support to upload CA certificates in
/etc/ssl/certs path. Curently scope is limited to one
certificate and any new upload is going to override the
existing CA certificate.

Change-Id: I9cc60accf6aae4d8123e5f86d618effe33d68d53
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...


# cfbc8dc8 03-Sep-2018 Jayanth Othayoth <ojayanth@in.ibm.com>

Implementation of certificate install interface

- Copy the certificate and private Key file to the service
specific path based on a configuration file.

- Reload the listed service for which the c

Implementation of certificate install interface

- Copy the certificate and private Key file to the service
specific path based on a configuration file.

- Reload the listed service for which the certificate is
updated.

Change-Id: Iae7d340a0a2381502aef33762eb79b57ddeda07d
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...


# 0aa0d114 03-Sep-2018 Jayanth Othayoth <ojayanth@in.ibm.com>

Initial commit for phosphor certificate manager

Certificate management application allows to replace the
existing certificate and private key file with another
(possibly CA signed Certificate and pr

Initial commit for phosphor certificate manager

Certificate management application allows to replace the
existing certificate and private key file with another
(possibly CA signed Certificate and private key file.

Change-Id: I1129cc92ca4aae5f84cb304dda9073cc74781009
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...