copy_ca_root_cert
This script will copy the root certificate ca.crt
of the certificate authority to the given directory ($PWD
if not given).
The given directory will be created if it does not exit yet.
Ensure that the certificate authority has been created. |
If the given directory is inside a Git working tree the script will offer to modify the .gitignore file:
Related Script: git-cleanup |
Usage
$ scripts/cert/copy_ca_root_cert.sh
$ scripts/cert/copy_ca_root_cert.sh ~/.local/secrets/certs/ca-root
$ stat -f '%A %N' ~/.local/secrets/certs/ca-root/ca.crt
600 /Users/example/.local/secrets/certs/ca-root/ca.crt
$ openssl x509 -issuer -noout -in ~/.local/secrets/certs/ca-root/ca.crt
issuer=CN=Easy-RSA CA (2024-08-05, example-host)