Ability to update CA in Admin manager
This is part of the user experience improvements for the Certificate Authority manipulation in Admin manager. In the latest version, a new mechanism was added to upload either a file with passwords and alias, or a certificate content with passwords and alias.
The view is the same as the one for displaying a certificate, with Action button that will provide a more detailed view. In the right side menu there is a “Regenerate Default Certificate” that serves as a GUI controller to switch the “is_admin_initialize” parameter to “false” (from “system_status”) in order to recreate the default admin.
For the upload part, the content of the certificate, password and alias are needed. First the input is validated, then if all ok, it can be saved.
When the certificate is saved, the Admin will be restarted.
The data is saved in the config.json → ca fields and in the truststore.json
For this functionality to work correctly, we need to have a alias set. This can be achieved with:
openssl pkcs12 -export -in my-cert.crt -inkey my-priv-key.key -certfile my-ca-bundle -out my-pfx.pfx -name "alias"