https://www.youtube.com/watch?v=VH4gXcvkmOY
openssl genrsa -aes256 -out private.ca.key.pem 4096
→ rentrer une passphrase et rappelez vous en!
→ ne pas donner ce fichier sensible
openssl req -new -x509 -sha256 -days 3650 -key private.ca.key.pem -out public.ca.pem
→ Remplir Organization Name: World Company ou autre
Vérifier le certificat:
openssl x509 -in public.ca.pem -text
→ On doit voir le X509v3 extensions
Le public.ca.pem doit être uploadé sur les clients (firefox, smartphone, etc…)
En tant qu'administrateur:
Import-Certificate -FilePath "C:\public.ca.pem" -CertStoreLocation Cert:\LocalMachine\Root
ou
certutil.exe -addstore root C:\public.ca.pem
openssl genrsa -out private.certificat.key.pem 4096
openssl req -new -sha256 -subj "/CN=www.monsite.com" -key private.certificat.key.pem -out certificat.csr
csr = Certificat Signed Request
echo subjectAltName=DNS:*.monsite.com.record,IP:10.10.0.4 » extfile.cnf
openssl x509 -req -sha256 -days 3650 -in certificat.csr -CA public.ca.pem -CAkey private.ca.key.pem -out certificat.pem -extfile extfile.cnf -CAcreateserial → entrez la passphrase du ca
Le fichier certificat.csr ne sert plus à rien
cat cert.pem > fullchain.pem
cat ca.pem » fullchain.pem