delete_ca_based_cert
This script will delete a private key and a certificate from a certificate authority; the key.pem
and cert.pem
files will also be deleted.
The following parameters are optional:
c
-
the common name (
localhost
if not given) of the certificate d
-
the directory (
$PWD
if not given) containing the key and certificate; the directory will be also deleted if empty and not$PWD
Chrome, Docker, Firefox, and Safari need no further configuration. |
Ensure that the certificate authority has been created and a private key and certificate have been created before executing this script. |
This script will not delete additional copies, i.e., only the private key and certificate in the given directory ( |
Copy the script into your Node.js project and add it as a custom script to your package.json
|
Usage
$ scripts/cert/delete_ca_based_cert.sh
$ scripts/cert/delete_ca_based_cert.sh -d ~/.local/secrets/certs/localhost
$ scripts/cert/delete_ca_based_cert.sh -d ~/.local/secrets/certs/https.internal -c https.internal