Update README : how to create or revoke many certificates at once

This commit is contained in:
Jérémy Dubois 2022-08-09 15:48:20 +02:00
parent 5f792272c6
commit e886ca9549

View file

@ -137,6 +137,24 @@ 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 :
~~~
$ read CA_PASS
$ 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