Let's encrypt Wildcard Zertifikat via command line (kein acme.sh)

Command Line for generating a Wildcard SSL Certificate with Let's Encrypt:

certbot certonly --manual --preferred-challenges=dns --email Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein. --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com -d *.example.com

 Replace example.com with your Domainname.

The command options above are explained below:

  • certonly:                                     Obtain or renew a certificate, but do not install
  • –manual:                                    Obtain certificates interactively
  • –preferred-challenges=dns:      Use dns to authenticate domain ownership
  • –server:                                      Specify the endpoint to use to generate
  • –agree-tos:                                 Agree to the ACME server’s subscriber terms
  • -d:                                               Domain name to provide certificates for

After executing the command above, Let’s Encrypt will provide a text string to add a text record to your DNS entry…

Example:

Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator manual, Installer None ------------------------------------------------------------------------------- Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about EFF and our work to encrypt the web, protect its users and defend digital rights. ------------------------------------------------------------------------------- (Y)es/(N)o: y Obtaining a new certificate Performing the following challenges: dns-01 challenge for example.com ------------------------------------------------------------------------------- NOTE: The IP of this machine will be publicly logged as having requested this certificate. If you're running certbot in manual mode on a machine that is not your server, please ensure you're okay with that. Are you OK with your IP being logged? ------------------------------------------------------------------------------- (Y)es/(N)o: y ------------------------------------------------------------------------------- Please deploy a DNS TXT record under the name _acme-challenge.example.com with the following value: x4MrZ6y-JqFJQRmq_lGi9ReRQHPa1aTC9J2O7wDKzq8 Before continuing, verify the record is deployed.Go to your DNS provider portal and add a text record for the string above and save…

Zertifikatsdateien in PKCS12 Format umwandeln

Um Das Zertifikat in das gewünschte Format zu bekommen brauch man zuerst die drei Basis Datein.

  • Die ".crt" Datei, das fertige Zertifikat.
  • Die ".key" Datei, der Privatekey welcher mit dem CSR erstellt wird und zu diesem Zertifikat gehört.

(optional kann hier auch das Zwischen Zertifikat mit eingebunden werden.)

  • Das zwischen Zertifikat oder auch CA Certificate

Um das Intermediate mit in das Pkcs12 aufzunehmen, bedarf es einen einfachen Tricks, öffnen Sie das Zertifikat mit einem Editor.

Fügen Sie hier nun unter dem PEM Block des eigentlichen Zertifikates den des CA Zertifikates ein. Nun sollten je nach Zertifikatsanbieter zwei bis drei PEM Textblöcke in der Datei enthalten sein.

Nun wir die gebündelte Datei (.crt) und der Privatekey (.key) mit openssl zu einer Datei zusammengefasst zu der "p12" Datei.

openssl pkcs12 -export -in Beispiel.crt -inkey Beispiel.key -out Zertname.p12

Die erzeugte p12 Datei enthält jetzt den privaten Schlüssel und das Zertifikat. Der Inhalt wird mit einem Passwort geschützt, das beim absetzen des Befehls abgefragt wird.

Zu einer bereits bestehenden Pkcs12 Datei können die Intermediates mit folgendem Befehl hinzugefügt werden:

openssl pkcs12 -export -inkey (Ihr Privatekey).key -in (Ihr Zertifikat).crt \ -out (Zertifikats Name).p12 -chain -CApath /etc/ssl/certs

 

Let's make something great together

Get in touch with us and send some basic info for a quick quote

Zitate:

„Die reinste Form des Wahnsinns ist es, alles beim Alten zu belassen und gleichzeitig zu hoffen, dass sich etwas ändert.“
Albert Einstein

„Es ist nicht genug zu wissen - man muss auch anwenden. Es ist nicht genug zu wollen - man muss auch tun.“
Johann Wolfgang von Goethe