diff --git a/HowtoShellpki.md b/HowtoShellpki.md index 2aa174a6..fc963062 100644 --- a/HowtoShellpki.md +++ b/HowtoShellpki.md @@ -1,63 +1,17 @@ --- -categories: vpn sysadmin security network +categories: vpn openvpn security network title: Howto shellpki ... -**Déprécié. Voir le README du projet maintenu sur Gitea : [https://gitea.evolix.org/evolix/shellpki]()** - -[shellpki](https://forge.evolix.org/projects/shellpki/repository) est un script Shell pour gérer une petite [PKI](https://fr.wikipedia.org/wiki/Infrastructure_%C3%A0_cl%C3%A9s_publiques) en ligne de commandes. +[shellpki](https://gitea.evolix.org/evolix/shellpki) est un script Shell pour gérer une petite [PKI](https://fr.wikipedia.org/wiki/Infrastructure_%C3%A0_cl%C3%A9s_publiques) en ligne de commandes. ## Installation -Cloner le repository dans le répertoire de votre choix, et créez un répertoire pour publier les certificats. Par exemple : +Voir le [README](https://gitea.evolix.org/evolix/shellpki#install) du projet. -~~~ -# git clone https://forge.evolix.org/shellpki.git /usr/local/shellpki -# mkdir /var/www/shellpki -~~~ +## Utilisation -Ajuster le nom des répertoires choisis dans le script `shellpki.sh` : - -~~~ -PREFIX=/usr/local/shellpki -WWWDIR=/var/www/shellpki -~~~ - -Éditer les paramètres de la section `[ req_distinguished_name ]` du fichier `openssl.cnf`, notamment : - -* `countryName_default` : mettre le code de votre pays -* `stateOrProvinceName_default` : mettre votre état (pour la France, le numéro de département par exemple) -* `localityName_default` : mettre le nom de votre ville -* `0.organizationName_default` : mettre le nom de votres structure - -Enfin, initialiser la PKI avec : - -~~~ -# sh shellpki.sh init -~~~ - -Confirmer l'initialisation, et choisir la passphrase qui sera demandée à chaque création de nouveaux certificats, puis le _Common Name_ du certificat de l'autorité de certification. - - -## Créer un nouveau certificat - -Pour créer une nouvelle clé privée et un certificat associé signé par la PKI : - -~~~ -# sh shellpki.sh create -~~~ - -Il faudra ensuite choisir un _Common Name_ unique et entrer la passphrase de la PKI. - - -## Renouveller un certificat - -Il faut le révoquer, puis en recréer un : - -~~~ -# sh shellpki.sh revoke -# sh shellpki.sh create -~~~ +Voir le [README](https://gitea.evolix.org/evolix/shellpki#usage) du projet. ## Troubleshooting