tech:openssl_generer_un_csr
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:openssl_generer_un_csr [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:openssl_generer_un_csr [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | |||
| + | # Générer un CSR avec OpenSSL | ||
| + | |||
| + | Voir : https:// | ||
| + | |||
| + | Génération de la clef RSA | ||
| + | ~~~bash | ||
| + | openssl genrsa 2048 > acme.fr.key | ||
| + | chmod 400 acme.fr.key | ||
| + | ~~~ | ||
| + | |||
| + | Ou pour générer une clef Elliptic Curve | ||
| + | ~~~bash | ||
| + | # | ||
| + | ~~~ | ||
| + | |||
| + | Créez la demande de certificat (CSR) | ||
| + | |||
| + | ~~~bash | ||
| + | openssl req -new -key acme.fr.key > acme.fr.csr | ||
| + | ~~~ | ||
| + | |||
| + | `san.cnf` | ||
| + | ~~~ini | ||
| + | [ req ] | ||
| + | default_bits | ||
| + | distinguished_name = req_distinguished_name | ||
| + | req_extensions | ||
| + | |||
| + | [ req_distinguished_name ] | ||
| + | countryName | ||
| + | stateOrProvinceName | ||
| + | localityName | ||
| + | organizationName | ||
| + | commonName | ||
| + | |||
| + | [ req_ext ] | ||
| + | subjectAltName = @alt_names | ||
| + | |||
| + | [alt_names] | ||
| + | DNS.1 = acme.fr | ||
| + | DNS.2 = www.acme.fr | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | openssl req -new -sha256 -nodes -out acme.fr.csr -newkey rsa:2048 -keyout acme.fr.key -config san.cnf | ||
| + | ~~~ | ||
| + | |||
| + | Voir les infos du CSR | ||
| + | ~~~bash | ||
| + | openssl req -in acme.fr.csr -noout -text | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
