diff --git a/README.md b/README.md index bdce064..472b84d 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,23 @@ Show help : shellpki help ~~~ +## Loop + +We can loop over a file to revoke or create many certificates at once. + +To revoke : + +~~~ +$ read CA_PASS +$ for cert_name in $(cat /path/to/file_certs_to_revoke); do CA_PASSWORD=$CA_PASS shellpki revoke $cert_name --non-interactive ; done +~~~ + +To create (without `--replace-existing`) or renew (with `--replace-existing`), with a password on the client key : + +~~~ +$ for cert_name in $(cat /path/to/file_certs_to_create); do apg -n 1 -m 16 -M lcN > /path/to/folder/to/store/${cert_name}.passwd; CA_PASSWORD=$CA_PASS shellpki create --replace-existing --non-interactive --password-file /path/to/folder/to/store/${cert_name}.passwd ${cert_name}; done +~~~ + ## License ShellPKI is an [Evolix](https://evolix.com) project and is licensed