Certificate manager: Fix application crash for empty units

During upload/delete certificates certificate manager does
service restart/reload based on "unit" parameter provided
during build time. This is an optional input to support
service related action from certificate manager application.
In the existing delete interface not added any check related
to this and causing application crash due to empty unit
input systemd function.

Proposed fix is to add empty check before consuming unit variable.

Change-Id: I2b0b2bf1fab1db32a00c1c96333388be2af99cc7
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
1 file changed
tree: f4cd709f293a4582db205c6a3dd55a174b0c2d36
  1. test/
  2. .clang-format
  3. .gitignore
  4. argument.cpp
  5. argument.hpp
  6. bootstrap.sh
  7. certs_manager.cpp
  8. certs_manager.hpp
  9. configure.ac
  10. LICENSE
  11. mainapp.cpp
  12. MAINTAINERS
  13. Makefile.am
  14. README.md
README.md

phosphor-certificate-manager

Certificate management allows to replace the existing certificate and private key file with another (possibly CA signed) Certificate key file. Certificate management allows the user to install both the server and client certificates.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.