From Fedora Project Wiki
Description
certmonger is a service that monitors and renews certificates. It can also be used to request new certificates. This test case ensures that the certmonger
service is functional and can request, track, and renew certificates.
Setup
- Install the
certmonger
package:sudo dnf install certmonger
. - Ensure you have a Certificate Authority (CA) configured or available to issue a test certificate.
How to test
- Start the
certmonger
service:sudo systemctl start certmonger
. - Check the status of the service to ensure it's running:
sudo systemctl status certmonger
. - Use
getcert
to request a new certificate. For a simple self-signed certificate:sudo getcert request -f /tmp/test.pem -k /tmp/test-key.pem -c local -N CN=my.test.server
. - Verify the certificate and key files exist at
/tmp/test.pem
and/tmp/test-key.pem
.
Expected Results
- The
certmonger
service starts without any errors. - The service status indicates that
certmonger
is active and running. - A new self-signed certificate is generated, and the certificate and key files are present at the specified paths.
- The content of the certificate (viewable with
openssl x509 -in /tmp/test.pem -text -noout
) should reflect the specified details, such as the Common Name (CN).
Optional
For advanced testing:
- Set up a full CA (like Dogtag or FreeIPA) and request certificates from it.
- Try renewing certificates using
certmonger
. - Monitor expiration and ensure
certmonger
auto-renews or sends appropriate alerts for nearly expired certificates.